Remove redundant queries in GetAlertRules and GetOrgAlertRules and replace with ListAlertRules (#48108)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user