From 134a5379f21ccfaad4c35f2891c0cbac73abb6ac Mon Sep 17 00:00:00 2001 From: Derrick Hawkins Date: Fri, 10 Nov 2023 12:50:19 -0800 Subject: [PATCH 1/2] only show link being unavailable if cluster is not provisioned. hide node count if cluster type is v cluster --- components/clusterDetails/index.tsx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/components/clusterDetails/index.tsx b/components/clusterDetails/index.tsx index c62ef0b4..aae9830f 100644 --- a/components/clusterDetails/index.tsx +++ b/components/clusterDetails/index.tsx @@ -13,7 +13,13 @@ import { import Typography from '@/components/typography'; import Column from '@/components/column'; -import { Cluster, ClusterType, DraftCluster, ManagementCluster } from '@/types/provision'; +import { + Cluster, + ClusterStatus, + ClusterType, + DraftCluster, + ManagementCluster, +} from '@/types/provision'; import StatusIndicator from '@/components/statusIndicator'; import { BISCAY, VOLCANIC_SAND } from '@/constants/colors'; import Tag from '@/components/tag'; @@ -42,10 +48,11 @@ const ClusterDetails: FunctionComponent = ({ instanceSize, environment, type, + status, gitAuth: { gitUser } = {}, } = cluster; - const [available, setAvailable] = useState(false); + const [available, setAvailable] = useState(status === ClusterStatus.PROVISIONED ?? false); useEffect(() => { setTimeout(() => setAvailable(true), 10000); @@ -122,10 +129,12 @@ const ClusterDetails: FunctionComponent = ({ Cloud region {cloudRegion} - - Number of nodes - {nodeCount} - + {type !== ClusterType.WORKLOAD_V_CLUSTER && ( + + Number of nodes + {nodeCount} + + )} {/* Fifth Row */} From d70705b64211b5e6249e87b58eca682e5ccb2e90 Mon Sep 17 00:00:00 2001 From: Derrick Hawkins Date: Fri, 10 Nov 2023 12:51:39 -0800 Subject: [PATCH 2/2] hide node count if cluster type if v cluster --- components/graphNode/index.tsx | 2 +- .../clusterForms/clusterCreation/index.tsx | 16 ++++++++-------- hooks/useQueue/queue.provider.tsx | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/components/graphNode/index.tsx b/components/graphNode/index.tsx index cb7ac24c..a8930338 100644 --- a/components/graphNode/index.tsx +++ b/components/graphNode/index.tsx @@ -93,7 +93,7 @@ export const GraphNode: FunctionComponent> = ({ {cloudRegion} )} - {nodeCount && ( + {nodeCount && type !== ClusterType.WORKLOAD_V_CLUSTER && ( NODES: {nodeCount} diff --git a/containers/clusterForms/clusterCreation/index.tsx b/containers/clusterForms/clusterCreation/index.tsx index 33088e39..2563c413 100644 --- a/containers/clusterForms/clusterCreation/index.tsx +++ b/containers/clusterForms/clusterCreation/index.tsx @@ -229,16 +229,16 @@ const ClusterCreationForm: FunctionComponent + + + )} - - - ); }; diff --git a/hooks/useQueue/queue.provider.tsx b/hooks/useQueue/queue.provider.tsx index a00613f0..a90afb6c 100644 --- a/hooks/useQueue/queue.provider.tsx +++ b/hooks/useQueue/queue.provider.tsx @@ -129,7 +129,6 @@ const QueueProvider: FunctionComponent = ({ children }) => { !queue[clusterId] && [ClusterStatus.DELETING, ClusterStatus.PROVISIONING].includes(status) ) { - console.log('should be added'); queue[clusterId] = getClusterInterval(clusterQueue[clusterId]); } });