mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
link workflow job node based on job type, not UJT type
This commit is contained in:
parent
e20d8c8e81
commit
d068481aec
@ -104,7 +104,7 @@ SUMMARIZABLE_FK_FIELDS = {
|
|||||||
'project_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
'project_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
||||||
'credential': DEFAULT_SUMMARY_FIELDS + ('kind', 'cloud', 'credential_type_id'),
|
'credential': DEFAULT_SUMMARY_FIELDS + ('kind', 'cloud', 'credential_type_id'),
|
||||||
'vault_credential': DEFAULT_SUMMARY_FIELDS + ('kind', 'cloud', 'credential_type_id'),
|
'vault_credential': DEFAULT_SUMMARY_FIELDS + ('kind', 'cloud', 'credential_type_id'),
|
||||||
'job': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'elapsed'),
|
'job': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'elapsed', 'type'),
|
||||||
'job_template': DEFAULT_SUMMARY_FIELDS,
|
'job_template': DEFAULT_SUMMARY_FIELDS,
|
||||||
'workflow_job_template': DEFAULT_SUMMARY_FIELDS,
|
'workflow_job_template': DEFAULT_SUMMARY_FIELDS,
|
||||||
'workflow_job': DEFAULT_SUMMARY_FIELDS,
|
'workflow_job': DEFAULT_SUMMARY_FIELDS,
|
||||||
|
@ -1093,30 +1093,7 @@ export default ['$state', 'moment', '$timeout', '$window', '$filter', 'Rest', 'G
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (d.job.id) {
|
if (d.job.id) {
|
||||||
if (d.unifiedJobTemplate) {
|
goToJobResults(d.job.type);
|
||||||
goToJobResults(d.unifiedJobTemplate.unified_job_type);
|
|
||||||
} else {
|
|
||||||
// We don't have access to the unified resource and have to make
|
|
||||||
// a GET request in order to find out what type job this was
|
|
||||||
// so that we can route the user to the correct stdout view
|
|
||||||
|
|
||||||
Rest.setUrl(GetBasePath("unified_jobs") + "?id=" + d.job.id);
|
|
||||||
Rest.get()
|
|
||||||
.then(function (res) {
|
|
||||||
if (res.data.results && res.data.results.length > 0) {
|
|
||||||
goToJobResults(res.data.results[0].type);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(({
|
|
||||||
data,
|
|
||||||
status
|
|
||||||
}) => {
|
|
||||||
ProcessErrors(scope, data, status, null, {
|
|
||||||
hdr: 'Error!',
|
|
||||||
msg: 'Unable to get job: ' + status
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user