From 7d03da21f37741ecd4f7c548cb6727ab70c0baf0 Mon Sep 17 00:00:00 2001 From: Akkia Date: Sat, 23 Apr 2022 02:07:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0/=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=96=B9=E5=BC=8F=E6=97=B6=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=B8=8D=E5=8F=91=E9=80=81=E6=B5=8B=E8=AF=95=E4=BF=A1?= =?UTF-8?q?=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 @@ +
+
+ + +
+