mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
feat: Update notification trigger patterns and add alert trigger
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.
This commit is contained in:
@@ -15,4 +15,5 @@ type NotificationAlertV2 struct {
|
||||
LastingSeconds int `json:"lasting_seconds" bson:"lasting_seconds"`
|
||||
TargetValue float32 `json:"target_value" bson:"target_value"`
|
||||
Level string `json:"level" bson:"level"`
|
||||
TemplateKey string `json:"template_key,omitempty" bson:"template_key,omitempty"`
|
||||
}
|
||||
|
||||
@@ -17,9 +17,8 @@ type NotificationSettingV2 struct {
|
||||
TemplateRichTextJson string `json:"template_rich_text_json,omitempty" bson:"template_rich_text_json,omitempty"`
|
||||
TemplateTheme string `json:"template_theme,omitempty" bson:"template_theme,omitempty"`
|
||||
|
||||
TaskTrigger string `json:"task_trigger" bson:"task_trigger"`
|
||||
TriggerTarget string `json:"trigger_target" bson:"trigger_target"`
|
||||
Trigger string `json:"trigger" bson:"trigger"`
|
||||
TaskTrigger string `json:"task_trigger" bson:"task_trigger"`
|
||||
Trigger string `json:"trigger" bson:"trigger"`
|
||||
|
||||
SenderEmail string `json:"sender_email,omitempty" bson:"sender_email,omitempty"`
|
||||
UseCustomSenderEmail bool `json:"use_custom_sender_email,omitempty" bson:"use_custom_sender_email,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user