Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend: k8s: Sort namespaces in UI #2692

Merged
merged 1 commit into from
Dec 17, 2024
Merged

frontend: k8s: Sort namespaces in UI #2692

merged 1 commit into from
Dec 17, 2024

Conversation

skoeva
Copy link
Contributor

@skoeva skoeva commented Dec 13, 2024

This change alphabetically sorts namespaces in the UI, addressing the case where namespace lists from k3d/k3s clusters are not sorted by default.

Fixes: #2656

Testing

  • Create a k3d cluster: k3d cluster create
  • Open the cluster in Headlamp and navigate to the "Namespaces" page
  • Ensure that all the namespaces are sorted alphabetically

image

  • Go back to the cluster home and click on the Namespace filter dropdown menu
  • Ensure that all the namespaces are sorted alphabetically

image

@skoeva skoeva added frontend Issues related to the frontend namespaces labels Dec 13, 2024
@skoeva skoeva self-assigned this Dec 13, 2024
@skoeva skoeva linked an issue Dec 13, 2024 that may be closed by this pull request
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 13, 2024
@joaquimrocha joaquimrocha requested a review from sniok December 16, 2024 15:00
Copy link
Contributor

@sniok sniok left a comment

Choose a reason for hiding this comment

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

could you please move this logic to NamespaceAutocomplete component

@skoeva skoeva changed the title frontend: k8s: Sort namespaces in useKubeObjectList frontend: k8s: Sort namespaces in UI Dec 16, 2024
This change alphabetically sorts namespaces in the UI, addressing the
case where namespace lists from k3d/k3s clusters are not sorted by
default.

Fixes: #2656

Signed-off-by: Evangelos Skopelitis <[email protected]>
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 17, 2024
Copy link
Contributor

@sniok sniok left a comment

Choose a reason for hiding this comment

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

nice, thanks!

@joaquimrocha joaquimrocha merged commit 81fb494 into main Dec 17, 2024
18 checks passed
@joaquimrocha joaquimrocha deleted the sort-namespaces branch December 17, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issues related to the frontend namespaces size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort namespaces from k3s/k3d
3 participants