Alerting: Add read-only GMA rules to the new list view (#98116)
* Reuse prom groups generator between GMA, external DS and list view * Improve generators, add initial support for GMA in grouped view components * Improve handling of GMA rules * Split componentes into files * Improve error handling, simplify groups grouping * Extract grafana rules component * Reset yarn.lock * Reset yarn.lock 2 * Update filters, adjust file names, add folder display name to GMA rules * Re-enable filtering for cloud rules * Rename AlertRuleLoader * Add missing translations, fix lint errors * Remove unused imports, update translations * Fix responses in BE tests * Update backend tests * Update integration test * Tidy up group page size constants * Add error throwing to getGroups endpoint to prevent grafana usage * Refactor FilterView to remove exhaustive check * Refactor common props for grafana rule rendering * Unify identifiers' discriminators, add comments, minor refactor * Update translations * Remove unnecessary prev page condition, add a few explanations --------- Co-authored-by: fayzal-g <fayzal.ghantiwala@grafana.com> Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
This commit is contained in:
co-authored by
fayzal-g
Tom Ratcliffe
parent
7f04f66137
commit
5aeaccadff
@@ -89,6 +89,8 @@ type RuleGroup struct {
|
||||
Name string `json:"name"`
|
||||
// required: true
|
||||
File string `json:"file"`
|
||||
// required: true
|
||||
FolderUID string `json:"folderUid"`
|
||||
// In order to preserve rule ordering, while exposing type (alerting or recording)
|
||||
// specific properties, both alerting and recording rules are exposed in the
|
||||
// same array.
|
||||
@@ -165,9 +167,13 @@ type AlertingRule struct {
|
||||
// adapted from cortex
|
||||
// swagger:model
|
||||
type Rule struct {
|
||||
// required: true
|
||||
UID string `json:"uid"`
|
||||
// required: true
|
||||
Name string `json:"name"`
|
||||
// required: true
|
||||
FolderUID string `json:"folderUid"`
|
||||
// required: true
|
||||
Query string `json:"query"`
|
||||
Labels promlabels.Labels `json:"labels,omitempty"`
|
||||
// required: true
|
||||
|
||||
Reference in New Issue
Block a user