mirror of
https://github.com/portainer/portainer.git
synced 2025-07-31 19:35:21 +02:00
refactor(global): service separation #552
This commit is contained in:
parent
0abe8883d1
commit
fe0bf77bbb
48 changed files with 1029 additions and 1015 deletions
17
app/services/pagination.js
Normal file
17
app/services/pagination.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
angular.module('portainer.services')
|
||||
.factory('Pagination', ['LocalStorage', 'Settings', function PaginationFactory(LocalStorage, Settings) {
|
||||
'use strict';
|
||||
return {
|
||||
getPaginationCount: function(key) {
|
||||
var storedCount = LocalStorage.getPaginationCount(key);
|
||||
var paginationCount = Settings.pagination_count;
|
||||
if (storedCount !== null) {
|
||||
paginationCount = storedCount;
|
||||
}
|
||||
return '' + paginationCount;
|
||||
},
|
||||
setPaginationCount: function(key, count) {
|
||||
LocalStorage.storePaginationCount(key, count);
|
||||
}
|
||||
};
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue