Alerting: Update GetRuleGroupAlertRules to accept optional rule group (#46889)

* rename GetRuleGroupAlertRules to GetAlertRules
* make rule group optional in GetAlertRulesQuery
* simplify FakeStore. the current structure did not support optional rule group
This commit is contained in:
Yuriy Tseretyan
2022-03-23 17:36:25 +00:00
committed by GitHub
parent 562a25ad99
commit 4ee48c2e77
7 changed files with 73 additions and 130 deletions
+3 -3
View File
@@ -250,12 +250,12 @@ type ListNamespaceAlertRulesQuery struct {
Result []*AlertRule
}
// ListRuleGroupAlertRulesQuery is the query for listing rule group alert rules
type ListRuleGroupAlertRulesQuery struct {
// GetAlertRulesQuery is the query for listing rule group alert rules
type GetAlertRulesQuery struct {
OrgID int64
// Namespace is the folder slug
NamespaceUID string
RuleGroup string
RuleGroup *string
// DashboardUID and PanelID are optional and allow filtering rules
// to return just those for a dashboard and panel.