Skip to content

Commit cc72799

Browse files
committed
feat: ResourceListTable - column initial size resize
1 parent 4c17d53 commit cc72799

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/components/ResourceBrowser/Constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ export const NODE_LIST_HEADERS = [
282282
'status',
283283
'roles',
284284
'errors',
285+
'cpu usage',
286+
'mem usage',
285287
'k8s version',
286288
'node group',
287289
'pods',
288290
'taints',
289-
'cpu usage',
290-
'mem usage',
291291
'age',
292292
'unschedulable',
293293
] as const

src/components/ResourceBrowser/ResourceList/utils.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,16 @@ export const getStatusClass = (status: string, isNodeListing: boolean) => {
325325

326326
export const getColumnSize = (field: string, isEventListing: boolean) => {
327327
if (!isEventListing) {
328+
if (field === 'pods' || field === 'taints' || field === 'errors') {
329+
return {
330+
range: {
331+
maxWidth: 600,
332+
minWidth: 120,
333+
startWidth: 120,
334+
},
335+
}
336+
}
337+
328338
return {
329339
range: {
330340
maxWidth: 600,

0 commit comments

Comments
 (0)