|
|
@@ -53,6 +53,10 @@ func (CloudbrainStartMsg) Url(ctx *TemplateContext) string { |
|
|
|
return getCloudbrainTemplateUrl(*ctx.Cloudbrain, repo) |
|
|
|
} |
|
|
|
|
|
|
|
func (CloudbrainStartMsg) TemplateId(ctx *TemplateContext) string { |
|
|
|
return setting.CloudbrainStartedTemplateId |
|
|
|
} |
|
|
|
|
|
|
|
type CloudbrainStopMsg struct { |
|
|
|
} |
|
|
|
|
|
|
@@ -62,6 +66,7 @@ func (CloudbrainStopMsg) Data(ctx *TemplateContext) *DefaultWechatTemplate { |
|
|
|
Keyword1: TemplateValue{Value: ctx.Cloudbrain.DisplayJobName}, |
|
|
|
Keyword2: TemplateValue{Value: getJobTypeDisplayName(ctx.Cloudbrain.JobType)}, |
|
|
|
Keyword3: TemplateValue{Value: time.Unix(int64(ctx.Cloudbrain.CreatedUnix), 0).Format("2006-01-02 15:04:05")}, |
|
|
|
Keyword4: TemplateValue{Value: time.Unix(int64(ctx.Cloudbrain.EndTime), 0).Format("2006-01-02 15:04:05")}, |
|
|
|
Remark: TemplateValue{Value: setting.CloudbrainStoppedRemark}, |
|
|
|
} |
|
|
|
} |
|
|
@@ -91,6 +96,10 @@ func (CloudbrainStopMsg) Url(ctx *TemplateContext) string { |
|
|
|
return getCloudbrainTemplateUrl(*ctx.Cloudbrain, repo) |
|
|
|
} |
|
|
|
|
|
|
|
func (CloudbrainStopMsg) TemplateId(ctx *TemplateContext) string { |
|
|
|
return setting.CloudbrainStoppedTemplateId |
|
|
|
} |
|
|
|
|
|
|
|
var startMsg = &CloudbrainStartMsg{} |
|
|
|
var stopMsg = &CloudbrainStopMsg{} |
|
|
|
|
|
|
|