diff --git a/awx/api/serializers.py b/awx/api/serializers.py index dad4437bd7..4abb60d9a5 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -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, diff --git a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js index 174e3c3f11..aaa34fad04 100644 --- a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js +++ b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js @@ -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); } }); }