From 40150a2be840aa75537165237ee398a38e01e96a Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Thu, 8 Feb 2024 14:13:11 -0500 Subject: [PATCH] Fix UI peers_from_control_nodes (#14858) * Fix UI peers_from_control_nodes Fixes bug where peers_from_control_node was greyed out in UI. Additional changes: - Make edit instance button only show for instances with managed = False - Make remove instance button only show for instances with managed = False - InstanceList selectable only for instances with managed = False --------- Signed-off-by: Seth Foster --- .../InstanceDetail/InstanceDetail.js | 64 +++++++++---------- .../InstanceList/InstanceListItem.js | 3 +- .../screens/Instances/Shared/InstanceForm.js | 5 +- 3 files changed, 32 insertions(+), 40 deletions(-) diff --git a/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js b/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js index e1882d3a75..2716b74850 100644 --- a/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js +++ b/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js @@ -209,33 +209,31 @@ function InstanceDetail({ setBreadcrumb, isK8s }) { - {(isExecutionNode || isHopNode || !isManaged) && ( - <> - {instance.related?.install_bundle && ( - - - - } - /> - )} - - + {!isManaged && instance.related?.install_bundle && ( + + + + } + /> + )} + {(isExecutionNode || isHopNode) && ( + )} {!isHopNode && ( <> @@ -341,9 +339,8 @@ function InstanceDetail({ setBreadcrumb, isK8s }) { )} - {config?.me?.is_superuser && - isK8s && - (isExecutionNode || isHopNode || !isManaged) && ( + {config?.me?.is_superuser && isK8s && !isManaged && ( + <> - )} - {config?.me?.is_superuser && - isK8s && - (isExecutionNode || isHopNode || !isManaged) && ( - )} + + )} {isExecutionNode && (