Skip to content

frontend: Add disk/storage column to nodes list view#5675

Open
aabhinavvvvvvv wants to merge 1 commit into
kubernetes-sigs:mainfrom
aabhinavvvvvvv:fix/use-watch-kube-object-lists-hooks
Open

frontend: Add disk/storage column to nodes list view#5675
aabhinavvvvvvv wants to merge 1 commit into
kubernetes-sigs:mainfrom
aabhinavvvvvvv:fix/use-watch-kube-object-lists-hooks

Conversation

@aabhinavvvvvvv
Copy link
Copy Markdown
Contributor

Summary

This PR adds a Disk column to the Nodes list view, showing ephemeral storage allocatable vs capacity as a progress bar.

Related Issue

Fixes #5607

Changes

  • Added StorageBarChart component to frontend/src/components/node/Charts.tsx
  • Added disk column to the Nodes list in frontend/src/components/node/List.tsx

Steps to Test

  1. Navigate to Cluster → Nodes
  2. Observe the new Disk column between Memory and Ready
  3. Hover over the bar to see allocatable and total capacity values

Screenshots

image

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aabhinavvvvvvv
Once this PR has been reviewed and has the lgtm label, please assign ashu8912 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 15, 2026
@k8s-ci-robot k8s-ci-robot requested review from skoeva and yolossn May 15, 2026 15:40
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 15, 2026
@aabhinavvvvvvv aabhinavvvvvvv force-pushed the fix/use-watch-kube-object-lists-hooks branch from 0cbfafb to 258207b Compare May 15, 2026 18:25
@illume illume requested a review from Copilot May 15, 2026 18:35
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes.

can you please rebase against main to remove the merge main commit?

Why this matters

Merge commits from main make the PR history harder to review. Please rebase your branch on top of the latest main instead, then update the PR with the rebased commits.

Can you please have a look at the git commits to see if they meet the contribution guidelines? We use a Linux kernel style of git commits. See the contributing guide for general context, and please see previous git commits with git log for examples.

Commits that need attention
  • frontend: Add disk/storage column to nodes list view — Only one file changed inside frontend/; add a sub-area so it's clear what was touched (e.g. frontend: ComponentName: description).
Commit guidelines
  • Use atomic commits focused on a single change.
  • Use the title format <area>: <Description of changes> — description must start with a capital letter.
  • Keep the title under 72 characters (soft requirement).
  • Explain the intention and why the change is needed.
  • Make commit titles meaningful and describe what changed.
  • Do not add code that a later commit rewrites; squash or reorder commits instead.
  • Do not include Fixes #NN in commit messages.

Good examples:

  • frontend: HomeButton: Fix so it navigates to home
  • backend: config: Add enable-dynamic-clusters flag

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Disk column to the Nodes list so users can see node ephemeral storage allocatable/capacity information alongside CPU and memory.

Changes:

  • Adds StorageBarChart for node ephemeral storage visualization.
  • Adds a Disk column to NodeList.
  • Adds new i18n keys and updates the node list story snapshot.

CI status and commit history were not available in this review context; please confirm checks pass and the PR history is linear.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/components/node/Charts.tsx Adds StorageBarChart for ephemeral storage.
frontend/src/components/node/List.tsx Adds the Disk column to the node table.
frontend/src/components/node/snapshots/List.Nodes.stories.storyshot Updates node list snapshot for the new column.
frontend/src/i18n/locales/en/translation.json Adds English Disk/storage labels.
frontend/src/i18n/locales/de/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/es/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/fr/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/hi/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/it/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/ja/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/ko/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/pt/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/ru/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/ta/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/zh/translation.json Adds fallback Disk/storage keys.
frontend/src/i18n/locales/zh-tw/translation.json Adds fallback Disk/storage keys.

Comment thread frontend/src/components/node/List.tsx Outdated
Comment thread frontend/src/components/node/Charts.tsx Outdated
Comment thread frontend/src/components/node/Charts.tsx Outdated
@aabhinavvvvvvv aabhinavvvvvvv force-pushed the fix/use-watch-kube-object-lists-hooks branch 2 times, most recently from 3f8d616 to ef00549 Compare May 15, 2026 19:46
@aabhinavvvvvvv
Copy link
Copy Markdown
Contributor Author

