diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index e3f20d2ce0..820ef907c9 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -69,11 +69,9 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait, if (!$routeParams.login) { // If we're not logging in, start the Wait widget. Otherwise, it's already running. - Wait('start'); + //Wait('start'); } - - if ($scope.removeWidgetLoaded) { $scope.removeWidgetLoaded(); } @@ -86,13 +84,12 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait, loadedCount++; if (loadedCount === waitCount) { $(window).resize(_.debounce(function() { - Wait('start'); $scope.$emit('ResizeJobGraph'); $scope.$emit('ResizeHostGraph'); $scope.$emit('ResizeHostPieGraph'); + Wait('stop'); }, 500)); $(window).resize(); - Wait('stop'); } }); @@ -182,7 +179,6 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait, $scope.$emit('dashboardReady', data); }) .error(function (data, status) { - Wait('stWaitop'); ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard: ' + status }); }); }; diff --git a/awx/ui/static/js/helpers/Jobs.js b/awx/ui/static/js/helpers/Jobs.js index 5c2b6e0979..db22c421f0 100644 --- a/awx/ui/static/js/helpers/Jobs.js +++ b/awx/ui/static/js/helpers/Jobs.js @@ -359,6 +359,7 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job pageSize = params.pageSize || 5, base = $location.path().replace(/^\//, '').split('/')[0], search_params = params.searchParams, + spinner = (params.spinner === undefined) ? true : params.spinner, e, html, key; // Add the search widget. We want it arranged differently, so we're injecting and compiling it separately @@ -416,7 +417,7 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job scope[key] = search_params[key]; } } - scope.search(list.iterator); + scope.search(list.iterator, null, null, null, null, spinner); }; }]) diff --git a/awx/ui/static/js/helpers/PaginationHelpers.js b/awx/ui/static/js/helpers/PaginationHelpers.js index 6931ef38b9..f1d25531a2 100644 --- a/awx/ui/static/js/helpers/PaginationHelpers.js +++ b/awx/ui/static/js/helpers/PaginationHelpers.js @@ -147,14 +147,16 @@ angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelat return (page === scope[iterator + '_page']) ? 'active' : ''; }; - scope.changePageSize = function (set, iterator) { + scope.changePageSize = function (set, iterator, spinner) { // Called whenever a new page size is selected scope[iterator + '_page'] = 1; var new_url = scope[iterator + '_url'].replace(/\?page_size\=\d+/, ''), connect = (/\/$/.test(new_url)) ? '?' : '&'; new_url += (scope[iterator + 'SearchParams']) ? connect + scope[iterator + 'SearchParams'] + '&page_size=' + scope[iterator + '_page_size'] : connect + 'page_size=' + scope[iterator + '_page_size']; - Wait('start'); + if (spinner === undefined || spinner === true) { + Wait('start'); + } Refresh({ scope: scope, set: set, iterator: iterator, url: new_url }); }; }; diff --git a/awx/ui/static/js/helpers/Schedules.js b/awx/ui/static/js/helpers/Schedules.js index 49eac1a4a4..e7228e841c 100644 --- a/awx/ui/static/js/helpers/Schedules.js +++ b/awx/ui/static/js/helpers/Schedules.js @@ -557,6 +557,7 @@ angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelpe id = params.id, url = params.url, pageSize = params.pageSize || 5, + spinner = (params.spinner === undefined) ? true : params.spinner, base = $location.path().replace(/^\//, '').split('/')[0], e, html; @@ -627,6 +628,6 @@ angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelpe scope[list.iterator + 'SearchFieldLabel'] = 'ID'; } - scope.search(list.iterator); + scope.search(list.iterator, null, null, null, null, spinner); }; }]); diff --git a/awx/ui/static/js/widgets/DashboardJobs.js b/awx/ui/static/js/widgets/DashboardJobs.js index 99beb23957..423627dd50 100644 --- a/awx/ui/static/js/widgets/DashboardJobs.js +++ b/awx/ui/static/js/widgets/DashboardJobs.js @@ -73,7 +73,8 @@ angular.module('DashboardJobsWidget', ['RestServices', 'Utilities']) list: JobsList, id: 'active-jobs', url: GetBasePath('unified_jobs') + '?status__in=running,completed,failed,successful,error,canceled', - pageSize: max_rows + pageSize: max_rows, + spinner: false }); LoadSchedulesScope({ parent_scope: scope, @@ -81,7 +82,8 @@ angular.module('DashboardJobsWidget', ['RestServices', 'Utilities']) list: ScheduledJobsList, id: 'scheduled-jobs-tab', url: GetBasePath('schedules') + '?next_run__isnull=false', - pageSize: max_rows + pageSize: max_rows, + spinner: false }); $(window).resize(_.debounce(function() { @@ -162,9 +164,9 @@ angular.module('DashboardJobsWidget', ['RestServices', 'Utilities']) function resizeDashboardJobsWidget() { setDashboardJobsHeight(); jobs_scope[JobsList.iterator + '_page_size'] = max_rows; - jobs_scope.changePageSize(JobsList.name, JobsList.iterator); + jobs_scope.changePageSize(JobsList.name, JobsList.iterator, false); scheduled_scope[ScheduledJobsList.iterator + '_page_size'] = max_rows; - scheduled_scope.changePageSize(ScheduledJobsList.name, ScheduledJobsList.iterator); + scheduled_scope.changePageSize(ScheduledJobsList.name, ScheduledJobsList.iterator, false); }