From aa6857fd383ff2ac7fa344d52ef1e09af5c0e00e Mon Sep 17 00:00:00 2001 From: mabashian Date: Thu, 6 Feb 2020 17:04:20 -0500 Subject: [PATCH] Hide message stating that the resource has been deleted if the output node is an approval node --- .../components/Workflow/WorkflowNodeHelp.jsx | 21 ++++++++++--------- .../Workflow/WorkflowNodeHelp.test.jsx | 1 + 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx index 574610cde1..a888640f6a 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx @@ -111,16 +111,17 @@ function WorkflowNodeHelp({ node, i18n }) { return ( <> - {!node.unifiedJobTemplate && ( - <> - - - - The resource associated with this node has been deleted. - - - - )} + {!node.unifiedJobTemplate && + (!node.job || node.job.type !== 'workflow_approval') && ( + <> + + + + The resource associated with this node has been deleted. + + + + )} {node.job && (
diff --git a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx index 30980cf353..4c0c94858c 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowNodeHelp.test.jsx @@ -13,6 +13,7 @@ describe('WorkflowNodeHelp', () => { name: 'Foo Job Template', elapsed: 9000, status: 'successful', + type: 'job', }, unifiedJobTemplate: { name: 'Foo Job Template',