@illume i've squashed into single commit and resolved copilot's comments

@illume illume requested a review from Copilot May 16, 2026 10:01
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes.

Can you please have a look at the git commits to see if they meet the contribution guidelines? We use a Linux kernel style of git commits. See the contributing guide for general context, and please see previous git commits with git log for examples.

Commits that need attention
  • frontend: — Missing area: description prefix — e.g. frontend: HomeButton: Fix so it navigates to home or backend: config: Add enable-dynamic-clusters flag.
Commit guidelines
  • Use atomic commits focused on a single change.
  • Use the title format <area>: <Description of changes> — description must start with a capital letter.
  • Keep the title under 72 characters (soft requirement).
  • Explain the intention and why the change is needed.
  • Make commit titles meaningful and describe what changed.
  • Do not add code that a later commit rewrites; squash or reorder commits instead.
  • Do not include Fixes #NN in commit messages.

Good examples:

  • frontend: HomeButton: Fix so it navigates to home
  • backend: config: Add enable-dynamic-clusters flag

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

frontend/src/components/node/List.tsx:89

  • The new disk column is only covered by a snapshot where both fixture nodes render an empty disk cell (the story helper has empty/missing ephemeral storage values), so the non-zero StorageBarChart path, tooltip contents, and numeric disk sorting are not exercised. Please add node fixture data or a focused test with non-zero ephemeral-storage capacity/allocatable values.
          render: node => <StorageBarChart node={node} />,

frontend/src/components/node/Charts.tsx:107

  • Capacity is already localized in the glossary namespace (for example frontend/src/i18n/locales/es/glossary.json:237), while the newly added translation|Capacity entries are empty outside English and fall back to English. Using the translation namespace here makes this tooltip partially untranslated for non-English users; use the existing glossary key/namespace instead of duplicating the term.
        {t('translation|Allocatable')}: {allocatableInfo.value}
        {allocatableInfo.unit} / {t('translation|Capacity')}: {capacityInfo.value}
        {capacityInfo.unit} ({getPercentStr(allocatable, capacity)})

Comment thread frontend/src/components/node/List.tsx Outdated
Comment thread frontend/src/components/node/Charts.tsx Outdated
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR.

The open review comments from Copilot still need attention — can you have a look? Once addressed, please mark them as resolved.

@aabhinavvvvvvv aabhinavvvvvvv force-pushed the fix/use-watch-kube-object-lists-hooks branch from ef00549 to d12a4ea Compare May 17, 2026 14:16
@aabhinavvvvvvv
Copy link
Copy Markdown
Contributor Author

@illume I've resolved the comments and force pushed the cleaned-up single commit

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Comment thread frontend/src/components/node/Charts.tsx Outdated
Comment thread frontend/src/components/node/List.tsx
@aabhinavvvvvvv aabhinavvvvvvv force-pushed the fix/use-watch-kube-object-lists-hooks branch from d12a4ea to f7e044c Compare May 17, 2026 23:04
@aabhinavvvvvvv
Copy link
Copy Markdown
Contributor Author

@illume i've resolved copilot's comments

@illume illume requested a review from Copilot May 18, 2026 07:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Comment thread frontend/src/i18n/locales/es/translation.json
Comment thread frontend/src/i18n/locales/es/glossary.json Outdated
Comment thread frontend/src/components/node/Charts.test.tsx Outdated
@aabhinavvvvvvv aabhinavvvvvvv force-pushed the fix/use-watch-kube-object-lists-hooks branch from f7e044c to 4f1d868 Compare May 18, 2026 14:25
@illume illume requested a review from Copilot May 18, 2026 15:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.

Comment thread frontend/src/components/node/Charts.test.tsx Outdated
Comment thread frontend/src/components/node/Charts.tsx
@aabhinavvvvvvv aabhinavvvvvvv force-pushed the fix/use-watch-kube-object-lists-hooks branch from 4f1d868 to 95c9569 Compare May 18, 2026 18:12
@aabhinavvvvvvv
Copy link
Copy Markdown
Contributor Author

@illume i've resolved copilot's comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frontend: Add storage to nodes view

4 participants