From 8a1558afcf6b6f4c806021ea6fd62181718bfa75 Mon Sep 17 00:00:00 2001 From: amlannandy Date: Thu, 19 Dec 2024 12:32:06 +0530 Subject: [PATCH] chore: styling changes --- .../InfraMonitoringK8s/Nodes/K8sNodesList.tsx | 24 +++++++++---------- .../InfraMonitoringK8s/Nodes/utils.tsx | 20 +++++++++------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/frontend/src/container/InfraMonitoringK8s/Nodes/K8sNodesList.tsx b/frontend/src/container/InfraMonitoringK8s/Nodes/K8sNodesList.tsx index 9bd4672a90..c6d35848de 100644 --- a/frontend/src/container/InfraMonitoringK8s/Nodes/K8sNodesList.tsx +++ b/frontend/src/container/InfraMonitoringK8s/Nodes/K8sNodesList.tsx @@ -307,18 +307,18 @@ function K8sNodesList({ /> {groupedByRowData?.payload?.data?.total && - groupedByRowData?.payload?.data?.total > 10 && ( -
- -
- )} + groupedByRowData?.payload?.data?.total > 10 ? ( +
+ +
+ ) : null} )} diff --git a/frontend/src/container/InfraMonitoringK8s/Nodes/utils.tsx b/frontend/src/container/InfraMonitoringK8s/Nodes/utils.tsx index 5485f32916..810f70fd02 100644 --- a/frontend/src/container/InfraMonitoringK8s/Nodes/utils.tsx +++ b/frontend/src/container/InfraMonitoringK8s/Nodes/utils.tsx @@ -1,4 +1,4 @@ -import { Tag } from 'antd'; +import { Tag, Tooltip } from 'antd'; import { ColumnType } from 'antd/es/table'; import { K8sNodesData, @@ -88,7 +88,7 @@ const columnsConfig = [ dataIndex: 'nodeName', key: 'nodeName', ellipsis: true, - width: 150, + width: 120, sorter: true, align: 'left', }, @@ -97,7 +97,7 @@ const columnsConfig = [ dataIndex: 'clusterName', key: 'clusterName', ellipsis: true, - width: 150, + width: 120, sorter: true, align: 'left', }, @@ -179,14 +179,18 @@ export const formatDataForTable = ( nodeUID: node.nodeUID || '', nodeName: (
-
{node.meta.k8s_node_name || ''}
+ +
{node.meta.k8s_node_name || ''}
+
), clusterName: node.meta.k8s_cluster_name, - cpuUtilization: node.nodeCPUUsage, - memoryUtilization: node.nodeMemoryUsage, - cpuAllocatable: node.nodeCPUAllocatable, - memoryAllocatable: node.nodeMemoryAllocatable, + cpuUtilization: node.nodeCPUUsage === -1 ? '-' : node.nodeCPUUsage, + memoryUtilization: node.nodeMemoryUsage === -1 ? '-' : node.nodeMemoryUsage, + cpuAllocatable: + node.nodeCPUAllocatable === -1 ? '-' : node.nodeCPUAllocatable, + memoryAllocatable: + node.nodeMemoryAllocatable === -1 ? '-' : node.nodeMemoryAllocatable, nodeGroup: getGroupByEle(node, groupBy), meta: node.meta, ...node.meta,