Add a link to a graph image in Pushover notifications (#8075)

This commit is contained in:
Alfred Krohmer
2017-04-10 09:17:37 +02:00
committed by Torkel Ödegaard
parent efca9e904d
commit 41171f8a5c

View File

@@ -139,8 +139,12 @@ func (this *PushoverNotifier) Notify(evalContext *alerting.EvalContext) error {
}
}
if evalContext.Error != nil {
message += fmt.Sprintf("\n<b>Error message</b> %s", evalContext.Error.Error())
message += fmt.Sprintf("\n<b>Error message:</b> %s", evalContext.Error.Error())
}
if evalContext.ImagePublicUrl != "" {
message += fmt.Sprintf("\n<a href=\"%s\">Show graph image</a>", evalContext.ImagePublicUrl)
}
q := url.Values{}
q.Add("user", this.UserKey)
q.Add("token", this.ApiToken)