From 20a1da61c04dc6635ec700d4a14b97bf8ccc44e4 Mon Sep 17 00:00:00 2001 From: nixocio Date: Wed, 8 Jun 2022 12:06:14 -0400 Subject: [PATCH] Update project status to reflect project sync related to job template Update project status to reflect project update sync related to job template that was launched with branch override. We were displaying status of project sync itself, not from the project update job as expected. Also, rename `Project Status` to be `Project Update Status`. See: https://github.com/ansible/awx/issues/11987 --- awx/ui/src/screens/Job/Job.helptext.js | 1 + awx/ui/src/screens/Job/JobDetail/JobDetail.js | 9 ++++----- awx/ui/src/screens/Job/JobDetail/JobDetail.test.js | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/awx/ui/src/screens/Job/Job.helptext.js b/awx/ui/src/screens/Job/Job.helptext.js index b875fb90f4..d66b90b23a 100644 --- a/awx/ui/src/screens/Job/Job.helptext.js +++ b/awx/ui/src/screens/Job/Job.helptext.js @@ -18,6 +18,7 @@ const jobHelpText = { jobTags: t`Tags are useful when you have a large playbook, and you want to run a specific part of a play or task. Use commas to separate multiple tags. Refer to the documentation for details on the usage of tags.`, skipTags: t`Skip tags are useful when you have a large playbook, and you want to skip specific parts of a play or task. Use commas to separate multiple tags. Refer to the documentation for details on the usage of tags.`, sourceControlBranch: t`Select a branch for the workflow. This branch is applied to all job template nodes that prompt for a branch.`, + projectUpdate: t`Project checkout results`, forks: ( {t`The number of parallel or simultaneous processes to use while executing the playbook. An empty value, or a value less than 1 will use the Ansible default which is usually 5. The default number of forks can be overwritten with a change to`}{' '} diff --git a/awx/ui/src/screens/Job/JobDetail/JobDetail.js b/awx/ui/src/screens/Job/JobDetail/JobDetail.js index 6e97554a6e..a2079bd3be 100644 --- a/awx/ui/src/screens/Job/JobDetail/JobDetail.js +++ b/awx/ui/src/screens/Job/JobDetail/JobDetail.js @@ -168,15 +168,14 @@ function JobDetail({ job, inventorySourceLabels }) { /> - + - ) : ( - - ) + ) : null } /> diff --git a/awx/ui/src/screens/Job/JobDetail/JobDetail.test.js b/awx/ui/src/screens/Job/JobDetail/JobDetail.test.js index ed3d84bda5..9f2f8ae0e2 100644 --- a/awx/ui/src/screens/Job/JobDetail/JobDetail.test.js +++ b/awx/ui/src/screens/Job/JobDetail/JobDetail.test.js @@ -103,7 +103,9 @@ describe('', () => { const statusLabel = statusDetail.find('StatusLabel'); expect(statusLabel.prop('status')).toEqual('successful'); - const projectStatusDetail = wrapper.find('Detail[label="Project Status"]'); + const projectStatusDetail = wrapper.find( + 'Detail[label="Project Update Status"]' + ); expect(projectStatusDetail.find('StatusLabel')).toHaveLength(1); const projectStatusLabel = statusDetail.find('StatusLabel'); expect(projectStatusLabel.prop('status')).toEqual('successful');