mirror of
https://github.com/ansible/awx.git
synced 2026-08-02 10:59:56 -02:30
error handling in Job Detail page
a JS error can get thrown if the user navigates to the job detail page as a job is ending
This commit is contained in:
@@ -202,6 +202,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
|||||||
scope.removeLoadHostSummaries();
|
scope.removeLoadHostSummaries();
|
||||||
}
|
}
|
||||||
scope.removeHostSummaries = scope.$on('LoadHostSummaries', function() {
|
scope.removeHostSummaries = scope.$on('LoadHostSummaries', function() {
|
||||||
|
if(scope.job.related.job_host_summaries){
|
||||||
var url = scope.job.related.job_host_summaries + '?';
|
var url = scope.job.related.job_host_summaries + '?';
|
||||||
url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name';
|
url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name';
|
||||||
|
|
||||||
@@ -237,6 +238,8 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
|||||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
||||||
msg: 'Call to ' + url + '. GET returned: ' + status });
|
msg: 'Call to ' + url + '. GET returned: ' + status });
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (scope.removeLoadHosts) {
|
if (scope.removeLoadHosts) {
|
||||||
|
|||||||
Reference in New Issue
Block a user