Add the tag count to the tag icon in the repo view
This commit is contained in:
parent
7d6c9a88df
commit
060f3a9ff2
3 changed files with 30 additions and 2 deletions
|
@ -231,6 +231,15 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
});
|
||||
};
|
||||
|
||||
$scope.getTagCount = function(repo) {
|
||||
if (!repo) { return 0; }
|
||||
var count = 0;
|
||||
for (var tag in repo.tags) {
|
||||
++count;
|
||||
}
|
||||
return count;
|
||||
};
|
||||
|
||||
var namespace = $routeParams.namespace;
|
||||
var name = $routeParams.name;
|
||||
var tag = $routeParams.tag || 'latest';
|
||||
|
@ -389,7 +398,7 @@ function RepoAdminCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
$('#cannotchangeModal').modal({});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$('.spin').spin();
|
||||
$scope.loading = true;
|
||||
|
||||
|
|
Reference in a new issue