mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
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.
This commit is contained in:
parent
c70e5357d3
commit
048d4dbd95
@ -122,45 +122,54 @@ class Job extends Component {
|
||||
to="/jobs/:type/:id/output"
|
||||
exact
|
||||
/>
|
||||
{job && [
|
||||
<Route
|
||||
key="details"
|
||||
path="/jobs/:type/:id/details"
|
||||
render={() =>
|
||||
match.params.type === 'workflow' ? (
|
||||
<WorkflowDetail job={job} />
|
||||
) : (
|
||||
<Route
|
||||
key="details"
|
||||
path="/jobs/workflow/:id/details"
|
||||
render={() =>
|
||||
job &&
|
||||
job.type === 'workflow_job' && <WorkflowDetail job={job} />
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
key="output"
|
||||
path="/jobs/workflow/:id/output"
|
||||
render={() =>
|
||||
job &&
|
||||
job.type === 'workflow_job' && <WorkflowOutput job={job} />
|
||||
}
|
||||
/>
|
||||
{job &&
|
||||
job.type !== 'workflow_job' && [
|
||||
<Route
|
||||
key="details"
|
||||
path="/jobs/:type/:id/details"
|
||||
render={() => (
|
||||
<JobDetail type={match.params.type} job={job} />
|
||||
)
|
||||
}
|
||||
/>,
|
||||
<Route
|
||||
key="output"
|
||||
path="/jobs/:type/:id/output"
|
||||
render={() =>
|
||||
match.params.type === 'workflow' ? (
|
||||
<WorkflowOutput job={job} />
|
||||
) : (
|
||||
)}
|
||||
/>,
|
||||
<Route
|
||||
key="output"
|
||||
path="/jobs/:type/:id/output"
|
||||
render={() => (
|
||||
<JobOutput type={match.params.type} job={job} />
|
||||
)
|
||||
}
|
||||
/>,
|
||||
<Route
|
||||
key="not-found"
|
||||
path="*"
|
||||
render={() =>
|
||||
!hasContentLoading && (
|
||||
<ContentError isNotFound>
|
||||
<Link
|
||||
to={`/jobs/${match.params.type}/${match.params.id}/details`}
|
||||
>
|
||||
{i18n._(`View Job Details`)}
|
||||
</Link>
|
||||
</ContentError>
|
||||
)
|
||||
}
|
||||
/>,
|
||||
]}
|
||||
)}
|
||||
/>,
|
||||
<Route
|
||||
key="not-found"
|
||||
path="*"
|
||||
render={() =>
|
||||
!hasContentLoading && (
|
||||
<ContentError isNotFound>
|
||||
<Link
|
||||
to={`/jobs/${match.params.type}/${match.params.id}/details`}
|
||||
>
|
||||
{i18n._(`View Job Details`)}
|
||||
</Link>
|
||||
</ContentError>
|
||||
)
|
||||
}
|
||||
/>,
|
||||
]}
|
||||
</Switch>
|
||||
</Card>
|
||||
</PageSection>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user