From e2fc8af87a9ca0941e728dda8d2fe360ad453acb Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Tue, 24 Jan 2017 14:28:40 +1300 Subject: [PATCH] feat(ux): add the ability to change the number of paginated items on all entity tables (#537) --- app/components/container/container.html | 15 ++++++-- .../container/containerController.js | 11 ++++-- app/components/containers/containers.html | 12 +++++-- .../containers/containersController.js | 10 ++++-- app/components/endpoints/endpoints.html | 12 +++++-- .../endpoints/endpointsController.js | 12 ++++--- app/components/events/events.html | 12 +++++-- app/components/events/eventsController.js | 10 ++++-- app/components/images/images.html | 12 +++++-- app/components/images/imagesController.js | 10 ++++-- app/components/networks/networks.html | 12 +++++-- app/components/networks/networksController.js | 10 ++++-- app/components/service/service.html | 15 ++++++-- app/components/service/serviceController.js | 11 ++++-- app/components/services/services.html | 12 +++++-- app/components/services/servicesController.js | 36 ++++++++++--------- app/components/stats/stats.html | 15 ++++++-- app/components/stats/statsController.js | 9 +++-- app/components/swarm/swarm.html | 30 +++++++++++++--- app/components/swarm/swarmController.js | 12 ++++--- app/components/templates/templates.html | 16 +++++---- .../templates/templatesController.js | 12 ++++--- app/components/volumes/volumes.html | 12 +++++-- app/components/volumes/volumesController.js | 10 ++++-- app/shared/services.js | 22 ++++++++++++ gruntfile.js | 2 +- 26 files changed, 269 insertions(+), 83 deletions(-) diff --git a/app/components/container/container.html b/app/components/container/container.html index a204903d4..f618d7403 100644 --- a/app/components/container/container.html +++ b/app/components/container/container.html @@ -225,7 +225,18 @@
- + +
+ Items per page: + +
+
@@ -236,7 +247,7 @@ - + diff --git a/app/components/container/containerController.js b/app/components/container/containerController.js index ae3b793e1..1a1b3fd37 100644 --- a/app/components/container/containerController.js +++ b/app/components/container/containerController.js @@ -1,13 +1,18 @@ angular.module('container', []) -.controller('ContainerController', ['$scope', '$state','$stateParams', '$filter', 'Container', 'ContainerCommit', 'ImageHelper', 'Network', 'Messages', 'Settings', -function ($scope, $state, $stateParams, $filter, Container, ContainerCommit, ImageHelper, Network, Messages, Settings) { +.controller('ContainerController', ['$scope', '$state','$stateParams', '$filter', 'Container', 'ContainerCommit', 'ImageHelper', 'Network', 'Messages', 'Pagination', +function ($scope, $state, $stateParams, $filter, Container, ContainerCommit, ImageHelper, Network, Messages, Pagination) { $scope.activityTime = 0; $scope.portBindings = []; $scope.config = { Image: '', Registry: '' }; - $scope.pagination_count = Settings.pagination_count; + $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('container_networks'); + + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('container_networks', $scope.state.pagination_count); + }; var update = function () { $('#loadingViewSpinner').show(); diff --git a/app/components/containers/containers.html b/app/components/containers/containers.html index 89cb19f04..1da516551 100644 --- a/app/components/containers/containers.html +++ b/app/components/containers/containers.html @@ -3,6 +3,7 @@ + Containers @@ -11,7 +12,14 @@
- + Items per page: +
@@ -85,7 +93,7 @@
- + diff --git a/app/components/containers/containersController.js b/app/components/containers/containersController.js index a5038c371..090d593c2 100644 --- a/app/components/containers/containersController.js +++ b/app/components/containers/containersController.js @@ -1,18 +1,22 @@ angular.module('containers', []) -.controller('ContainersController', ['$scope', '$filter', 'Container', 'ContainerHelper', 'Info', 'Settings', 'Messages', 'Config', -function ($scope, $filter, Container, ContainerHelper, Info, Settings, Messages, Config) { +.controller('ContainersController', ['$scope', '$filter', 'Container', 'ContainerHelper', 'Info', 'Settings', 'Messages', 'Config', 'Pagination', +function ($scope, $filter, Container, ContainerHelper, Info, Settings, Messages, Config, Pagination) { $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('containers'); $scope.state.displayAll = Settings.displayAll; $scope.state.displayIP = false; $scope.sortType = 'State'; $scope.sortReverse = false; $scope.state.selectedItemCount = 0; - $scope.pagination_count = Settings.pagination_count; $scope.order = function (sortType) { $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; $scope.sortType = sortType; }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('containers', $scope.state.pagination_count); + }; + var update = function (data) { $('#loadContainersSpinner').show(); $scope.state.selectedItemCount = 0; diff --git a/app/components/endpoints/endpoints.html b/app/components/endpoints/endpoints.html index 6d05247b1..7c6acea3e 100644 --- a/app/components/endpoints/endpoints.html +++ b/app/components/endpoints/endpoints.html @@ -3,6 +3,7 @@ + Endpoint management @@ -101,7 +102,14 @@
- + Items per page: +
@@ -143,7 +151,7 @@
- + diff --git a/app/components/endpoints/endpointsController.js b/app/components/endpoints/endpointsController.js index 188258ba4..879ecbc1e 100644 --- a/app/components/endpoints/endpointsController.js +++ b/app/components/endpoints/endpointsController.js @@ -1,14 +1,14 @@ angular.module('endpoints', []) -.controller('EndpointsController', ['$scope', '$state', 'EndpointService', 'Settings', 'Messages', -function ($scope, $state, EndpointService, Settings, Messages) { +.controller('EndpointsController', ['$scope', '$state', 'EndpointService', 'Messages', 'Pagination', +function ($scope, $state, EndpointService, Messages, Pagination) { $scope.state = { error: '', uploadInProgress: false, - selectedItemCount: 0 + selectedItemCount: 0, + pagination_count: Pagination.getPaginationCount('endpoints') }; $scope.sortType = 'Name'; $scope.sortReverse = true; - $scope.pagination_count = Settings.pagination_count; $scope.formValues = { Name: '', @@ -24,6 +24,10 @@ function ($scope, $state, EndpointService, Settings, Messages) { $scope.sortType = sortType; }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('endpoints', $scope.state.pagination_count); + }; + $scope.selectItem = function (item) { if (item.Checked) { $scope.state.selectedItemCount++; diff --git a/app/components/events/events.html b/app/components/events/events.html index d0de750ab..e59c9fc8d 100644 --- a/app/components/events/events.html +++ b/app/components/events/events.html @@ -3,6 +3,7 @@ + Events @@ -12,7 +13,14 @@
- + Items per page: +
@@ -49,7 +57,7 @@
- + diff --git a/app/components/events/eventsController.js b/app/components/events/eventsController.js index 330e388ec..b4f2ac9d8 100644 --- a/app/components/events/eventsController.js +++ b/app/components/events/eventsController.js @@ -1,16 +1,20 @@ angular.module('events', []) -.controller('EventsController', ['$scope', 'Settings', 'Messages', 'Events', -function ($scope, Settings, Messages, Events) { +.controller('EventsController', ['$scope', 'Messages', 'Events', 'Pagination', +function ($scope, Messages, Events, Pagination) { $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('events'); $scope.sortType = 'Time'; $scope.sortReverse = true; - $scope.pagination_count = Settings.pagination_count; $scope.order = function(sortType) { $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; $scope.sortType = sortType; }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('events', $scope.state.pagination_count); + }; + var from = moment().subtract(24, 'hour').unix(); var to = moment().unix(); diff --git a/app/components/images/images.html b/app/components/images/images.html index 65b8577bb..972b0602b 100644 --- a/app/components/images/images.html +++ b/app/components/images/images.html @@ -3,6 +3,7 @@ + Images @@ -50,7 +51,14 @@
- + Items per page: +
@@ -100,7 +108,7 @@
- + - + diff --git a/app/components/networks/networksController.js b/app/components/networks/networksController.js index 7cc291d60..120ab0c86 100644 --- a/app/components/networks/networksController.js +++ b/app/components/networks/networksController.js @@ -1,16 +1,20 @@ angular.module('networks', []) -.controller('NetworksController', ['$scope', '$state', 'Network', 'Config', 'Messages', 'Settings', -function ($scope, $state, Network, Config, Messages, Settings) { +.controller('NetworksController', ['$scope', '$state', 'Network', 'Config', 'Messages', 'Pagination', +function ($scope, $state, Network, Config, Messages, Pagination) { $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('networks'); $scope.state.selectedItemCount = 0; $scope.state.advancedSettings = false; $scope.sortType = 'Name'; $scope.sortReverse = false; - $scope.pagination_count = Settings.pagination_count; $scope.config = { Name: '' }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('networks', $scope.state.pagination_count); + }; + function prepareNetworkConfiguration() { var config = angular.copy($scope.config); if ($scope.applicationState.endpoint.mode.provider === 'DOCKER_SWARM' || $scope.applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE') { diff --git a/app/components/service/service.html b/app/components/service/service.html index ebfc0b639..ff6b66d2c 100644 --- a/app/components/service/service.html +++ b/app/components/service/service.html @@ -227,7 +227,18 @@
- + +
+ Items per page: + +
+
Actions
{{ key }} {{ value.IPAddress || '-' }} {{ value.Gateway || '-' }}
{{ container.Status }} {{ container|swarmcontainername}}
{{ endpoint.Name }} {{ endpoint.URL | stripprotocol }}
{{ event.Time|getisodatefromtimestamp }} {{ event.Type }} {{ event.Details }}
{{ image.Id|truncate:20}} diff --git a/app/components/images/imagesController.js b/app/components/images/imagesController.js index fe7c7cf08..7000cddaa 100644 --- a/app/components/images/imagesController.js +++ b/app/components/images/imagesController.js @@ -1,11 +1,11 @@ angular.module('images', []) -.controller('ImagesController', ['$scope', '$state', 'Config', 'Image', 'ImageHelper', 'Messages', 'Settings', -function ($scope, $state, Config, Image, ImageHelper, Messages, Settings) { +.controller('ImagesController', ['$scope', '$state', 'Config', 'Image', 'ImageHelper', 'Messages', 'Pagination', +function ($scope, $state, Config, Image, ImageHelper, Messages, Pagination) { $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('images'); $scope.sortType = 'RepoTags'; $scope.sortReverse = true; $scope.state.selectedItemCount = 0; - $scope.pagination_count = Settings.pagination_count; $scope.config = { Image: '', @@ -17,6 +17,10 @@ function ($scope, $state, Config, Image, ImageHelper, Messages, Settings) { $scope.sortType = sortType; }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('images', $scope.state.pagination_count); + }; + $scope.selectItems = function (allSelected) { angular.forEach($scope.state.filteredImages, function (image) { if (image.Checked !== allSelected) { diff --git a/app/components/networks/networks.html b/app/components/networks/networks.html index 1037bfe45..15a5a5021 100644 --- a/app/components/networks/networks.html +++ b/app/components/networks/networks.html @@ -3,6 +3,7 @@ + Networks @@ -52,7 +53,14 @@
- + Items per page: +
@@ -123,7 +131,7 @@
{{ network.Name|truncate:40}} {{ network.Id }}
@@ -264,7 +275,7 @@ - + diff --git a/app/components/service/serviceController.js b/app/components/service/serviceController.js index 5181d0a47..35b086847 100644 --- a/app/components/service/serviceController.js +++ b/app/components/service/serviceController.js @@ -1,13 +1,14 @@ angular.module('service', []) -.controller('ServiceController', ['$scope', '$stateParams', '$state', 'Service', 'ServiceHelper', 'Task', 'Node', 'Messages', 'Settings', -function ($scope, $stateParams, $state, Service, ServiceHelper, Task, Node, Messages, Settings) { +.controller('ServiceController', ['$scope', '$stateParams', '$state', 'Service', 'ServiceHelper', 'Task', 'Node', 'Messages', 'Pagination', +function ($scope, $stateParams, $state, Service, ServiceHelper, Task, Node, Messages, Pagination) { + $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('service_tasks'); $scope.service = {}; $scope.tasks = []; $scope.displayNode = false; $scope.sortType = 'Status'; $scope.sortReverse = false; - $scope.pagination_count = Settings.pagination_count; var previousServiceValues = {}; @@ -16,6 +17,10 @@ function ($scope, $stateParams, $state, Service, ServiceHelper, Task, Node, Mess $scope.sortType = sortType; }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('service_tasks', $scope.state.pagination_count); + }; + $scope.renameService = function renameService(service) { updateServiceAttribute(service, 'Name', service.newServiceName || service.name); service.EditName = false; diff --git a/app/components/services/services.html b/app/components/services/services.html index ced183077..0e958cecc 100644 --- a/app/components/services/services.html +++ b/app/components/services/services.html @@ -3,6 +3,7 @@ + Services @@ -12,7 +13,14 @@
- + Items per page: +
@@ -52,7 +60,7 @@
- + diff --git a/app/components/services/servicesController.js b/app/components/services/servicesController.js index b6587a04e..1fb5c1dbb 100644 --- a/app/components/services/servicesController.js +++ b/app/components/services/servicesController.js @@ -1,11 +1,28 @@ angular.module('services', []) -.controller('ServicesController', ['$scope', '$stateParams', '$state', 'Service', 'ServiceHelper', 'Messages', 'Settings', -function ($scope, $stateParams, $state, Service, ServiceHelper, Messages, Settings) { +.controller('ServicesController', ['$scope', '$stateParams', '$state', 'Service', 'ServiceHelper', 'Messages', 'Pagination', +function ($scope, $stateParams, $state, Service, ServiceHelper, Messages, Pagination) { $scope.state = {}; $scope.state.selectedItemCount = 0; + $scope.state.pagination_count = Pagination.getPaginationCount('services'); $scope.sortType = 'Name'; $scope.sortReverse = false; - $scope.pagination_count = Settings.pagination_count; + + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('services', $scope.state.pagination_count); + }; + + $scope.order = function (sortType) { + $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; + $scope.sortType = sortType; + }; + + $scope.selectItem = function (item) { + if (item.Checked) { + $scope.state.selectedItemCount++; + } else { + $scope.state.selectedItemCount--; + } + }; $scope.scaleService = function scaleService(service) { $('#loadServicesSpinner').show(); @@ -23,19 +40,6 @@ function ($scope, $stateParams, $state, Service, ServiceHelper, Messages, Settin }); }; - $scope.order = function (sortType) { - $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; - $scope.sortType = sortType; - }; - - $scope.selectItem = function (item) { - if (item.Checked) { - $scope.state.selectedItemCount++; - } else { - $scope.state.selectedItemCount--; - } - }; - $scope.removeAction = function () { $('#loadServicesSpinner').show(); var counter = 0; diff --git a/app/components/stats/stats.html b/app/components/stats/stats.html index 961608f76..1bcb0e157 100644 --- a/app/components/stats/stats.html +++ b/app/components/stats/stats.html @@ -54,7 +54,18 @@
- + +
+ Items per page: + +
+
{{ task.Id }} {{ task.Status }} {{ task.Slot }}
{{ service.Name }} {{ service.Image }}
@@ -69,7 +80,7 @@ - + diff --git a/app/components/stats/statsController.js b/app/components/stats/statsController.js index 58064f980..475af604c 100644 --- a/app/components/stats/statsController.js +++ b/app/components/stats/statsController.js @@ -1,17 +1,20 @@ angular.module('stats', []) -.controller('StatsController', ['Settings', '$scope', 'Messages', '$timeout', 'Container', 'ContainerTop', '$stateParams', 'humansizeFilter', '$sce', '$document', -function (Settings, $scope, Messages, $timeout, Container, ContainerTop, $stateParams, humansizeFilter, $sce, $document) { +.controller('StatsController', ['Pagination', '$scope', 'Messages', '$timeout', 'Container', 'ContainerTop', '$stateParams', 'humansizeFilter', '$sce', '$document', +function (Pagination, $scope, Messages, $timeout, Container, ContainerTop, $stateParams, humansizeFilter, $sce, $document) { // TODO: Force scale to 0-100 for cpu, fix charts on dashboard, // TODO: Force memory scale to 0 - max memory $scope.ps_args = ''; $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('stats_processes'); $scope.sortType = 'CMD'; $scope.sortReverse = false; - $scope.pagination_count = Settings.pagination_count; $scope.order = function (sortType) { $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; $scope.sortType = sortType; }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('stats_processes', $scope.state.pagination_count); + }; $scope.getTop = function () { ContainerTop.get($stateParams.id, { ps_args: $scope.ps_args diff --git a/app/components/swarm/swarm.html b/app/components/swarm/swarm.html index ba90f3408..b70392dbf 100644 --- a/app/components/swarm/swarm.html +++ b/app/components/swarm/swarm.html @@ -67,7 +67,18 @@
- + +
+ Items per page: + +
+
{{processInfo}}
@@ -117,7 +128,7 @@ - + @@ -135,7 +146,18 @@
- + +
+ Items per page: + +
+
{{ node.name }} {{ node.cpu }} {{ node.memory }}
@@ -185,7 +207,7 @@ - + diff --git a/app/components/swarm/swarmController.js b/app/components/swarm/swarmController.js index d8fe95150..c311652f7 100644 --- a/app/components/swarm/swarmController.js +++ b/app/components/swarm/swarmController.js @@ -1,7 +1,8 @@ angular.module('swarm', []) -.controller('SwarmController', ['$scope', 'Info', 'Version', 'Node', 'Settings', -function ($scope, Info, Version, Node, Settings) { - +.controller('SwarmController', ['$scope', 'Info', 'Version', 'Node', 'Pagination', +function ($scope, Info, Version, Node, Pagination) { + $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('swarm_nodes'); $scope.sortType = 'Name'; $scope.sortReverse = true; $scope.info = {}; @@ -9,13 +10,16 @@ function ($scope, Info, Version, Node, Settings) { $scope.swarm = {}; $scope.totalCPU = 0; $scope.totalMemory = 0; - $scope.pagination_count = Settings.pagination_count; $scope.order = function(sortType) { $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; $scope.sortType = sortType; }; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('swarm_nodes', $scope.state.pagination_count); + }; + Version.get({}, function (d) { $scope.docker = d; }); diff --git a/app/components/templates/templates.html b/app/components/templates/templates.html index 98d53ba0e..57ea3286f 100644 --- a/app/components/templates/templates.html +++ b/app/components/templates/templates.html @@ -3,6 +3,7 @@ + Templates @@ -106,21 +107,24 @@ -
- -
-
- + Items per page: +
-
+
{{ tpl.title }}
{{ tpl.description }}
diff --git a/app/components/templates/templatesController.js b/app/components/templates/templatesController.js index dbf6ce900..4619979b9 100644 --- a/app/components/templates/templatesController.js +++ b/app/components/templates/templatesController.js @@ -1,19 +1,23 @@ angular.module('templates', []) -.controller('TemplatesController', ['$scope', '$q', '$state', '$filter', '$anchorScroll', 'Config', 'Info', 'Container', 'ContainerHelper', 'Image', 'ImageHelper', 'Volume', 'Network', 'Templates', 'TemplateHelper', 'Messages', 'Settings', -function ($scope, $q, $state, $filter, $anchorScroll, Config, Info, Container, ContainerHelper, Image, ImageHelper, Volume, Network, Templates, TemplateHelper, Messages, Settings) { +.controller('TemplatesController', ['$scope', '$q', '$state', '$filter', '$anchorScroll', 'Config', 'Info', 'Container', 'ContainerHelper', 'Image', 'ImageHelper', 'Volume', 'Network', 'Templates', 'TemplateHelper', 'Messages', 'Pagination', +function ($scope, $q, $state, $filter, $anchorScroll, Config, Info, Container, ContainerHelper, Image, ImageHelper, Volume, Network, Templates, TemplateHelper, Messages, Pagination) { $scope.state = { selectedTemplate: null, - showAdvancedOptions: false + showAdvancedOptions: false, + pagination_count: Pagination.getPaginationCount('templates') }; $scope.formValues = { network: "", name: "", ports: [] }; - $scope.pagination_count = Settings.pagination_count; var selectedItem = -1; + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('templates', $scope.state.pagination_count); + }; + $scope.addPortBinding = function() { $scope.formValues.ports.push({ hostPort: '', containerPort: '', protocol: 'tcp' }); }; diff --git a/app/components/volumes/volumes.html b/app/components/volumes/volumes.html index ae741dcb6..530e24a7b 100644 --- a/app/components/volumes/volumes.html +++ b/app/components/volumes/volumes.html @@ -3,6 +3,7 @@ + Volumes @@ -11,7 +12,14 @@
- + Items per page: +
@@ -55,7 +63,7 @@
- + diff --git a/app/components/volumes/volumesController.js b/app/components/volumes/volumesController.js index 2910dec80..6bbc9c27c 100644 --- a/app/components/volumes/volumesController.js +++ b/app/components/volumes/volumesController.js @@ -1,14 +1,18 @@ angular.module('volumes', []) -.controller('VolumesController', ['$scope', '$state', 'Volume', 'Messages', 'Settings', -function ($scope, $state, Volume, Messages, Settings) { +.controller('VolumesController', ['$scope', '$state', 'Volume', 'Messages', 'Pagination', +function ($scope, $state, Volume, Messages, Pagination) { $scope.state = {}; + $scope.state.pagination_count = Pagination.getPaginationCount('volumes'); $scope.state.selectedItemCount = 0; $scope.sortType = 'Name'; $scope.sortReverse = true; $scope.config = { Name: '' }; - $scope.pagination_count = Settings.pagination_count; + + $scope.changePaginationCount = function() { + Pagination.setPaginationCount('volumes', $scope.state.pagination_count); + }; $scope.order = function(sortType) { $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; diff --git a/app/shared/services.js b/app/shared/services.js index b7c74196d..3a5e1a089 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -327,6 +327,22 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize']) setActiveEndpoint: { method: 'POST', params: { id: '@id', action: 'active' } } }); }]) + .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); + } + }; + }]) .factory('LocalStorage', ['localStorageService', function LocalStorageFactory(localStorageService) { 'use strict'; return { @@ -345,6 +361,12 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize']) deleteJWT: function() { localStorageService.remove('JWT'); }, + storePaginationCount: function(key, count) { + localStorageService.cookie.set('pagination_' + key, count); + }, + getPaginationCount: function(key) { + return localStorageService.cookie.get('pagination_' + key); + }, clean: function() { localStorageService.clearAll(); } diff --git a/gruntfile.js b/gruntfile.js index bbec6da3a..825749762 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -405,7 +405,7 @@ module.exports = function (grunt) { command: [ 'docker stop portainer', 'docker rm portainer', - 'docker run -d -p 9000:9000 -v /tmp/portainer:/data --name portainer portainer -H tcp://10.0.7.10:2375' + 'docker run -d -p 9000:9000 --name portainer portainer -H tcp://10.0.7.10:2375' ].join(';') }, runSwarmLocal: {
{{ node.Description.Hostname }} {{ node.Spec.Role }} {{ node.Description.Resources.NanoCPUs / 1000000000 }}
{{ volume.Name|truncate:50 }} {{ volume.Driver }}