Merge branch 'master' into federation

This commit is contained in:
yackob03 2014-01-15 12:09:44 -05:00
commit 55f95932a8
10 changed files with 130 additions and 12 deletions

View file

@ -48,7 +48,7 @@ function GuideCtrl($scope) {
function SecurityCtrl($scope) {
}
function RepoListCtrl($scope, Restangular, UserService, ApiService) {
function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
$scope.namespace = null;
$scope.page = 1;
$scope.publicPageCount = null;
@ -157,7 +157,7 @@ function LandingCtrl($scope, UserService, ApiService) {
browserchrome.update();
}
function RepoCtrl($scope, Restangular, ApiService, $routeParams, $rootScope, $location, $timeout) {
function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiService, $routeParams, $rootScope, $location, $timeout) {
var namespace = $routeParams.namespace;
var name = $routeParams.name;
@ -192,6 +192,13 @@ function RepoCtrl($scope, Restangular, ApiService, $routeParams, $rootScope, $lo
// Start scope methods //////////////////////////////////////////
$scope.getFormattedCommand = ImageMetadataService.getFormattedCommand;
$scope.getTooltipCommand = function(image) {
var sanitized = ImageMetadataService.getEscapedFormattedCommand(image);
return '<span class=\'codetooltip\'>' + sanitized + '</span>';
};
$scope.updateForDescription = function(content) {
$scope.repo.description = content;
$scope.repo.put();
@ -563,7 +570,7 @@ function RepoCtrl($scope, Restangular, ApiService, $routeParams, $rootScope, $lo
// Create the new tree.
$scope.tree = new ImageHistoryTree(namespace, name, resp.images,
getFirstTextLine, $scope.getTimeSince);
getFirstTextLine, $scope.getTimeSince, ImageMetadataService.getEscapedFormattedCommand);
$scope.tree.draw('image-history-container');
@ -983,11 +990,13 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
};
}
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService) {
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService) {
var namespace = $routeParams.namespace;
var name = $routeParams.name;
var imageid = $routeParams.image;
$scope.getFormattedCommand = ImageMetadataService.getFormattedCommand;
$scope.parseDate = function(dateString) {
return Date.parse(dateString);
};