diff --git a/awx/ui/client/src/instance-groups/instance-groups.route.js b/awx/ui/client/src/instance-groups/instance-groups.route.js index 89cd484dbb..ce3ab3f7f9 100644 --- a/awx/ui/client/src/instance-groups/instance-groups.route.js +++ b/awx/ui/client/src/instance-groups/instance-groups.route.js @@ -12,7 +12,7 @@ export default { params: { instance_group_search: { value: { - page_size: '10', + page_size: '20', order_by: 'name' } } @@ -38,4 +38,4 @@ export default { } ] } -}; \ No newline at end of file +}; diff --git a/awx/ui/client/src/instance-groups/instances/instance-jobs/instance-jobs-list.route.js b/awx/ui/client/src/instance-groups/instances/instance-jobs/instance-jobs-list.route.js index dcff49f2d0..9029b7dd00 100644 --- a/awx/ui/client/src/instance-groups/instances/instance-jobs/instance-jobs-list.route.js +++ b/awx/ui/client/src/instance-groups/instances/instance-jobs/instance-jobs-list.route.js @@ -11,7 +11,7 @@ export default { params: { instance_job_search: { value: { - page_size: '10', + page_size: '20', order_by: '-finished', not__launch_type: 'sync' } @@ -37,4 +37,4 @@ export default { } ], } -}; \ No newline at end of file +}; diff --git a/awx/ui/client/src/instance-groups/instances/instances-list.route.js b/awx/ui/client/src/instance-groups/instances/instances-list.route.js index 89e572f3d7..5215e30d46 100644 --- a/awx/ui/client/src/instance-groups/instances/instances-list.route.js +++ b/awx/ui/client/src/instance-groups/instances/instances-list.route.js @@ -12,7 +12,7 @@ export default { params: { instance_search: { value: { - page_size: '10', + page_size: '20', order_by: 'hostname' } } @@ -31,4 +31,4 @@ export default { } ] } -}; \ No newline at end of file +}; diff --git a/awx/ui/client/src/instance-groups/jobs/jobs-list.route.js b/awx/ui/client/src/instance-groups/jobs/jobs-list.route.js index 7dc5230339..58db2bf4ce 100644 --- a/awx/ui/client/src/instance-groups/jobs/jobs-list.route.js +++ b/awx/ui/client/src/instance-groups/jobs/jobs-list.route.js @@ -11,7 +11,7 @@ export default { params: { job_search: { value: { - page_size: '10', + page_size: '20', order_by: '-finished', not__launch_type: 'sync' } @@ -37,4 +37,4 @@ export default { } ] } -}; \ No newline at end of file +}; diff --git a/awx/ui/client/src/shared/paginate/paginate.block.less b/awx/ui/client/src/shared/paginate/paginate.block.less index 48a1304b7f..4e33377687 100644 --- a/awx/ui/client/src/shared/paginate/paginate.block.less +++ b/awx/ui/client/src/shared/paginate/paginate.block.less @@ -20,7 +20,7 @@ .Paginate { margin-top: 20px; - font-size: 12px !important; + font-size: 10px !important; color: @list-pagin-text; text-transform: uppercase; display: flex; @@ -28,7 +28,7 @@ } .Paginate-pager--pageof { - line-height: 22px; + line-height: 25px; margin-left: 10px; } @@ -64,6 +64,7 @@ .Paginate-filteringDropdowns{ display: flex; align-items: center; + line-height: 25px; } .Paginate-dropdown{ @@ -80,3 +81,7 @@ } } } + +.Paginate-itemsOf { + line-height: 25px; +} diff --git a/awx/ui/client/src/shared/paginate/paginate.controller.js b/awx/ui/client/src/shared/paginate/paginate.controller.js index c7a4cf5237..a8ff92572a 100644 --- a/awx/ui/client/src/shared/paginate/paginate.controller.js +++ b/awx/ui/client/src/shared/paginate/paginate.controller.js @@ -6,6 +6,8 @@ export default ['$scope', '$stateParams', '$state', '$filter', 'GetBasePath', 'Q $scope.pageSize = pageSize; + $scope.basePageSize = parseInt(pageSize) === 5 ? 5 : 20; + function init() { let updatePaginationVariables = function() { @@ -28,7 +30,7 @@ export default ['$scope', '$stateParams', '$state', '$filter', 'GetBasePath', 'Q $('#period-dropdown') .replaceWith(""+id+ "\n"); - + if($scope.querySet){ let origQuerySet = _.cloneDeep($scope.querySet); queryset = _.merge(origQuerySet, { page_size: $scope.pageSize }); @@ -39,12 +41,8 @@ export default ['$scope', '$stateParams', '$state', '$filter', 'GetBasePath', 'Q $scope.toPage(); }; - $scope.dataCount = function() { - return $filter('number')($scope.dataset.count); - }; - $scope.toPage = function(page) { - if(page === 0) { + if(page === 0 || page > $scope.last) { return; } if (GetBasePath($scope.basePath) || $scope.basePath) { @@ -130,7 +128,7 @@ export default ['$scope', '$stateParams', '$state', '$filter', 'GetBasePath', 'Q return `1 - ${$scope.pageSize}`; } else { let floor = (($scope.current - 1) * parseInt($scope.pageSize)) + 1; - let ceil = floor + parseInt($scope.pageSize) < $scope.dataset.count ? floor + parseInt($scope.pageSize) : $scope.dataset.count; + let ceil = floor + parseInt($scope.pageSize) - 1 < $scope.dataset.count ? floor + parseInt($scope.pageSize) - 1 : $scope.dataset.count; return `${floor} - ${ceil}`; } } diff --git a/awx/ui/client/src/shared/paginate/paginate.partial.html b/awx/ui/client/src/shared/paginate/paginate.partial.html index db281d8948..9fab876eff 100644 --- a/awx/ui/client/src/shared/paginate/paginate.partial.html +++ b/awx/ui/client/src/shared/paginate/paginate.partial.html @@ -1,4 +1,4 @@ -
+
-
+
- ITEMS  + ITEMS  {{dataRange}} - of {{dataCount()}} + of {{dataset.count | number}} -
+
VIEW PER PAGE