diff --git a/web/src/components/UploadLicenseFile.tsx b/web/src/components/UploadLicenseFile.tsx index 8992f063b2..e08cf5b829 100644 --- a/web/src/components/UploadLicenseFile.tsx +++ b/web/src/components/UploadLicenseFile.tsx @@ -261,13 +261,13 @@ const UploadLicenseFile = (props: Props) => { return; } - if (data.isConfigurable) { - navigate(`/${data.slug}/config`, { replace: true }); + if (props.isHelmVM) { + navigate(`/${data.slug}/cluster/manage`, { replace: true }); return; } - if (props.isHelmVM) { - navigate(`/${data.slug}/cluster/manage`, { replace: true }); + if (data.isConfigurable) { + navigate(`/${data.slug}/config`, { replace: true }); return; } diff --git a/web/src/components/apps/HelmVMClusterManagement.tsx b/web/src/components/apps/HelmVMClusterManagement.tsx index aa38833731..a545de0e75 100644 --- a/web/src/components/apps/HelmVMClusterManagement.tsx +++ b/web/src/components/apps/HelmVMClusterManagement.tsx @@ -65,15 +65,15 @@ const HelmVMClusterManagement = ({ kubeletVersion: string; cpu: { capacity: number; - available: number; + used: number; }; memory: { capacity: number; - available: number; + used: number; }; pods: { capacity: number; - available: number; + used: number; }; labels: string[]; conditions: { @@ -233,25 +233,20 @@ const HelmVMClusterManagement = ({ header: "Pods", size: 150, }, - { - accessorKey: "pause", - header: "Pause", - size: 100, - }, - { - accessorKey: "delete", - header: "Delete", - size: 100, - }, + // { + // accessorKey: "pause", + // header: "Pause", + // size: 100, + // }, + // { + // accessorKey: "delete", + // header: "Delete", + // size: 80, + // }, ], [] ); - const calculateUtilization = (capacity: number, available: number) => { - const used = capacity - available; - return Math.round((used / capacity) * 100); - }; - const mappedNodes = useMemo(() => { return ( nodesData?.nodes?.map((n) => ({ @@ -278,12 +273,11 @@ const HelmVMClusterManagement = ({ ), status: n.isReady ? "Ready" : "Not Ready", - cpu: `${calculateUtilization(n.cpu.capacity, n.cpu.available)}%`, - memory: `${calculateUtilization( - n.memory.capacity, - n.memory.available - )}%`, - pods: `${n.pods.capacity - n.pods.available} / ${n.pods.capacity}`, + cpu: `${n.cpu.used.toFixed(2)} / ${n.cpu.capacity.toFixed(2)}`, + memory: `${n.memory.used.toFixed(2)}GB / ${n.memory.capacity.toFixed( + 2 + )}GB`, + pods: `${n.pods.used} / ${n.pods.capacity}`, pause: ( <> @@ -300,93 +294,89 @@ const HelmVMClusterManagement = ({ // #endregion return ( -
- Cluster Nodes +
+ Cluster Nodes +
++ This page lists the nodes that are configured and shows the + status/health of each.
-- This page lists the nodes that are configured and shows the - status/health of each. + {Utilities.sessionRolesHasOneOf([rbacRoles.CLUSTER_ADMIN]) && ( + + )} +
+ Loading nodes...
- {Utilities.sessionRolesHasOneOf([rbacRoles.CLUSTER_ADMIN]) && ( - - )} -- Loading nodes... -
- )} - {!nodesData && nodesError && ( -- {nodesError?.message} -
- )} - {nodesData?.nodes && ( -{ > Cluster Nodes {" "} - / {node?.name} + / {nodeName}
- {/* Node Info */} -- Node Info -
-Name
-{node?.name}
+ + {nodeLoading && ( +Pods
-- Troubleshooting -
-- Danger Zone -
- -+ {node?.name} +
++ kubelet version +
+{node?.kubeletVersion}
++ kube-proxy version +
+{node?.kubeletVersion}
+OS
+{node?.kubeletVersion}
++ kurl version +
+{node?.kubeletVersion}
+Pods
++ Troubleshooting +
++ Danger Zone +
+ +