Merge pull request #11885 from marshmalien/11729-job-details-deleted-text

Add deleted details to job detail view
This commit is contained in:
Sarah Akus 2022-03-14 10:14:08 -04:00 committed by GitHub
commit 30a39e1d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ import styled from 'styled-components';
import { useConfig } from 'contexts/Config';
import AlertModal from 'components/AlertModal';
import {
DeletedDetail,
DetailList,
Detail,
UserDateDetail,
@ -158,7 +159,7 @@ function JobDetail({ job, inventorySourceLabels }) {
value={jobTypes[job.type]}
/>
<LaunchedByDetail dataCy="job-launched-by" job={job} />
{inventory && (
{inventory ? (
<Detail
dataCy="job-inventory"
label={t`Inventory`}
@ -174,6 +175,8 @@ function JobDetail({ job, inventorySourceLabels }) {
</Link>
}
/>
) : (
<DeletedDetail label={t`Inventory`} />
)}
{inventory_source && (
<>
@ -215,7 +218,7 @@ function JobDetail({ job, inventorySourceLabels }) {
}
/>
)}
{project && (
{project ? (
<>
<Detail
dataCy="job-project"
@ -236,6 +239,8 @@ function JobDetail({ job, inventorySourceLabels }) {
}
/>
</>
) : (
<DeletedDetail label={t`Project`} />
)}
{scmBranch && (
<Detail