You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added more json fields to AlertStatus webhook notification (#4445)
* Added more json fields to webhook notifications
for AlertStatus updates:
Summary string
Details string
ServiceID string
ServiceName string
Meta map[string]string
Before these fields were only available in Alert notifications and it was not possible to send them to the user with acknowledge or close events.
* Update contribution guidelines for testing command `make test`
* Added PublicURL field to json for webhook
notification for Alart and AlartStatus
Before was that field not available and it was not possible to send them to the user with messages.
* AlertBundle Webhook sends now PublicURL as well.
* cfg.PublicURL() gets used as cfg.General.PublicURL is deprecated.
Co-authored-by: Nathaniel Caza <mastercactapus@gmail.com>
* Changed PublicURL to AlertURL
AlertURL contains the full link to the alert page, or to the alarm list of the according service if it is an alert bundle.
* Replaced function calls for URL generation
fmt.Sprintf("%s/alerts/%d", pubURL, m.AlertID)
with
cfg.CallbackURL(fmt.Sprintf("/alerts/%d", m.AlertID))
* Address review feedback: rename AlertURL to GoAlertURL and clean up
- Rename AlertURL to GoAlertURL as suggested, since the URL points to
GoAlert itself, not to anything notification-specific
- Remove unused pubURL variable (cfg.CallbackURL is used instead)
- Remove unused strings import
---------
Co-authored-by: Nathaniel Caza <mastercactapus@gmail.com>
0 commit comments