mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
feat: Add template field to NotificationSettingV2 model
This commit is contained in:
@@ -9,6 +9,7 @@ type NotificationSettingV2 struct {
|
||||
Enabled bool `json:"enabled" bson:"enabled"`
|
||||
Global bool `json:"global" bson:"global"`
|
||||
Title string `json:"title,omitempty" bson:"title,omitempty"`
|
||||
Template string `json:"template" bson:"template"`
|
||||
TemplateMode string `json:"template_mode" bson:"template_mode"`
|
||||
TemplateMarkdown string `json:"template_markdown,omitempty" bson:"template_markdown,omitempty"`
|
||||
TemplateRichText string `json:"template_rich_text,omitempty" bson:"template_rich_text,omitempty"`
|
||||
|
||||
@@ -48,7 +48,7 @@ func (svc *ServiceV2) initData() (err error) {
|
||||
Description: "这是默认的邮件通知。您可以使用您自己的设置进行编辑。",
|
||||
TaskTrigger: constants.NotificationTriggerTaskFinish,
|
||||
Title: "[Crawlab] 爬虫任务更新: {{$.status}}",
|
||||
TemplateMarkdown: `尊敬的 {{$.user.username}},
|
||||
Template: `尊敬的 {{$.user.username}},
|
||||
|
||||
请查看下面的任务数据。
|
||||
|
||||
@@ -83,7 +83,7 @@ func (svc *ServiceV2) initData() (err error) {
|
||||
Description: "This is the default mail notification. You can edit it with your own settings",
|
||||
TaskTrigger: constants.NotificationTriggerTaskFinish,
|
||||
Title: "[Crawlab] Task Update: {{$.status}}",
|
||||
TemplateMarkdown: `Dear {{$.user.username}},
|
||||
Template: `Dear {{$.user.username}},
|
||||
|
||||
Please find the task data as below.
|
||||
|
||||
@@ -118,7 +118,7 @@ Please find the task data as below.
|
||||
Description: "这是默认的手机通知。您可以使用您自己的设置进行编辑。",
|
||||
TaskTrigger: constants.NotificationTriggerTaskFinish,
|
||||
Title: "[Crawlab] 任务更新: {{$.status}}",
|
||||
TemplateMarkdown: `尊敬的 {{$.user.username}},
|
||||
Template: `尊敬的 {{$.user.username}},
|
||||
|
||||
请查看下面的任务数据。
|
||||
|
||||
@@ -146,7 +146,7 @@ Please find the task data as below.
|
||||
Description: "This is the default mobile notification. You can edit it with your own settings",
|
||||
TaskTrigger: constants.NotificationTriggerTaskFinish,
|
||||
Title: "[Crawlab] Task Update: {{$.status}}",
|
||||
TemplateMarkdown: `Dear {{$.user.username}},
|
||||
Template: `Dear {{$.user.username}},
|
||||
|
||||
Please find the task data as below.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user