mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Fixes navigation issue and address ps issues.
This commit is contained in:
parent
32e017bd03
commit
8f6b679c85
@ -62,8 +62,8 @@ class LaunchButton extends React.Component {
|
||||
const { data: job } = await launchJob;
|
||||
history.push(
|
||||
`/${
|
||||
resource.type === 'workflow_job_template' ? 'workflow' : 'jobs'
|
||||
}/${job.id}`
|
||||
resource.type === 'workflow_job_template' ? 'jobs/workflow' : 'jobs'
|
||||
}/${job.id}/output`
|
||||
);
|
||||
} else {
|
||||
this.setState({ promptError: true });
|
||||
|
||||
@ -55,7 +55,7 @@ describe('LaunchButton', () => {
|
||||
expect(JobTemplatesAPI.readLaunch).toHaveBeenCalledWith(1);
|
||||
await sleep(0);
|
||||
expect(JobTemplatesAPI.launch).toHaveBeenCalledWith(1);
|
||||
expect(history.location.pathname).toEqual('/jobs/9000');
|
||||
expect(history.location.pathname).toEqual('/jobs/9000/output');
|
||||
});
|
||||
test('should launch the correct job type', async () => {
|
||||
WorkflowJobTemplatesAPI.readLaunch.mockResolvedValue({
|
||||
|
||||
@ -91,8 +91,7 @@ function WorkflowJobTemplateDetail({ template, i18n, webHookKey }) {
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
const canLaunch =
|
||||
summary_fields.user_capabilities && summary_fields.user_capabilities.start;
|
||||
const canLaunch = summary_fields?.user_capabilities?.start;
|
||||
const recentPlaybookJobs = summary_fields.recent_jobs.map(job => ({
|
||||
...job,
|
||||
type: 'job',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user