-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Make "hide empty rules" persistent #15807
Make "hide empty rules" persistent #15807
Conversation
It can be a bit annoying to always press "hide empty rules". This commit uses the session storage of the browser to make it persistent. Signed-off-by: leonnicolas <[email protected]>
Thanks! Yeah, I was first thinking that this should also go into the URL like the other parameters, but it probably makes more sense to persist it in localStorage because it's likely a setting you don't want to have to change again every time you navigate to one of the rules pages anew. However, we have the same kind of situation in the Targets page, where the equivalent parameter is currently stored in the URL ( |
Done, maybe funny that we have showEmptyPools and hideEmptyGroups. Should I change |
Just like for showing empty groups on the Alerts page, also make the setting for showing empty pools on the Targets page persistent. Signed-off-by: leonnicolas <[email protected]>
d83d213
to
b3531a1
Compare
Oh right, let's do that and make it consistent. Also, I noticed one other thing that I totally missed earlier: I think these settings should not be listed in the global settings menu, as they are already controllable inline on the page itself. All the other settings in that menu are only in there because I wanted to avoid having too many UI knobs on the individual pages. And in that case, maybe these new settings shouldn't even be part of the global Settings Redux slice at all (using Redux for all this is a bit questionable anyway, I had other plans for it initially and then things got chaotic 😅), but we could just use a local prometheus/web/ui/mantine-ui/src/pages/query/ExplainViews/BinaryExpr/VectorVector.tsx Lines 331 to 334 in 0d7db90
Does that make sense? |
Signed-off-by: leonnicolas <[email protected]>
I updated the PR to use |
Signed-off-by: leonnicolas <[email protected]>
👍 Looks really nice now, thanks! :) |
It can be a bit annoying to always press "hide empty rules". This commit
uses the session storage of the browser to make it persistent.
Signed-off-by: leonnicolas [email protected]