通知模版+任务删除优化

通知模版新增任务执行server_id,优化任务执行按钮位置,增加删除功能
This commit is contained in:
georgehao
2019-04-18 22:29:44 +08:00
parent 830d49ee1c
commit de5c751eb9
8 changed files with 42 additions and 9 deletions

View File

@@ -451,6 +451,7 @@ func (j *Job) Run() {
if title != "" {
title = strings.Replace(title, "{{TaskId}}", strconv.Itoa(j.task.Id), -1)
title = strings.Replace(title, "{{ServerId}}", strconv.Itoa(j.serverId), -1)
title = strings.Replace(title, "{{TaskName}}", j.task.TaskName, -1)
title = strings.Replace(title, "{{ExecuteCommand}}", j.task.Command, -1)
title = strings.Replace(title, "{{ExecuteTime}}", beego.Date(time.Unix(log.CreateTime, 0), "Y-m-d H:i:s"), -1)
@@ -462,6 +463,7 @@ func (j *Job) Run() {
if content != "" {
content = strings.Replace(content, "{{TaskId}}", strconv.Itoa(j.task.Id), -1)
content = strings.Replace(content, "{{ServerId}}", strconv.Itoa(j.serverId), -1)
content = strings.Replace(content, "{{TaskName}}", j.task.TaskName, -1)
content = strings.Replace(content, "{{ExecuteCommand}}", j.task.Command, -1)
content = strings.Replace(content, "{{ExecuteTime}}", beego.Date(time.Unix(log.CreateTime, 0), "Y-m-d H:i:s"), -1)