1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 06:19:41 +02:00

feat(node): add pagination to associated tasks

This commit is contained in:
Anthony Lapenna 2017-01-26 10:35:05 +13:00
parent e25c5a014c
commit fcc9203416
2 changed files with 22 additions and 6 deletions

View file

@ -1,13 +1,14 @@
angular.module('node', [])
.controller('NodeController', ['$scope', '$state', '$stateParams', 'LabelHelper', 'Node', 'NodeHelper', 'Task', 'Settings', 'Messages',
function ($scope, $state, $stateParams, LabelHelper, Node, NodeHelper, Task, Settings, Messages) {
.controller('NodeController', ['$scope', '$state', '$stateParams', 'LabelHelper', 'Node', 'NodeHelper', 'Task', 'Pagination', 'Messages',
function ($scope, $state, $stateParams, LabelHelper, Node, NodeHelper, Task, Pagination, Messages) {
$scope.state = {};
$scope.state.pagination_count = Pagination.getPaginationCount('node_tasks');
$scope.loading = true;
$scope.tasks = [];
$scope.displayNode = false;
$scope.sortType = 'Status';
$scope.sortReverse = false;
$scope.pagination_count = Settings.pagination_count;
var originalNode = {};
var editedKeys = [];
@ -17,6 +18,10 @@ function ($scope, $state, $stateParams, LabelHelper, Node, NodeHelper, Task, Set
$scope.sortType = sortType;
};
$scope.changePaginationCount = function() {
Pagination.setPaginationCount('node_tasks', $scope.state.pagination_count);
};
$scope.updateNodeAttribute = function updateNodeAttribute(node, key) {
editedKeys.push(key);
};