Add repository list pagination

Also changes our binds to be bind-once, which should significantly reduce memory and increase performance for large lists

Fixes #1856
This commit is contained in:
Joseph Schorr 2016-09-21 14:23:32 -04:00
parent 502fa23d31
commit e4ad25ea81
6 changed files with 55 additions and 20 deletions

View file

@ -17,6 +17,7 @@ angular.module('quay').directive('repoListView', function () {
$scope.resources = [];
$scope.loading = true;
$scope.showAsList = CookieService.get('quay.repoview') == 'list';
$scope.optionAllowed = true;
$scope.$watch('namespaces', function(namespaces) {
if (!namespaces) { return; }
@ -31,6 +32,11 @@ angular.module('quay').directive('repoListView', function () {
}
}
});
$scope.optionAllowed = $scope.resources.length <= 250;
if (!$scope.optionAllowed) {
$scope.showAsList = true;
}
}, true);
$scope.setShowAsList = function(value) {