mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Update github.com/grafana/alerting (#64882)
This commit is contained in:
parent
998b035d52
commit
0b506b4ccc
2
go.mod
2
go.mod
@ -64,7 +64,7 @@ require (
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/google/wire v0.5.0
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/grafana/alerting v0.0.0-20230302124801-c17c23256fba
|
||||
github.com/grafana/alerting v0.0.0-20230315185333-d1e3c68ac064
|
||||
github.com/grafana/cuetsy v0.1.6
|
||||
github.com/grafana/grafana-aws-sdk v0.12.0
|
||||
github.com/grafana/grafana-azure-sdk-go v1.6.0
|
||||
|
2
go.sum
2
go.sum
@ -1258,6 +1258,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grafana/alerting v0.0.0-20230302124801-c17c23256fba h1:ScqEvk2xPpUIKE+m45meufYlLlediv7Y/hHKcotW/1o=
|
||||
github.com/grafana/alerting v0.0.0-20230302124801-c17c23256fba/go.mod h1:NoSLbfmUwE+omWFReFrLtbtOItmvTbuQERJ6XFYp9ME=
|
||||
github.com/grafana/alerting v0.0.0-20230315185333-d1e3c68ac064 h1:MtsWzSTav7NGKolO+TaJQUcyR7VY0YpUROVsJX8ktIU=
|
||||
github.com/grafana/alerting v0.0.0-20230315185333-d1e3c68ac064/go.mod h1:nHfrSTdV7/l74N5/ezqlQ+JwSvIChhN3G5+PjCfwG/E=
|
||||
github.com/grafana/codejen v0.0.3 h1:tAWxoTUuhgmEqxJPOLtJoxlPBbMULFwKFOcRsPRPXDw=
|
||||
github.com/grafana/codejen v0.0.3/go.mod h1:zmwwM/DRyQB7pfuBjTWII3CWtxcXh8LTwAYGfDfpR6s=
|
||||
github.com/grafana/cuetsy v0.1.6 h1:61QGIDy1rVABU3OkoarOn0+qPdGopIJr34PyWVmGDfs=
|
||||
|
@ -61,24 +61,12 @@ func (am *Alertmanager) TestReceivers(ctx context.Context, c apimodels.TestRecei
|
||||
for _, r := range c.Receivers {
|
||||
greceivers := make([]*alertingNotify.GrafanaReceiver, 0, len(r.GrafanaManagedReceivers))
|
||||
for _, gr := range r.PostableGrafanaReceivers.GrafanaManagedReceivers {
|
||||
var settings map[string]interface{}
|
||||
//TODO: We shouldn't need to do this marshalling.
|
||||
j, err := gr.Settings.MarshalJSON()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to marshal settings to JSON: %v", err)
|
||||
}
|
||||
|
||||
err = json.Unmarshal(j, &settings)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to marshal settings into map: %v", err)
|
||||
}
|
||||
|
||||
greceivers = append(greceivers, &alertingNotify.GrafanaReceiver{
|
||||
UID: gr.UID,
|
||||
Name: gr.Name,
|
||||
Type: gr.Type,
|
||||
DisableResolveMessage: gr.DisableResolveMessage,
|
||||
Settings: settings,
|
||||
Settings: json.RawMessage(gr.Settings),
|
||||
SecureSettings: gr.SecureSettings,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user