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

Alerting: Add pagination and improved search for notification policies #81535

Merged
merged 19 commits into from Feb 16, 2024

Conversation

soniaAguilarPeiron
Copy link
Member

@soniaAguilarPeiron soniaAguilarPeiron commented Jan 30, 2024

What is this feature?

This PR adds several improvements to the policies view.

So far, if we have a big number of policies, the UI becomes very slow in this page. The interaction in this page becomes pretty irresponsive.

With this PR we introduce several things that fix this problem and also improve the user experience when searching.

  • For each policy in the tree that exceed X number of policies, we add some pagination for its children with {numberofpoliciesHidden} additional policies button to expand the list of the branch that exceeds this X number
  • When using the filters, the UI now shows a feedback of the results indicating if there are no matches or the number of policies that match the filters.
  • When using filters, UI only show the nodes that belong to a matching path.

Why do we need this feature?

UI should support big number of policies.

Who is this feature for?

All users.

Which issue(s) does this PR fix?:

Fixes #73038

Special notes for your reviewer:

pagination.mp4

About the filter results:

filter-results.mp4

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@soniaAguilarPeiron soniaAguilarPeiron added this to the 10.4.x milestone Jan 30, 2024
@soniaAguilarPeiron soniaAguilarPeiron self-assigned this Jan 30, 2024
@soniaAguilarPeiron soniaAguilarPeiron requested a review from a team as a code owner January 30, 2024 08:01
@soniaAguilarPeiron soniaAguilarPeiron requested review from gillesdemey and konrad147 and removed request for a team January 30, 2024 08:01
@soniaAguilarPeiron soniaAguilarPeiron marked this pull request as draft January 30, 2024 08:02
@soniaAguilarPeiron soniaAguilarPeiron changed the title Alerting: add show more pagination and search feedback to policies view Alerting: Add pagination and search feedback to policies view Jan 30, 2024
@soniaAguilarPeiron soniaAguilarPeiron changed the title Alerting: Add pagination and search feedback to policies view Alerting: Add pagination and search feedback to the policies view Jan 30, 2024
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
@gillesdemey gillesdemey force-pushed the alerting/policy-view-improvements branch from 0fbeb34 to ee1a250 Compare February 15, 2024 17:54
I don't think it makes sense to allow showing fewer policies – why did the user click it in the first place if they weren't interested?
@gillesdemey gillesdemey changed the title Alerting: Add pagination and search feedback to the policies view Alerting: Add pagination and improved search for notification policies Feb 15, 2024
@gillesdemey gillesdemey force-pushed the alerting/policy-view-improvements branch from 7fddeeb to 89ea71b Compare February 15, 2024 19:21
@soniaAguilarPeiron
Copy link
Member Author

/deploy-to-hg

@ephemeral-instances-bot
Copy link

  • Preparing your instance. A comment containing your instance's url will be added to this PR when the instance is ready.
  • Your instance will be ready in ~10 minutes.
  • Check the GitHub actions tab to follow the workflow progress
  • Slack channel: #proj-ephemeral-hg-instances
  • Building instance with alerting/policy-view-improvements oss branch and main enterprise branch. How to choose a branch

@ephemeral-instances-bot

This comment was marked as off-topic.

@soniaAguilarPeiron
Copy link
Member Author

/deploy-to-hg

@grafana grafana deleted a comment from ephemeral-instances-bot bot Feb 16, 2024
@grafana grafana deleted a comment from ephemeral-instances-bot bot Feb 16, 2024
@gillesdemey
Copy link
Member

Resolved @konrad147 's questions during 🍐-programming session

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
Copy link
Contributor

@konrad147 konrad147 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gillesdemey gillesdemey merged commit 5de1743 into main Feb 16, 2024
14 checks passed
@gillesdemey gillesdemey deleted the alerting/policy-view-improvements branch February 16, 2024 16:11
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Grafana > 9.4.x: notification policies UI freezes with many policies
4 participants