diff --git a/config/settings.dev.yml b/config/settings.dev.yml index 4b6bff5..cd550e7 100644 --- a/config/settings.dev.yml +++ b/config/settings.dev.yml @@ -14,13 +14,13 @@ settings: dbtype: mysql host: 127.0.0.1 name: ferry - password: 123456 + password: ferry@2020 port: 3306 username: ferry email: alias: ferry host: smtp.163.com - pass: your password + pass: REYVECRYOZEZIFKL port: 465 user: fdevops@163.com gorm: @@ -36,3 +36,4 @@ settings: ssl: key: keystring pem: temp/pem.pem + domain: http://192.168.0.100:9527 diff --git a/config/settings.yml b/config/settings.yml index 3521b1b..3110f4d 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -35,4 +35,5 @@ settings: gorm: logmode: 0 maxidleconn: 0 - maxopenconn: 20000 \ No newline at end of file + maxopenconn: 20000 + domain: http://192.168.0.100:9527 diff --git a/pkg/notify/send.go b/pkg/notify/send.go index 4ed5cd5..032c6e8 100644 --- a/pkg/notify/send.go +++ b/pkg/notify/send.go @@ -6,6 +6,8 @@ import ( "ferry/pkg/notify/email" "text/template" + "github.com/spf13/viper" + log "github.com/sirupsen/logrus" ) @@ -27,6 +29,7 @@ type BodyData struct { Content string // 通知的内容 Description string // 表格上面的描述信息 ProcessId int // 流程ID + Domain string // 域名地址 } func (b *BodyData) ParsingTemplate() (err error) { @@ -40,6 +43,7 @@ func (b *BodyData) ParsingTemplate() (err error) { return } + b.Domain = viper.GetString("settings.domain") err = tmpl.Execute(&buf, b) if err != nil { return diff --git a/static/scripts/echo_test-4171bc7f4a05-admin.sh b/static/scripts/echo_test-4171bc7f4a05-admin.sh new file mode 100644 index 0000000..739dc11 --- /dev/null +++ b/static/scripts/echo_test-4171bc7f4a05-admin.sh @@ -0,0 +1 @@ +echo "test" \ No newline at end of file diff --git a/static/scripts/print_hello_world-d266ee2a8029-admin.py b/static/scripts/print_hello_world-d266ee2a8029-admin.py new file mode 100644 index 0000000..4648e70 --- /dev/null +++ b/static/scripts/print_hello_world-d266ee2a8029-admin.py @@ -0,0 +1 @@ +print("Hello, World!") \ No newline at end of file diff --git a/static/template/email.html b/static/template/email.html index df810ad..d0cd9ee 100644 --- a/static/template/email.html +++ b/static/template/email.html @@ -29,7 +29,7 @@
- 点击此处跳转到工单详情 + 点击此处跳转到工单详情