Remove redundant queries in GetAlertRules and GetOrgAlertRules and replace with ListAlertRules (#48108)

This commit is contained in:
George Robinson
2022-04-25 11:42:42 +01:00
committed by GitHub
parent 7cfab77650
commit c5547123bc
8 changed files with 103 additions and 117 deletions
+1 -15
View File
@@ -232,6 +232,7 @@ type ListAlertRulesQuery struct {
OrgID int64
NamespaceUIDs []string
ExcludeOrgs []int64
RuleGroup string
// DashboardUID and PanelID are optional and allow filtering rules
// to return just those for a dashboard and panel.
@@ -250,21 +251,6 @@ type ListNamespaceAlertRulesQuery struct {
Result []*AlertRule
}
// GetAlertRulesQuery is the query for listing rule group alert rules
type GetAlertRulesQuery struct {
OrgID int64
// Namespace is the folder slug
NamespaceUID string
RuleGroup *string
// DashboardUID and PanelID are optional and allow filtering rules
// to return just those for a dashboard and panel.
DashboardUID string
PanelID int64
Result []*AlertRule
}
// ListRuleGroupsQuery is the query for listing unique rule groups
// across all organizations
type ListRuleGroupsQuery struct {