You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/services/pagination.js

18 lines
584 B

angular.module('portainer.services')
.factory('Pagination', ['LocalStorage', 'PAGINATION_MAX_ITEMS', function PaginationFactory(LocalStorage, PAGINATION_MAX_ITEMS) {
'use strict';
return {
getPaginationCount: function(key) {
var storedCount = LocalStorage.getPaginationCount(key);
var paginationCount = PAGINATION_MAX_ITEMS;
if (storedCount !== null) {
paginationCount = storedCount;
}
return '' + paginationCount;
},
setPaginationCount: function(key, count) {
LocalStorage.storePaginationCount(key, count);
}
};
}]);