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:
parent
502fa23d31
commit
e4ad25ea81
6 changed files with 55 additions and 20 deletions
|
@ -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) {
|
||||
|
|
Reference in a new issue