From 048d4dbd959dd77b43c39f0e2b95218f8c6e82cb Mon Sep 17 00:00:00 2001 From: mabashian Date: Thu, 30 Jan 2020 13:55:52 -0500 Subject: [PATCH] Fixes bug where viewing the workflow output, clicking a node to view the details of that job and then hitting the back button would result in an error and no output graph. --- awx/ui_next/src/screens/Job/Job.jsx | 83 ++++++++++++++++------------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/awx/ui_next/src/screens/Job/Job.jsx b/awx/ui_next/src/screens/Job/Job.jsx index 92018314bb..726c526c18 100644 --- a/awx/ui_next/src/screens/Job/Job.jsx +++ b/awx/ui_next/src/screens/Job/Job.jsx @@ -122,45 +122,54 @@ class Job extends Component { to="/jobs/:type/:id/output" exact /> - {job && [ - - match.params.type === 'workflow' ? ( - - ) : ( + + job && + job.type === 'workflow_job' && + } + /> + + job && + job.type === 'workflow_job' && + } + /> + {job && + job.type !== 'workflow_job' && [ + ( - ) - } - />, - - match.params.type === 'workflow' ? ( - - ) : ( + )} + />, + ( - ) - } - />, - - !hasContentLoading && ( - - - {i18n._(`View Job Details`)} - - - ) - } - />, - ]} + )} + />, + + !hasContentLoading && ( + + + {i18n._(`View Job Details`)} + + + ) + } + />, + ]}