From 956cffe0733a297c94f022ee5dbaf92d9e489605 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Fri, 16 Apr 2021 15:31:08 -0400 Subject: [PATCH] Add missing details to job list expanded row section --- .../src/components/JobList/JobListItem.jsx | 97 +++++++++++++++---- 1 file changed, 77 insertions(+), 20 deletions(-) diff --git a/awx/ui_next/src/components/JobList/JobListItem.jsx b/awx/ui_next/src/components/JobList/JobListItem.jsx index 62b51a551d..73b2b713b4 100644 --- a/awx/ui_next/src/components/JobList/JobListItem.jsx +++ b/awx/ui_next/src/components/JobList/JobListItem.jsx @@ -12,6 +12,7 @@ import StatusLabel from '../StatusLabel'; import { DetailList, Detail, LaunchedByDetail } from '../DetailList'; import ChipGroup from '../ChipGroup'; import CredentialChip from '../CredentialChip'; +import ExecutionEnvironmentDetail from '../ExecutionEnvironmentDetail'; import { formatDateString } from '../../util/dates'; import { JOB_TYPE_URL_SEGMENTS } from '../../constants'; @@ -36,7 +37,16 @@ function JobListItem({ workflow_job: i18n._(t`Workflow Job`), }; - const { credentials, inventory, labels } = job.summary_fields; + const { + credentials, + execution_environment, + inventory, + job_template, + labels, + project, + source_workflow_job, + workflow_job_template, + } = job.summary_fields; return ( <> @@ -114,34 +124,39 @@ function JobListItem({ - + - {credentials && credentials.length > 0 && ( + {job_template && ( - {credentials.map(c => ( - - ))} - + + {job_template.name} + } /> )} - {labels && labels.count > 0 && ( + {workflow_job_template && ( - {labels.results.map(l => ( - - {l.name} - - ))} - + + {workflow_job_template.name} + + } + /> + )} + {source_workflow_job && ( + + {source_workflow_job.id} - {source_workflow_job.name} + } /> )} @@ -161,7 +176,49 @@ function JobListItem({ } /> )} - + {project && ( + + {project.name} + + } + dataCy={`job-${job.id}-project`} + /> + )} + + {credentials && credentials.length > 0 && ( + + {credentials.map(c => ( + + ))} + + } + /> + )} + {labels && labels.count > 0 && ( + + {labels.results.map(l => ( + + {l.name} + + ))} + + } + /> + )} {job.job_explanation && (