diff --git a/awx/ui/static/js/controllers/Schedules.js b/awx/ui/static/js/controllers/Schedules.js index 0e253e0d71..9df9b2763f 100644 --- a/awx/ui/static/js/controllers/Schedules.js +++ b/awx/ui/static/js/controllers/Schedules.js @@ -49,7 +49,8 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get scope: $scope, list: SchedulesList, id: 'schedule-list-target', - url: url + url: url, + pageSize: 20 }); }); diff --git a/awx/ui/static/js/helpers/Schedules.js b/awx/ui/static/js/helpers/Schedules.js index 2f3edd94a0..813dfda531 100644 --- a/awx/ui/static/js/helpers/Schedules.js +++ b/awx/ui/static/js/helpers/Schedules.js @@ -419,7 +419,7 @@ angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelpe }); }; - scope.refreshSchedule = function() { + scope.refreshSchedules = function() { if (base === 'jobs') { parent_scope.refreshJobs(); } @@ -432,7 +432,7 @@ angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelpe scope.removeSchedulesRefresh(); } scope.$on('SchedulesRefresh', function() { - scope.refreshJobs(); + scope.search(iterator); }); }; }]) diff --git a/awx/ui/static/js/lists/ScheduledJobs.js b/awx/ui/static/js/lists/ScheduledJobs.js index 59dea90486..ce21fe9444 100644 --- a/awx/ui/static/js/lists/ScheduledJobs.js +++ b/awx/ui/static/js/lists/ScheduledJobs.js @@ -65,7 +65,7 @@ angular.module('ScheduledJobsDefinition', []) refresh: { mode: 'all', awToolTip: "Refresh the page", - ngClick: "refreshSchedule()" + ngClick: "refreshSchedules()" } }, diff --git a/awx/ui/static/lib/ansible/Utilities.js b/awx/ui/static/lib/ansible/Utilities.js index 4a65dac2c8..c9efa0f6c9 100644 --- a/awx/ui/static/lib/ansible/Utilities.js +++ b/awx/ui/static/lib/ansible/Utilities.js @@ -107,7 +107,6 @@ angular.module('Utilities', ['RestServices', 'Utilities']) scope.alertHeader = hdr; scope.alertBody = msg; scope.alertClass = (cls) ? cls : 'alert-danger'; //default alert class is alert-danger - //console.log('msg: ' + msg + ' cls: ' + cls); e = angular.element(document.getElementById('alert-modal')); $compile(e)(scope); $('#alert-modal').modal({ @@ -137,7 +136,7 @@ angular.module('Utilities', ['RestServices', 'Utilities']) .factory('ProcessErrors', ['$rootScope', '$cookieStore', '$log', '$location', 'Alert', 'Wait', function ($rootScope, $cookieStore, $log, $location, Alert, Wait) { return function (scope, data, status, form, defaultMsg) { - var field, fieldErrors, msg; + var field, fieldErrors, msg, keys; Wait('stop'); if ($AnsibleConfig.debug_mode) { $log.debug('Debug status: ' + status); @@ -200,6 +199,15 @@ angular.module('Utilities', ['RestServices', 'Utilities']) if ((!fieldErrors) && defaultMsg) { Alert(defaultMsg.hdr, defaultMsg.msg); } + } else if (Object.keys(data).length > 0) { + keys = Object.keys(data); + if (Array.isArray(data[keys[0]])) { + msg = data[keys[0]][0]; + } + else { + msg = data[keys[0]]; + } + Alert(defaultMsg.hdr, msg); } else { Alert(defaultMsg.hdr, defaultMsg.msg); }