Merge pull request #19 from grafana/grafana_managed_receiver_configs

Modifications for supporting migration of notification channels
This commit is contained in:
Owen Diehl
2021-03-01 14:20:56 -05:00
committed by GitHub
2 changed files with 13 additions and 2 deletions
+2
View File
@@ -157,6 +157,8 @@ type ExtendedUpsertAlertDefinitionCommand struct {
NoDataState NoDataState `json:"no_data_state" yaml:"no_data_state"`
ExecutionErrorState ExecutionErrorState `json:"exec_err_state" yaml:"exec_err_state"`
Settings map[string]interface{} `json:"settings" yaml:"settings"`
// Receivers are optional and used for migrating notification channels of existing alerts
Receivers []string `json:"receivers" yaml:"receivers"`
// internal state
FolderUID string `json:"-" yaml:"-"`
DatasourceUIDs []string `json:"-" yaml:"-"`
+11 -2
View File
@@ -1551,6 +1551,14 @@
],
"x-go-name": "NoDataState"
},
"receivers": {
"description": "Receivers are optional and used for migrating notification channels of existing alerts",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Receivers"
},
"settings": {
"type": "object",
"additionalProperties": {
@@ -2754,8 +2762,9 @@
"x-go-package": "github.com/grafana/alerting-api/pkg/api"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"type": "object",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"properties": {
"ForceQuery": {
"type": "boolean"
@@ -2788,7 +2797,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"x-go-package": "github.com/prometheus/common/config"
"x-go-package": "net/url"
},
"UpdateDashboardAclCommand": {
"type": "object",