From f7f24400498bf2397fed8a411c5bf51e15439a17 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 03c3a02d..ef554830 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 55be2a3f..bb0143d0 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 f44d26fb..4df0923f 100644 --- a/resource/template/component/notification.html +++ b/resource/template/component/notification.html @@ -44,6 +44,12 @@ +
+
+ + +
+
From 2d952cb17e1ef4c01f368278b9691980e3a03e63 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 01539426..18500333 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 c7165df2e779ed7b05561f30c224bd394017b6dd 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 14bc8ac8..f843be4c 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 b280dd9b..0b4fd44a 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 4d4f13282e3c3422cd35bd71ce2fd051e013a25d 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 ef554830..93865e10 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 76f247eb866c821d18cccbd71ceb8fba02f50831 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 18500333..a8fb5096 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 bb0143d0..5f19527e 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 12638e5a..0f8774fb 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 45b402d6..d4c636cd 100644 --- a/resource/template/common/header.html +++ b/resource/template/common/header.html @@ -9,7 +9,7 @@ {{.Title}} - +