Alerting: Update alerting cue definitions (#104053)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
co-authored by
Yuri Tseretyan
parent
8d883ecda1
commit
c174c855c3
@@ -1 +1,4 @@
|
||||
module: "github.com/grafana/grafana/apps/alerting/notifications/kinds"
|
||||
module: "github.com/grafana/grafana/apps/alerting/notifications/kinds"
|
||||
language: {
|
||||
version: "v0.9.0"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package kinds
|
||||
|
||||
manifest: {
|
||||
appName: "alerting"
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
kinds: [
|
||||
receiver,
|
||||
routeTree,
|
||||
templateGroup,
|
||||
timeInterval,
|
||||
]
|
||||
}
|
||||
@@ -1,36 +1,27 @@
|
||||
package core
|
||||
package kinds
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/kinds/v0alpha1"
|
||||
)
|
||||
|
||||
receiver: {
|
||||
kind: "Receiver"
|
||||
group: "notifications"
|
||||
kind: "Receiver"
|
||||
apiResource: {
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "Receivers"
|
||||
current: "v0alpha1"
|
||||
codegen: {
|
||||
ts: {enabled: false}
|
||||
go: {enabled: true}
|
||||
}
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
schema: {
|
||||
#Integration: {
|
||||
uid?: string
|
||||
type: string
|
||||
disableResolveMessage?: bool
|
||||
settings: {
|
||||
[string]: _
|
||||
}
|
||||
secureFields?: [string]: bool
|
||||
}
|
||||
spec: {
|
||||
title: string
|
||||
integrations : [...#Integration]
|
||||
}
|
||||
spec: v0alpha1.ReceiverSpec
|
||||
}
|
||||
selectableFields: [
|
||||
"spec.title",
|
||||
"spec.title",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +1,25 @@
|
||||
package core
|
||||
package kinds
|
||||
|
||||
route: {
|
||||
kind: "RoutingTree"
|
||||
group: "notifications"
|
||||
import (
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/kinds/v0alpha1"
|
||||
)
|
||||
|
||||
routeTree: {
|
||||
kind: "RoutingTree"
|
||||
apiResource: {
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "RoutingTrees"
|
||||
current: "v0alpha1"
|
||||
codegen: {
|
||||
ts: {enabled: false}
|
||||
go: {enabled: true}
|
||||
}
|
||||
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]
|
||||
}
|
||||
spec: v0alpha1.RouteTreeSpec
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
package core
|
||||
package kinds
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/kinds/v0alpha1"
|
||||
)
|
||||
|
||||
templateGroup: {
|
||||
kind: "TemplateGroup"
|
||||
group: "notifications"
|
||||
kind: "TemplateGroup"
|
||||
apiResource: {
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "TemplateGroups"
|
||||
current: "v0alpha1"
|
||||
codegen: {
|
||||
ts: {enabled: false}
|
||||
go: {enabled: true}
|
||||
}
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
schema: {
|
||||
spec: {
|
||||
title: string
|
||||
content: string
|
||||
}
|
||||
spec: v0alpha1.TemplateGroupSpec
|
||||
}
|
||||
selectableFields: [
|
||||
"spec.title",
|
||||
"spec.title",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,40 +1,28 @@
|
||||
package core
|
||||
package kinds
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/kinds/v0alpha1"
|
||||
)
|
||||
|
||||
timeInterval: {
|
||||
kind: "TimeInterval"
|
||||
group: "notifications"
|
||||
kind: "TimeInterval"
|
||||
apiResource: {
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "TimeIntervals"
|
||||
current: "v0alpha1"
|
||||
codegen: {
|
||||
ts: {enabled: false}
|
||||
go: {enabled: true}
|
||||
}
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
schema: {
|
||||
#TimeRange: {
|
||||
start_time: string
|
||||
end_time: string
|
||||
}
|
||||
#Interval: {
|
||||
times?: [...#TimeRange]
|
||||
weekdays?: [...string]
|
||||
days_of_month?: [...string]
|
||||
months?: [...string]
|
||||
years?: [...string]
|
||||
location?: string
|
||||
}
|
||||
spec: {
|
||||
name: string
|
||||
time_intervals: [...#Interval]
|
||||
}
|
||||
spec: v0alpha1.TimeIntervalSpec
|
||||
}
|
||||
selectableFields: [
|
||||
"spec.name",
|
||||
"spec.name",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package v0alpha1
|
||||
|
||||
ReceiverSpec: {
|
||||
title: string
|
||||
integrations: [...#Integration]
|
||||
}
|
||||
|
||||
#Integration: {
|
||||
uid?: string
|
||||
type: string
|
||||
disableResolveMessage?: bool
|
||||
settings: {
|
||||
[string]: _
|
||||
}
|
||||
secureFields?: [string]: bool
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package v0alpha1
|
||||
|
||||
RouteTreeSpec: {
|
||||
defaults: #RouteDefaults
|
||||
routes: [...#Route]
|
||||
}
|
||||
|
||||
#RouteDefaults: {
|
||||
receiver: string
|
||||
group_by?: [...string]
|
||||
group_wait?: string
|
||||
group_interval?: string
|
||||
repeat_interval?: string
|
||||
}
|
||||
|
||||
#Matcher: {
|
||||
type: "=" | "!=" | "=~" | "!~" @cuetsy(kind="enum",memberNames="Equal|NotEqual|EqualRegex|NotEqualRegex")
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package v0alpha1
|
||||
|
||||
TemplateGroupSpec: {
|
||||
title: string
|
||||
content: string
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package v0alpha1
|
||||
|
||||
TimeIntervalSpec: {
|
||||
name: string
|
||||
time_intervals: [...#Interval]
|
||||
}
|
||||
|
||||
#TimeRange: {
|
||||
start_time: string
|
||||
end_time: string
|
||||
}
|
||||
#Interval: {
|
||||
times?: [...#TimeRange]
|
||||
weekdays?: [...string]
|
||||
days_of_month?: [...string]
|
||||
months?: [...string]
|
||||
years?: [...string]
|
||||
location?: string
|
||||
}
|
||||
Reference in New Issue
Block a user