From fdb359a67b1a0416c9a4756590db5ea0b21b921a Mon Sep 17 00:00:00 2001 From: kialam Date: Thu, 20 Jul 2023 07:57:04 -0700 Subject: [PATCH] feature hop node topology updates (#14142) --- .../screens/Instances/Shared/InstanceForm.js | 1 + .../Instances/Shared/RemoveInstanceButton.js | 3 +- awx/ui/src/screens/TopologyView/Header.js | 14 ++ awx/ui/src/screens/TopologyView/Legend.js | 7 +- awx/ui/src/screens/TopologyView/MeshGraph.js | 168 ++++++++++-------- .../src/screens/TopologyView/TopologyView.js | 1 + awx/ui/src/screens/TopologyView/constants.js | 9 +- .../src/screens/TopologyView/utils/helpers.js | 34 ++-- .../TopologyView/utils/helpers__RTL.test.js | 2 +- 9 files changed, 144 insertions(+), 95 deletions(-) diff --git a/awx/ui/src/screens/Instances/Shared/InstanceForm.js b/awx/ui/src/screens/Instances/Shared/InstanceForm.js index c5392940bf..152c16b4fa 100644 --- a/awx/ui/src/screens/Instances/Shared/InstanceForm.js +++ b/awx/ui/src/screens/Instances/Shared/InstanceForm.js @@ -148,6 +148,7 @@ function InstanceForm({ node_state: instance.node_state || 'installed', listener_port: instance.listener_port || 27199, enabled: instance.enabled || true, + managed_by_policy: instance.managed_by_policy || true, peers_from_control_nodes: instance.peers_from_control_nodes ? true : !isEdit, diff --git a/awx/ui/src/screens/Instances/Shared/RemoveInstanceButton.js b/awx/ui/src/screens/Instances/Shared/RemoveInstanceButton.js index 9a9e382dbf..a7b276bd27 100644 --- a/awx/ui/src/screens/Instances/Shared/RemoveInstanceButton.js +++ b/awx/ui/src/screens/Instances/Shared/RemoveInstanceButton.js @@ -33,7 +33,8 @@ function RemoveInstanceButton({ itemsToRemove, onRemove, isK8s }) { const [removeDetails, setRemoveDetails] = useState(null); const [isLoading, setIsLoading] = useState(false); - const cannotRemove = (item) => !(item.node_type === 'execution' || item.node_type === 'hop'); + const cannotRemove = (item) => + !(item.node_type === 'execution' || item.node_type === 'hop'); const toggleModal = async (isOpen) => { setRemoveDetails(null); diff --git a/awx/ui/src/screens/TopologyView/Header.js b/awx/ui/src/screens/TopologyView/Header.js index 1b287023e5..475b68366a 100644 --- a/awx/ui/src/screens/TopologyView/Header.js +++ b/awx/ui/src/screens/TopologyView/Header.js @@ -16,6 +16,7 @@ import { SearchPlusIcon, ExpandArrowsAltIcon, ExpandIcon, + RedoAltIcon, } from '@patternfly/react-icons'; const Header = ({ @@ -26,6 +27,7 @@ const Header = ({ zoomOut, resetZoom, zoomFit, + refresh, showZoomControls, }) => { const { light } = PageSectionVariants; @@ -48,6 +50,18 @@ const Header = ({
+ + +