1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

link workflow job node based on job type, not UJT type

This commit is contained in:
AlanCoding 2018-11-02 09:00:03 -04:00 committed by Marliana Lara
parent e20d8c8e81
commit d068481aec
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
2 changed files with 2 additions and 25 deletions

View File

@ -104,7 +104,7 @@ SUMMARIZABLE_FK_FIELDS = {
'project_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
'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,
'workflow_job_template': DEFAULT_SUMMARY_FIELDS,
'workflow_job': DEFAULT_SUMMARY_FIELDS,

View File

@ -1093,30 +1093,7 @@ export default ['$state', 'moment', '$timeout', '$window', '$filter', 'Rest', 'G
};
if (d.job.id) {
if (d.unifiedJobTemplate) {
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
});
});
}
goToJobResults(d.job.type);
}
});
}