Alerting: Support for imported Templates (#114196)
* refactor template service to contstruct notification template in one place, get provenance before creating and calculate resource version after. * refactor get by UID and name * introduce template kind in NotificationTemplate * introduce includeImported flag and use in the k8s api * support imported templates * add kind to template uid * tests for imported templates * update API model * set kind to default templates
This commit is contained in:
+12
-1
@@ -3783,18 +3783,29 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"title",
|
||||
"content"
|
||||
"content",
|
||||
"kind"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.alerting.notifications.pkg.apis.alertingnotifications.v0alpha1.TemplateGroupTemplateKind"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"com.github.grafana.grafana.apps.alerting.notifications.pkg.apis.alertingnotifications.v0alpha1.TemplateGroupTemplateKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"grafana",
|
||||
"mimir"
|
||||
]
|
||||
},
|
||||
"com.github.grafana.grafana.apps.alerting.notifications.pkg.apis.alertingnotifications.v0alpha1.TimeInterval": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user