feat: add incoming webhook API support with configurable endpoints
- Implemented the incoming webhook API to handle alerts from external applications. - Added configuration options for webhook listening address, port, and endpoints in config.go. - Created WebhookReceiverConfig and WebhookEndpointConfig structures to manage webhook settings. - Developed WebhookHandler to process incoming requests, validate tokens, and deliver alerts to specified channels. - Enhanced existing controller interfaces to support alert delivery. - Updated message rendering to respect Markdown settings for different channels. - Added tests for webhook functionality and ensured proper error handling.
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ func ServerListHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
params := template.BuildParamsFromServerList()
|
||||
result := template.Render("", params)
|
||||
result := template.Render("", params, false)
|
||||
|
||||
utils.SendSuccessResponse(w, "", map[string]interface{}{
|
||||
"list": result,
|
||||
|
||||
Reference in New Issue
Block a user