From 1512193e22f614c81019eddba123ca47a0edb7a1 Mon Sep 17 00:00:00 2001 From: naiba Date: Sat, 30 Apr 2022 21:30:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20`dashboard=20v0.13.3`=20improve?= =?UTF-8?q?=20l10n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- cmd/dashboard/controller/controller.go | 8 ++++---- resource/template/common/header.html | 2 +- resource/template/dashboard/redirect.html | 2 +- resource/template/dashboard/terminal.html | 2 +- resource/template/theme-daynight/home.html | 2 +- resource/template/theme-daynight/service.html | 2 +- resource/template/theme-daynight/viewpassword.html | 2 +- resource/template/theme-hotaru/home.html | 2 +- resource/template/theme-mdui/home.html | 2 +- resource/template/theme-mdui/service.html | 2 +- resource/template/theme-mdui/viewpassword.html | 2 +- service/singleton/singleton.go | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index f5bd37fa..049e6db6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
LOGO designed by 熊大 .

-    +   

:trollface: Nezha Monitoring self-hosted lightweight monitoring and operation and maintenance system. Supports system status, HTTP (SSL certificate change, upcoming expiration, expiration), TCP, Ping monitoring and alerting, execute scheduled tasks and web terminal.

diff --git a/cmd/dashboard/controller/controller.go b/cmd/dashboard/controller/controller.go index b718167a..8984d65d 100644 --- a/cmd/dashboard/controller/controller.go +++ b/cmd/dashboard/controller/controller.go @@ -87,7 +87,7 @@ var funcMap = template.FuncMap{ } }, "tf": func(t time.Time) string { - return t.In(singleton.Loc).Format("02/01/2006 15:04:05") + return t.In(singleton.Loc).Format("01/02/2006 15:04:05") }, "len": func(slice []interface{}) string { return strconv.Itoa(len(slice)) @@ -99,7 +99,7 @@ var funcMap = template.FuncMap{ return template.HTML(`<` + s + `>`) // #nosec }, "stf": func(s uint64) string { - return time.Unix(int64(s), 0).In(singleton.Loc).Format("02/01/2006 15:04") + return time.Unix(int64(s), 0).In(singleton.Loc).Format("01/02/2006 15:04") }, "sf": func(duration uint64) string { return time.Duration(time.Duration(duration) * time.Second).String() @@ -114,7 +114,7 @@ var funcMap = template.FuncMap{ return strings.TrimSpace(s) }, "float32f": func(f float32) string { - return fmt.Sprintf("%.2f", f) + return fmt.Sprintf("%.3f", f) }, "divU64": func(a, b uint64) float32 { if b == 0 { @@ -151,7 +151,7 @@ var funcMap = template.FuncMap{ "dayBefore": func(i int) string { year, month, day := time.Now().Date() today := time.Date(year, month, day, 0, 0, 0, 0, time.Local) - return today.AddDate(0, 0, i-29).Format("02/01") + return today.AddDate(0, 0, i-29).Format("01/02") }, "className": func(percent float32) string { if percent == 0 { diff --git a/resource/template/common/header.html b/resource/template/common/header.html index d4c636cd..13ee240c 100644 --- a/resource/template/common/header.html +++ b/resource/template/common/header.html @@ -1,6 +1,6 @@ {{define "common/header"}} - + diff --git a/resource/template/dashboard/redirect.html b/resource/template/dashboard/redirect.html index ff863486..8edb5fe3 100644 --- a/resource/template/dashboard/redirect.html +++ b/resource/template/dashboard/redirect.html @@ -1,6 +1,6 @@ {{define "dashboard/redirect"}} - + diff --git a/resource/template/dashboard/terminal.html b/resource/template/dashboard/terminal.html index c9a52f61..40cca18c 100644 --- a/resource/template/dashboard/terminal.html +++ b/resource/template/dashboard/terminal.html @@ -1,6 +1,6 @@ {{define "dashboard/terminal"}} - + diff --git a/resource/template/theme-daynight/home.html b/resource/template/theme-daynight/home.html index d3f14d8b..dd46a9dd 100644 --- a/resource/template/theme-daynight/home.html +++ b/resource/template/theme-daynight/home.html @@ -1,6 +1,6 @@ {{define "theme-daynight/home"}} - + diff --git a/resource/template/theme-daynight/service.html b/resource/template/theme-daynight/service.html index d7cb74f5..d3a5da71 100644 --- a/resource/template/theme-daynight/service.html +++ b/resource/template/theme-daynight/service.html @@ -1,7 +1,7 @@ {{define "theme-daynight/service"}} - + diff --git a/resource/template/theme-daynight/viewpassword.html b/resource/template/theme-daynight/viewpassword.html index b94d9791..e29d5b70 100644 --- a/resource/template/theme-daynight/viewpassword.html +++ b/resource/template/theme-daynight/viewpassword.html @@ -1,6 +1,6 @@ {{define "theme-daynight/viewpassword"}} - + diff --git a/resource/template/theme-hotaru/home.html b/resource/template/theme-hotaru/home.html index 54977abf..80492e58 100644 --- a/resource/template/theme-hotaru/home.html +++ b/resource/template/theme-hotaru/home.html @@ -1,6 +1,6 @@ {{define "theme-hotaru/home"}} - + diff --git a/resource/template/theme-mdui/home.html b/resource/template/theme-mdui/home.html index 08c2f191..dc7fc65c 100644 --- a/resource/template/theme-mdui/home.html +++ b/resource/template/theme-mdui/home.html @@ -1,6 +1,6 @@ {{define "theme-mdui/home"}} - + diff --git a/resource/template/theme-mdui/service.html b/resource/template/theme-mdui/service.html index 7044f937..26d609aa 100644 --- a/resource/template/theme-mdui/service.html +++ b/resource/template/theme-mdui/service.html @@ -1,6 +1,6 @@ {{define "theme-mdui/service"}} - + diff --git a/resource/template/theme-mdui/viewpassword.html b/resource/template/theme-mdui/viewpassword.html index c8084ef3..2ced9bb3 100644 --- a/resource/template/theme-mdui/viewpassword.html +++ b/resource/template/theme-mdui/viewpassword.html @@ -1,6 +1,6 @@ {{define "theme-mdui/viewpassword"}} - + diff --git a/service/singleton/singleton.go b/service/singleton/singleton.go index 6b38a67f..cd0bdddb 100644 --- a/service/singleton/singleton.go +++ b/service/singleton/singleton.go @@ -12,7 +12,7 @@ import ( "github.com/naiba/nezha/pkg/utils" ) -var Version = "v0.13.2" // !!记得修改 README 中的 badge 版本!! +var Version = "v0.13.3" // !!记得修改 README 中的 badge 版本!! var ( Conf *model.Config