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 @@
Actions | -||||||||
---|---|---|---|---|---|---|---|---|
{{ key }} | {{ value.IPAddress || '-' }} | {{ value.Gateway || '-' }} | 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 @@ +||||||
{{ container.Status }} | {{ container|swarmcontainername}} | 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.Name }} | {{ endpoint.URL | stripprotocol }} | 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 @@ +|||||||
{{ event.Time|getisodatefromtimestamp }} | {{ event.Type }} | {{ event.Details }} | 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 @@ +||||||
{{ 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 @@
+
-
+ Items per page:
+
| |||||||
{{ network.Name|truncate:40}} | {{ network.Id }} | 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 @@
{{ task.Id }} | {{ task.Status }} | {{ task.Slot }} | 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 @@ +|||
{{ service.Name }} | {{ service.Image }} | 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 @@