[v10.0.x] Alerting: Add file and rule_group query params in request for filtering the res… #70417
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport e6243f7 from #70379
What is this feature?
This PR introduces some changes to the
RuleViewer
page by adding new query parameters for filtering alert rules based onfile
(namespace) andrule_group
. These additions effectively reduce the number of rules loaded on the page, resulting in improved loading times.Initially, the plan was to incorporate the new
rule_name
query parameter introduced in this PR. However, to maintain compatibility with existing links to the view and considering the absence of alert names in those links, an alternative approach was necessary.By introducing the file and rule_group query parameters, we achieve the desired improvements in loading time and enhance the overall performance of the RuleViewer page.
This is only implemented for cloud rules.
Why do we need this feature?
We need to prevent the unnecessary loading of all rules when only one rule is being accessed.
Who is this feature for?
All users.
Which issue(s) does this PR fix?:
This PR fixes partially (FE side) this issue
Special notes for your reviewer:
filterbygroupandfile.mp4
Please check that: