From 8943e24fe8e26dd452c7408565905c56f5ea5f7b Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Fri, 9 Feb 2024 13:47:58 +0000 Subject: [PATCH] run yarn format:fix --- .../apps/EmbeddedClusterManagement.tsx | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/web/src/components/apps/EmbeddedClusterManagement.tsx b/web/src/components/apps/EmbeddedClusterManagement.tsx index b3d17a00b2..4f2e3a996e 100644 --- a/web/src/components/apps/EmbeddedClusterManagement.tsx +++ b/web/src/components/apps/EmbeddedClusterManagement.tsx @@ -172,16 +172,6 @@ const EmbeddedClusterManagement = ({ retry: false, }); - useEffect(() => { - const nodeTypes = rolesData?.roles || NODE_TYPES; - if (nodeTypes.length === 1) { - // if there's only one node type, select it by default - setSelectedNodeTypes(nodeTypes); - } else { - setSelectedNodeTypes([]); - } - }, [rolesData]); - type AddNodeCommandResponse = { command: string; expiry: string; @@ -243,6 +233,16 @@ const EmbeddedClusterManagement = ({ // #region node type logic const NODE_TYPES = ["controller"]; + useEffect(() => { + const nodeTypes = rolesData?.roles || NODE_TYPES; + if (nodeTypes.length === 1) { + // if there's only one node type, select it by default + setSelectedNodeTypes(nodeTypes); + } else { + setSelectedNodeTypes([]); + } + }, [rolesData]); + const determineDisabledState = () => { return false; }; @@ -284,8 +284,8 @@ const EmbeddedClusterManagement = ({ > {value} - ) - } + ); + }, }, { accessorKey: "roles", @@ -307,8 +307,8 @@ const EmbeddedClusterManagement = ({ ))} - ) - } + ); + }, }, { accessorKey: "status", @@ -467,9 +467,8 @@ const EmbeddedClusterManagement = ({ />

- Select one or more roles to assign to the new node. - Copy the join command and run it on the machine you'd like - to join to the cluster. + Select one or more roles to assign to the new node. Copy the join + command and run it on the machine you'd like to join to the cluster.

{rolesLoading && (

@@ -481,7 +480,7 @@ const EmbeddedClusterManagement = ({ {rolesError?.message}

)} - {(rolesData?.roles || NODE_TYPES).length > 1 && + {(rolesData?.roles || NODE_TYPES).length > 1 && (
{(rolesData?.roles || NODE_TYPES).map((nodeType) => (
))}
- } + )}
{selectedNodeTypes.length > 0 && generateAddNodeCommandLoading && (