Performance improvements for the repo API and the new repo UI

This commit is contained in:
Joseph Schorr 2015-03-18 14:47:53 -04:00
parent bc6baae050
commit ab2331a486
9 changed files with 119 additions and 100 deletions

View file

@ -21,6 +21,8 @@
$scope.viewScope = {
'selectedTags': [],
'repository': null,
'images': null,
'imagesResource': null,
'builds': null,
'changesVisible': false
};
@ -70,6 +72,16 @@
});
};
var loadImages = function() {
var params = {
'repository': $scope.namespace + '/' + $scope.name
};
$scope.viewScope.imagesResource = ApiService.listRepositoryImagesAsResource(params).get(function(resp) {
$scope.viewScope.images = resp.images;
});
};
var loadRepositoryBuilds = function(callback) {
var params = {
'repository': $scope.namespace + '/' + $scope.name,
@ -86,8 +98,9 @@
}, errorHandler);
};
// Load the repository.
// Load the repository and images.
loadRepository();
loadImages();
$scope.setTags = function(tagNames) {
if (!tagNames) {