4bb6926eee
* replace PostableUserConfig with GrafanaAlertmanagerConfig to decouple from internal Grafana models * update alertmanager + tests * calculate hash of the GrafanaAlertmanagerConfig
14 lines
436 B
Go
14 lines
436 B
Go
package remote
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
|
|
"github.com/grafana/grafana/pkg/services/ngalert/remote/client"
|
|
)
|
|
|
|
func PostableUserConfigToGrafanaAlertmanagerConfig(config *definitions.PostableUserConfig) *client.GrafanaAlertmanagerConfig {
|
|
return &client.GrafanaAlertmanagerConfig{
|
|
TemplateFiles: config.TemplateFiles,
|
|
AlertmanagerConfig: config.AlertmanagerConfig,
|
|
}
|
|
}
|