Add better messaging and UI around repos and images that are currently being pushed
This commit is contained in:
parent
27c2680380
commit
e7daca5d95
4 changed files with 63 additions and 19 deletions
|
@ -431,6 +431,27 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
$location.search('current', buildInfo.id);
|
||||
};
|
||||
|
||||
$scope.isPushing = function(images) {
|
||||
if (!images) { return false; }
|
||||
|
||||
var cached = images.__isPushing;
|
||||
if (cached !== undefined) {
|
||||
return cached;
|
||||
}
|
||||
|
||||
return images.__isPushing = $scope.isPushingInternal(images);
|
||||
};
|
||||
|
||||
$scope.isPushingInternal = function(images) {
|
||||
if (!images) { return false; }
|
||||
|
||||
for (var i = 0; i < images.length; ++i) {
|
||||
if (images[i].uploading) { return true; }
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.getTooltipCommand = function(image) {
|
||||
var sanitized = ImageMetadataService.getEscapedFormattedCommand(image);
|
||||
return '<span class=\'codetooltip\'>' + sanitized + '</span>';
|
||||
|
|
Reference in a new issue