Add job_explanation job details page

Add job_explanation job details page

See: https://github.com/ansible/awx/issues/12129
This commit is contained in:
nixocio 2022-05-17 15:35:55 -04:00
parent d55ed8713c
commit a778017efb
3 changed files with 10 additions and 2 deletions

View File

@ -194,6 +194,9 @@ function JobDetail({ job, inventorySourceLabels }) {
value={
<StatusDetailValue>
{job.status && <StatusLabel status={job.status} />}
{job.job_explanation && job.job_explanation !== job.status
? job.job_explanation
: null}
</StatusDetailValue>
}
/>

View File

@ -46,7 +46,12 @@ describe('<JobDetail />', () => {
// StatusIcon adds visibly hidden accessibility text " successful "
assertDetail('Job ID', '2');
assertDetail('Status', 'Successful');
expect(wrapper.find(`Detail[label="Status"] dd`).text()).toContain(
'Successful'
);
expect(wrapper.find(`Detail[label="Status"] dd`).text()).toContain(
'Job explanation placeholder'
);
assertDetail('Started', '8/8/2019, 7:24:18 PM');
assertDetail('Finished', '8/8/2019, 7:24:50 PM');
assertDetail('Job Template', mockJobData.summary_fields.job_template.name);

View File

@ -168,7 +168,7 @@
"ANSIBLE_SSH_CONTROL_PATH_DIR": "/tmp/awx_2_a4b1afiw/cp",
"ANSIBLE_STDOUT_CALLBACK": "awx_display"
},
"job_explanation": "",
"job_explanation": "Job explanation placeholder",
"execution_node": "awx",
"controller_node": "",
"result_traceback": "",