grafana/apps/alerting/notifications/timeInterval.cue
Yuri Tseretyan b075926202
Alerting: Time Intervals API (#88201)
* expose ngalert API to public
* add delete action to time-intervals
* introduce time-interval model generated by app-platform-sdk from CUE model the fields of the model are chosen to be compatible with the current model
* implement api server
* add feature flag alertingApiServer
---- Test Infra
* update helper to support creating custom users with enterprise permissions
* add generator for Interval model
2024-06-20 16:52:03 -04:00

37 lines
637 B
CUE

package core
timeInterval: {
kind: "TimeInterval"
group: "notifications"
apiResource: {
groupOverride: "notifications.alerting.grafana.app"
}
codegen: {
frontend: false
backend: true
}
pluralName: "TimeIntervals"
current: "v0alpha1"
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]
}
}
}
}
}