mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
Job Detail checks to prevent error messages
If the job run completes before the JS can complete running, error messages are output to the js console. Ajusting checks to prevent errors happening.
This commit is contained in:
parent
e849dff386
commit
9fbd64805f
@ -200,7 +200,7 @@ export function JobDetailController ($location, $rootScope, $scope, $compile, $r
|
||||
scope.removeLoadHostSummaries();
|
||||
}
|
||||
scope.removeHostSummaries = scope.$on('LoadHostSummaries', function() {
|
||||
if(scope.job.related){
|
||||
if(scope.job){
|
||||
var url = scope.job.related.job_host_summaries + '?';
|
||||
url += '&page_size=' + scope.hostSummariesMaxRows + '&order=host_name';
|
||||
|
||||
@ -247,9 +247,11 @@ export function JobDetailController ($location, $rootScope, $scope, $compile, $r
|
||||
if (scope.activeTask) {
|
||||
|
||||
var play = scope.jobData.plays[scope.activePlay],
|
||||
task = play.tasks[scope.activeTask],
|
||||
task, // = play.tasks[scope.activeTask],
|
||||
url;
|
||||
|
||||
if(play){
|
||||
task = play.tasks[scope.activeTask];
|
||||
}
|
||||
if (play && task) {
|
||||
url = scope.job.related.job_events + '?parent=' + task.id + '&';
|
||||
url += 'event__startswith=runner&page_size=' + scope.hostResultsMaxRows + '&order=host_name,counter';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user