dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

feat: allow hiding "All namespaces" in namespaces dropdown list

Open avanish23 opened this issue 1 year ago • 12 comments

Closes #8894 With this PR a new option is enabled in the global setting to hide the all-namespaces option in the namespaces dropdown menu in UI. Briefly explain why this is required Hides all namespace fields in the namespace selection dropbox to avoid accidental selection in large clusters and prevent OOM errors.

/kind feature

avanish23 avatar Oct 17 '24 09:10 avanish23

Welcome @avanish23!

It looks like this is your first PR to kubernetes/dashboard 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/dashboard has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Oct 17 '24 09:10 k8s-ci-robot

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 35.93%. Comparing base (4b66aa1) to head (c224e63). Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9547      +/-   ##
==========================================
- Coverage   35.94%   35.93%   -0.01%     
==========================================
  Files         301      301              
  Lines       14479    14481       +2     
  Branches      183      183              
==========================================
  Hits         5204     5204              
- Misses       9051     9053       +2     
  Partials      224      224              

codecov[bot] avatar Oct 17 '24 09:10 codecov[bot]

This feels like a hacky workaround. We are working on introducing a dynamic cache that should greatly improve responsiveness in large clusters. However, storing cached data will probably require greater memory limits.

floreks avatar Oct 17 '24 09:10 floreks

/retest

avanish23 avatar Oct 17 '24 09:10 avanish23

@avanish23: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Oct 17 '24 09:10 k8s-ci-robot

/kind feature

avanish23 avatar Oct 17 '24 09:10 avanish23

This feels like a hacky workaround. We are working on introducing a dynamic cache that should greatly improve responsiveness in large clusters. However, storing cached data will probably require greater memory limits.

Yes, I agree. This could be treated as a temporary workaround until we have the fix you are talking about. Do you have any potential issues/concerns this could bring up?

avanish23 avatar Oct 17 '24 10:10 avanish23

Ye, I don't like introducing temporary flags that will be deprecated and removed shortly after being introduced. It can be confusing. Also, we are trying to avoid container flags that directly manipulate the UI. It should probably be done in a different way. Possibly via settings.

floreks avatar Oct 17 '24 11:10 floreks

Ok, this makes sense to be using setting instead. I think it should be added as part of the global setting. Let me do it that way.

Update: I have made changes to use the settings instead of the container flags. @floreks looking for reviews. Thanks!

avanish23 avatar Oct 17 '24 11:10 avanish23

For some reason namespace switch on settings view is always set to false even after switching to true and saving. Probably the value read from settings config map is not properly propagated to it.

floreks avatar Oct 22 '24 13:10 floreks

Oh, I see. Thanks for the update @floreks, let me take a look at this.

Update: @floreks, I think I have identified the problem and fixed it. Can you please check if it works fine now?

avanish23 avatar Oct 22 '24 13:10 avanish23

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avanish23, floreks

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

The pull request process is described here

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 avatar Oct 31 '24 12:10 k8s-ci-robot