[SSL证书]ACME任务中列出最后执行结果

This commit is contained in:
刘祥超
2020-11-26 17:26:26 +08:00
parent 564f137877
commit 2cf693d278
4 changed files with 39 additions and 13 deletions

View File

@@ -46,6 +46,7 @@ func (this *IndexAction) RunGet(params struct{}) {
continue
}
// 证书
var certMap maps.Map = nil
if task.SslCert != nil {
certMap = maps.Map{
@@ -56,6 +57,17 @@ func (this *IndexAction) RunGet(params struct{}) {
}
}
// 日志
var logMap maps.Map = nil
if task.LatestACMETaskLog != nil {
logMap = maps.Map{
"id": task.LatestACMETaskLog.Id,
"isOk": task.LatestACMETaskLog.IsOk,
"error": task.LatestACMETaskLog.Error,
"createdTime": timeutil.FormatTime("m-d", task.CreatedAt),
}
}
taskMaps = append(taskMaps, maps.Map{
"id": task.Id,
"acmeUser": maps.Map{
@@ -70,6 +82,7 @@ func (this *IndexAction) RunGet(params struct{}) {
"domains": task.Domains,
"autoRenew": task.AutoRenew,
"cert": certMap,
"log": logMap,
})
}
this.Data["tasks"] = taskMaps