mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
The code changes modify the notification constants and models to update the trigger patterns for tasks and nodes. Additionally, a new trigger for alerts is added to the constants. This change allows for more flexible matching of notification triggers.
22 lines
609 B
Go
22 lines
609 B
Go
package constants
|
|
|
|
const (
|
|
NotificationTriggerPatternTask = "^task"
|
|
NotificationTriggerPatternNode = "^node"
|
|
)
|
|
|
|
const (
|
|
NotificationTriggerTaskFinish = "task_finish"
|
|
NotificationTriggerTaskError = "task_error"
|
|
NotificationTriggerTaskEmptyResults = "task_empty_results"
|
|
NotificationTriggerNodeStatusChange = "node_status_change"
|
|
NotificationTriggerNodeOnline = "node_online"
|
|
NotificationTriggerNodeOffline = "node_offline"
|
|
NotificationTriggerAlert = "alert"
|
|
)
|
|
|
|
const (
|
|
NotificationTemplateModeRichText = "rich-text"
|
|
NotificationTemplateModeMarkdown = "markdown"
|
|
)
|