diff --git a/app/components/node/node.html b/app/components/node/node.html index 714660fe3..996cf3c06 100644 --- a/app/components/node/node.html +++ b/app/components/node/node.html @@ -12,7 +12,7 @@
{{ task.Id }} | {{ task.Status }} | {{ task.Slot }} | diff --git a/app/components/node/nodeController.js b/app/components/node/nodeController.js index 66af4210c..517424296 100644 --- a/app/components/node/nodeController.js +++ b/app/components/node/nodeController.js @@ -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); };