feat(ui): new WorkflowNotifyNodeForm using antd

This commit is contained in:
Fu Diwei
2024-12-25 20:57:09 +08:00
parent 4d0f7c2e02
commit 6bd3b4998e
13 changed files with 168 additions and 235 deletions

View File

@@ -73,8 +73,8 @@ func buildMsg(records []domain.Certificate) *domain.NotifyMessage {
json.Unmarshal([]byte(setting.Content), &templates)
if templates != nil && len(templates.NotifyTemplates) > 0 {
subject = templates.NotifyTemplates[0].Title
message = templates.NotifyTemplates[0].Content
subject = templates.NotifyTemplates[0].Subject
message = templates.NotifyTemplates[0].Message
}
}

View File

@@ -35,11 +35,11 @@ type NotifyTemplates struct {
}
type NotifyTemplate struct {
Title string `json:"title"`
Content string `json:"content"`
Subject string `json:"subject"`
Message string `json:"message"`
}
type NotifyMessage struct {
Subject string
Message string
Subject string `json:"subject"`
Message string `json:"message"`
}

View File

@@ -41,8 +41,8 @@ func (n *notifyNode) Run(ctx context.Context) error {
return err
}
if err := notify.SendToChannel(n.node.GetConfigString("title"),
n.node.GetConfigString("content"),
if err := notify.SendToChannel(n.node.GetConfigString("subject"),
n.node.GetConfigString("message"),
n.node.GetConfigString("channel"),
channelConfig,
); err != nil {