mirror of
https://github.com/ansible/awx.git
synced 2026-08-01 18:39:54 -02:30
Job detail page refactor
Cleaning up end of job processing to make sure we only reload things 1x at the end. Now drawing graph each time DOM is updated.
This commit is contained in:
@@ -189,7 +189,8 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
break;
|
||||
|
||||
case 'playbook_on_stats':
|
||||
// We will respond to the job status change event. No need to do this 2x.
|
||||
/*case 'playbook_on_stats':
|
||||
scope.job_status.finished = event.modified;
|
||||
scope.job_status.elapsed = GetElapsed({
|
||||
start: scope.job_status.started,
|
||||
@@ -199,7 +200,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
scope.job_status.status_class = "";
|
||||
//LoadHostSummary({ scope: scope, data: event.event_data });
|
||||
//DrawGraph({ scope: scope, resize: true });
|
||||
break;
|
||||
break;*/
|
||||
}
|
||||
};
|
||||
}])
|
||||
@@ -999,13 +1000,17 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
};
|
||||
}])
|
||||
|
||||
.factory('UpdateDOM', ['DrawPlays', 'DrawTasks', 'DrawHostResults', function(DrawPlays, DrawTasks, DrawHostResults) {
|
||||
.factory('UpdateDOM', ['DrawPlays', 'DrawTasks', 'DrawHostResults', 'DrawGraph', function(DrawPlays, DrawTasks, DrawHostResults, DrawGraph) {
|
||||
return function(params) {
|
||||
var scope = params.scope;
|
||||
|
||||
DrawPlays({ scope: scope });
|
||||
DrawTasks({ scope: scope });
|
||||
DrawHostResults({ scope: scope });
|
||||
|
||||
if (scope.host_summary.total > 0) {
|
||||
DrawGraph({ scope: scope, resize: true });
|
||||
}
|
||||
};
|
||||
}])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user