From 0b7c9cd8adf619b654487702ee12adea88877004 Mon Sep 17 00:00:00 2001 From: nixocio Date: Tue, 5 Apr 2022 13:26:19 -0400 Subject: [PATCH] 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 --- awx/ui/src/screens/Job/JobDetail/JobDetail.js | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/awx/ui/src/screens/Job/JobDetail/JobDetail.js b/awx/ui/src/screens/Job/JobDetail/JobDetail.js index 76e8329bf4..8513ca8dcf 100644 --- a/awx/ui/src/screens/Job/JobDetail/JobDetail.js +++ b/awx/ui/src/screens/Job/JobDetail/JobDetail.js @@ -92,6 +92,31 @@ function JobDetail({ job, inventorySourceLabels }) { {item.name} ); + const renderInventoryDetail = () => { + if (job.type !== 'project_update') { + return inventory ? ( + + {inventory.name} + + } + /> + ) : ( + + ); + } + return null; + }; + return ( @@ -159,25 +184,7 @@ function JobDetail({ job, inventorySourceLabels }) { value={jobTypes[job.type]} /> - {inventory ? ( - - {inventory.name} - - } - /> - ) : ( - - )} + {renderInventoryDetail()} {inventory_source && ( <>