mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 01:16:31 -06:00
2deced7d40
* Introduce new models RoutingTree, RouteDefaults and Route and api-server to serve them that is backed by provisioning notification policy service. * update method UpdatePolicyTree of notification policy service to return route and new version * declare new actions alert.notifications.routes:read and alert.notifications.routes:write and two corresponding fixed roles. --------- Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com> Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
49 lines
924 B
CUE
49 lines
924 B
CUE
package core
|
|
|
|
route: {
|
|
kind: "RoutingTree"
|
|
group: "notifications"
|
|
apiResource: {
|
|
groupOverride: "notifications.alerting.grafana.app"
|
|
}
|
|
codegen: {
|
|
frontend: false
|
|
backend: true
|
|
}
|
|
pluralName: "RoutingTrees"
|
|
current: "v0alpha1"
|
|
versions: {
|
|
"v0alpha1": {
|
|
schema: {
|
|
#RouteDefaults: {
|
|
receiver: string
|
|
group_by?: [...string]
|
|
group_wait?: string
|
|
group_interval?: string
|
|
repeat_interval?: string
|
|
}
|
|
#Matcher: {
|
|
type: "=" |"!="|"=~"|"!~" @cuetsy(kind="enum")
|
|
label: string
|
|
value: string
|
|
}
|
|
#Route: {
|
|
receiver?: string
|
|
matchers?: [...#Matcher]
|
|
continue: bool
|
|
|
|
group_by?: [...string]
|
|
mute_time_intervals?: [...string]
|
|
routes?: [...#Route]
|
|
group_wait?: string
|
|
group_interval?: string
|
|
repeat_interval?: string
|
|
}
|
|
spec: {
|
|
defaults: #RouteDefaults
|
|
routes: [...#Route]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |