mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
Do not show inventory for project update on job details
Do not show inventory for project update on job details See: https://github.com/ansible/awx/issues/12006
This commit is contained in:
parent
bea924ddc6
commit
0b7c9cd8ad
@ -92,6 +92,31 @@ function JobDetail({ job, inventorySourceLabels }) {
|
||||
<Link to={`/instance_groups/container_group/${item.id}`}>{item.name}</Link>
|
||||
);
|
||||
|
||||
const renderInventoryDetail = () => {
|
||||
if (job.type !== 'project_update') {
|
||||
return inventory ? (
|
||||
<Detail
|
||||
dataCy="job-inventory"
|
||||
label={t`Inventory`}
|
||||
value={
|
||||
<Link
|
||||
to={
|
||||
inventory.kind === 'smart'
|
||||
? `/inventories/smart_inventory/${inventory.id}`
|
||||
: `/inventories/inventory/${inventory.id}`
|
||||
}
|
||||
>
|
||||
{inventory.name}
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<DeletedDetail label={t`Inventory`} />
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
return (
|
||||
<CardBody>
|
||||
<DetailList>
|
||||
@ -159,25 +184,7 @@ function JobDetail({ job, inventorySourceLabels }) {
|
||||
value={jobTypes[job.type]}
|
||||
/>
|
||||
<LaunchedByDetail dataCy="job-launched-by" job={job} />
|
||||
{inventory ? (
|
||||
<Detail
|
||||
dataCy="job-inventory"
|
||||
label={t`Inventory`}
|
||||
value={
|
||||
<Link
|
||||
to={
|
||||
inventory.kind === 'smart'
|
||||
? `/inventories/smart_inventory/${inventory.id}`
|
||||
: `/inventories/inventory/${inventory.id}`
|
||||
}
|
||||
>
|
||||
{inventory.name}
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<DeletedDetail label={t`Inventory`} />
|
||||
)}
|
||||
{renderInventoryDetail()}
|
||||
{inventory_source && (
|
||||
<>
|
||||
<Detail
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user