Skip to content

Commit

Permalink
chore: styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amlannandy committed Dec 19, 2024
1 parent a837500 commit 8a1558a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
24 changes: 12 additions & 12 deletions frontend/src/container/InfraMonitoringK8s/Nodes/K8sNodesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,18 @@ function K8sNodesList({
/>

{groupedByRowData?.payload?.data?.total &&
groupedByRowData?.payload?.data?.total > 10 && (
<div className="expanded-table-footer">
<Button
type="default"
size="small"
className="periscope-btn secondary"
onClick={handleExpandedRowViewAllClick}
>
View All
</Button>
</div>
)}
groupedByRowData?.payload?.data?.total > 10 ? (
<div className="expanded-table-footer">
<Button
type="default"
size="small"
className="periscope-btn secondary"
onClick={handleExpandedRowViewAllClick}
>
View All
</Button>
</div>
) : null}
</div>
)}
</div>
Expand Down
20 changes: 12 additions & 8 deletions frontend/src/container/InfraMonitoringK8s/Nodes/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tag } from 'antd';
import { Tag, Tooltip } from 'antd';
import { ColumnType } from 'antd/es/table';
import {
K8sNodesData,
Expand Down Expand Up @@ -88,7 +88,7 @@ const columnsConfig = [
dataIndex: 'nodeName',
key: 'nodeName',
ellipsis: true,
width: 150,
width: 120,
sorter: true,
align: 'left',
},
Expand All @@ -97,7 +97,7 @@ const columnsConfig = [
dataIndex: 'clusterName',
key: 'clusterName',
ellipsis: true,
width: 150,
width: 120,
sorter: true,
align: 'left',
},
Expand Down Expand Up @@ -179,14 +179,18 @@ export const formatDataForTable = (
nodeUID: node.nodeUID || '',
nodeName: (
<div className="pod-name-container">
<div className="pod-name">{node.meta.k8s_node_name || ''}</div>
<Tooltip title={node.meta.k8s_node_name}>
<div className="pod-name">{node.meta.k8s_node_name || ''}</div>
</Tooltip>
</div>
),
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,
Expand Down

0 comments on commit 8a1558a

Please sign in to comment.