mirror of
https://github.com/ansible/awx.git
synced 2026-05-22 08:17:39 -02:30
Fixed console error when running system jobs
a chunk of code was referring to job_scope before it had been instantiated as a scope object
This commit is contained in:
@@ -25,21 +25,7 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $routePa
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
if ($rootScope.removeJobStatusChange) {
|
||||
$rootScope.removeJobStatusChange();
|
||||
}
|
||||
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange-jobs', function() {
|
||||
jobs_scope.refreshJobs();
|
||||
});
|
||||
|
||||
if ($rootScope.removeScheduleStatusChange) {
|
||||
$rootScope.removeScheduleStatusChange();
|
||||
}
|
||||
$rootScope.removeScheduleStatusChange = $rootScope.$on('ScheduleStatusChange', function() {
|
||||
if (api_complete) {
|
||||
scheduled_scope.search('schedule');
|
||||
}
|
||||
});
|
||||
|
||||
if ($scope.removeListLoaded) {
|
||||
$scope.removeListLoaded();
|
||||
@@ -103,6 +89,22 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $routePa
|
||||
scheduled_scope.search('schedule');
|
||||
};
|
||||
|
||||
if ($rootScope.removeJobStatusChange) {
|
||||
$rootScope.removeJobStatusChange();
|
||||
}
|
||||
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange-jobs', function() {
|
||||
jobs_scope.refreshJobs();
|
||||
});
|
||||
|
||||
if ($rootScope.removeScheduleStatusChange) {
|
||||
$rootScope.removeScheduleStatusChange();
|
||||
}
|
||||
$rootScope.removeScheduleStatusChange = $rootScope.$on('ScheduleStatusChange', function() {
|
||||
if (api_complete) {
|
||||
scheduled_scope.search('schedule');
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(_.debounce(function() {
|
||||
resizeContainers();
|
||||
}, 500));
|
||||
|
||||
Reference in New Issue
Block a user