-
- {{ .Healthcheck.Name }}
-
- {{ .Healthcheck.ID }}
- {{ .Healthcheck.Slug }}
- {{ .Healthcheck.Schedule }}
- {{ .Healthcheck.WorkerGroups }}
-
- {{ .Healthcheck.Script }}
-
+
+
+
History
+
+
+
+ Status |
+ Created At |
+ Duration |
+ Note |
+
+
+
+ {{range .Healthcheck.History}}
+
+
+
+ {{ .Status }}
+
+ |
+
+ {{ .CreatedAt.Format "2006-01-02 15:04:05" }}
+ |
+
+ { .Duration }
+ |
+
+ {{ .Note }}
+ |
+
+ {{end}}
+
+
+
+
+
+
{{end}}
diff --git a/web/templates/tempaltes.go b/web/templates/tempaltes.go
index c80ec0d..c4854a3 100644
--- a/web/templates/tempaltes.go
+++ b/web/templates/tempaltes.go
@@ -4,6 +4,7 @@ import (
"embed"
"io"
"log"
+ "strings"
"text/template"
"github.com/labstack/echo/v4"
@@ -20,7 +21,13 @@ type Templates struct {
func load(files ...string) *template.Template {
files = append(files, base)
- return template.Must(template.ParseFS(templates, files...))
+
+ t := template.New("default").Funcs(
+ template.FuncMap{
+ "StringsJoin": strings.Join,
+ })
+
+ return template.Must(t.ParseFS(templates, files...))
}
func loadSettings(files ...string) *template.Template {