From 7d03da21f37741ecd4f7c548cb6727ab70c0baf0 Mon Sep 17 00:00:00 2001 From: Akkia Date: Sat, 23 Apr 2022 02:07:46 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0/=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=80=9A=E7=9F=A5=E6=96=B9=E5=BC=8F=E6=97=B6=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=8D=E5=8F=91=E9=80=81=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/dashboard/controller/member_api.go | 8 +++++++- resource/static/main.js | 1 + resource/template/component/notification.html | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cmd/dashboard/controller/member_api.go b/cmd/dashboard/controller/member_api.go index 03c3a02..ef55483 100644 --- a/cmd/dashboard/controller/member_api.go +++ b/cmd/dashboard/controller/member_api.go @@ -395,6 +395,7 @@ type notificationForm struct { RequestHeader string RequestBody string VerifySSL string + SkipCheck string } func (ma *memberAPI) addOrEditNotification(c *gin.Context) { @@ -416,7 +417,12 @@ func (ma *memberAPI) addOrEditNotification(c *gin.Context) { Notification: &n, Server: nil, } - err = ns.Send("这是测试消息") + // 勾选了跳过检查 + if nf.SkipCheck == "on" { + err = nil + } else { + err = ns.Send("这是测试消息") + } } if err == nil { // 保证Tag不为空 diff --git a/resource/static/main.js b/resource/static/main.js index 55be2a3..bb0143d 100644 --- a/resource/static/main.js +++ b/resource/static/main.js @@ -154,6 +154,7 @@ function addOrEditNotification(notification) { } else { modal.find(".ui.nf-ssl.checkbox").checkbox("set unchecked"); } + modal.find(".ui.nf-skip-check.checkbox").checkbox("set unchecked"); showFormModal( ".notification.modal", "#notificationForm", diff --git a/resource/template/component/notification.html b/resource/template/component/notification.html index f44d26f..4df0923 100644 --- a/resource/template/component/notification.html +++ b/resource/template/component/notification.html @@ -44,6 +44,12 @@ +
+
+ + +
+
From 260a9cfe91afc6c8e2eef152d8f4c3c8158a418a Mon Sep 17 00:00:00 2001 From: Akkia Date: Sat, 23 Apr 2022 02:49:45 +0800 Subject: [PATCH 2/5] =?UTF-8?q?update:=20=E8=A1=A8=E6=A0=BC=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/static/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resource/static/main.css b/resource/static/main.css index 0153942..1850033 100644 --- a/resource/static/main.css +++ b/resource/static/main.css @@ -4,6 +4,10 @@ } } +td { + word-wrap: break-word; + word-break: break-all; +} .nb-container { padding-top: 75px; min-height: 100vh; From 036701ae712e3376aafe9e7e69e73e629a105e12 Mon Sep 17 00:00:00 2001 From: naiba Date: Sat, 23 Apr 2022 09:51:24 +0800 Subject: [PATCH 3/5] dashboard v0.12.23 --- README.md | 2 +- service/singleton/singleton.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14bc8ac..f843be4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
LOGO designed by 熊大 .

-    +   

:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,计划任务和在线终端。

diff --git a/service/singleton/singleton.go b/service/singleton/singleton.go index b280dd9..0b4fd44 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.12.22" // !!记得修改 README 中的 badge 版本!! +var Version = "v0.12.23" // !!记得修改 README 中的 badge 版本!! var ( Conf *model.Config From 892a147b5aa93322f91ad21462e7e8ba1220f7d0 Mon Sep 17 00:00:00 2001 From: Akkia Date: Sat, 23 Apr 2022 14:46:33 +0800 Subject: [PATCH 4/5] Update cmd/dashboard/controller/member_api.go Co-authored-by: naiba --- cmd/dashboard/controller/member_api.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/dashboard/controller/member_api.go b/cmd/dashboard/controller/member_api.go index ef55483..93865e1 100644 --- a/cmd/dashboard/controller/member_api.go +++ b/cmd/dashboard/controller/member_api.go @@ -418,9 +418,7 @@ func (ma *memberAPI) addOrEditNotification(c *gin.Context) { Server: nil, } // 勾选了跳过检查 - if nf.SkipCheck == "on" { - err = nil - } else { + if nf.SkipCheck != "on" { err = ns.Send("这是测试消息") } } From 1dde83982660c655b2badb97d63cbb9caa566a98 Mon Sep 17 00:00:00 2001 From: Akkia Date: Sat, 23 Apr 2022 14:51:10 +0800 Subject: [PATCH 5/5] =?UTF-8?q?update:=20=E6=A0=BC=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/static/main.css | 1 + resource/static/main.js | 2 +- resource/template/common/footer.html | 2 +- resource/template/common/header.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resource/static/main.css b/resource/static/main.css index 1850033..a8fb509 100644 --- a/resource/static/main.css +++ b/resource/static/main.css @@ -8,6 +8,7 @@ td { word-wrap: break-word; word-break: break-all; } + .nb-container { padding-top: 75px; min-height: 100vh; diff --git a/resource/static/main.js b/resource/static/main.js index bb0143d..5f19527 100644 --- a/resource/static/main.js +++ b/resource/static/main.js @@ -154,7 +154,7 @@ function addOrEditNotification(notification) { } else { modal.find(".ui.nf-ssl.checkbox").checkbox("set unchecked"); } - modal.find(".ui.nf-skip-check.checkbox").checkbox("set unchecked"); + modal.find(".ui.nf-skip-check.checkbox").checkbox("set unchecked"); showFormModal( ".notification.modal", "#notificationForm", diff --git a/resource/template/common/footer.html b/resource/template/common/footer.html index 12638e5..0f8774f 100644 --- a/resource/template/common/footer.html +++ b/resource/template/common/footer.html @@ -9,7 +9,7 @@ - + diff --git a/resource/template/common/header.html b/resource/template/common/header.html index 45b402d..d4c636c 100644 --- a/resource/template/common/header.html +++ b/resource/template/common/header.html @@ -9,7 +9,7 @@ {{.Title}} - +