mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Merge pull request #4631 from wenottingham/stop-me-before-i-touch-javascript-again
Fix fetching of result traceback in job details. Reviewed-by: Jake McDermott <yo@jakemcdermott.me> https://github.com/jakemcdermott
This commit is contained in:
commit
09c105e125
@ -442,8 +442,8 @@ function getJobExplanationDetails () {
|
||||
return { label, less, more, showMore, hasMoreToShow };
|
||||
}
|
||||
|
||||
function getResultTracebackDetails () {
|
||||
const traceback = resource.model.get('result_traceback');
|
||||
function getResultTracebackDetails (resultTraceback) {
|
||||
const traceback = resultTraceback || resource.model.get('result_traceback');
|
||||
|
||||
if (!traceback) {
|
||||
return null;
|
||||
@ -871,7 +871,8 @@ function JobDetailsController (
|
||||
instanceGroup,
|
||||
environment,
|
||||
artifacts,
|
||||
executionNode
|
||||
executionNode,
|
||||
resultTraceback
|
||||
}) => {
|
||||
vm.started = getStartDetails(started);
|
||||
vm.finished = getFinishDetails(finished);
|
||||
@ -883,6 +884,7 @@ function JobDetailsController (
|
||||
vm.artifacts = getArtifactsDetails(artifacts);
|
||||
vm.executionNode = getExecutionNodeDetails(executionNode);
|
||||
vm.inventoryScm = getInventoryScmDetails(inventoryScm.id, inventoryScm.status);
|
||||
vm.resultTraceback = getResultTracebackDetails(resultTraceback);
|
||||
vm.scmRevision = getSCMRevisionDetails(scmRevision);
|
||||
vm.instanceGroup = getInstanceGroupDetails(instanceGroup);
|
||||
vm.status = getStatusDetails(status);
|
||||
|
@ -303,6 +303,12 @@ function JobStatusService (moment, message) {
|
||||
this.statsEvent = data;
|
||||
};
|
||||
|
||||
this.setResultTraceback = traceback => {
|
||||
if (!traceback) return;
|
||||
|
||||
this.state.resultTraceback = traceback;
|
||||
};
|
||||
|
||||
this.setHostStatusCounts = counts => {
|
||||
counts = counts || {};
|
||||
|
||||
@ -341,6 +347,7 @@ function JobStatusService (moment, message) {
|
||||
this.setEnvironment(model.get('custom_virtualenv'));
|
||||
this.setArtifacts(model.get('artifacts'));
|
||||
this.setExecutionNode(model.get('execution_node'));
|
||||
this.setResultTraceback(model.get('result_traceback'));
|
||||
|
||||
this.initHostStatusCounts({ model });
|
||||
this.initPlaybookCounts({ model });
|
||||
|
Loading…
Reference in New Issue
Block a user