From 548d25c9a61ed8cf00fc68a91e4d795591dca246 Mon Sep 17 00:00:00 2001 From: Akkia Date: Fri, 15 Apr 2022 10:56:04 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=89=8D=E7=AB=AF=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=96=B9=E5=BC=8F=E7=BB=84=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/static/main.js | 4 ++++ resource/template/component/cron.html | 8 ++++---- resource/template/component/monitor.html | 4 ++++ resource/template/component/notification.html | 2 +- resource/template/component/rule.html | 2 +- resource/template/dashboard/cron.html | 4 ++-- resource/template/dashboard/monitor.html | 2 ++ 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/resource/static/main.js b/resource/static/main.js index c185373..55be2a3 100644 --- a/resource/static/main.js +++ b/resource/static/main.js @@ -114,6 +114,7 @@ function addOrEditAlertRule(rule) { modal.find("input[name=ID]").val(rule ? rule.ID : null); modal.find("input[name=Name]").val(rule ? rule.Name : null); modal.find("textarea[name=RulesRaw]").val(rule ? rule.RulesRaw : null); + modal.find("input[name=NotificationTag]").val(rule ? rule.NotificationTag : null); if (rule && rule.Enable) { modal.find(".ui.rule-enable.checkbox").checkbox("set checked"); } else { @@ -134,6 +135,7 @@ function addOrEditNotification(notification) { ); modal.find("input[name=ID]").val(notification ? notification.ID : null); modal.find("input[name=Name]").val(notification ? notification.Name : null); + modal.find("input[name=Tag]").val(notification ? notification.Tag : null); modal.find("input[name=URL]").val(notification ? notification.URL : null); modal .find("textarea[name=RequestHeader]") @@ -225,6 +227,7 @@ function addOrEditMonitor(monitor) { modal.find("input[name=Duration]").val(monitor && monitor.Duration ? monitor.Duration : 30); modal.find("select[name=Type]").val(monitor ? monitor.Type : 1); modal.find("select[name=Cover]").val(monitor ? monitor.Cover : 0); + modal.find("input[name=NotificationTag]").val(monitor ? monitor.NotificationTag : null); if (monitor && monitor.Notify) { modal.find(".ui.nb-notify.checkbox").checkbox("set checked"); } else { @@ -261,6 +264,7 @@ function addOrEditCron(cron) { ); modal.find("input[name=ID]").val(cron ? cron.ID : null); modal.find("input[name=Name]").val(cron ? cron.Name : null); + modal.find("input[name=NotificationTag]").val(cron ? cron.NotificationTag : null); modal.find("input[name=Scheduler]").val(cron ? cron.Scheduler : null); modal.find("a.ui.label.visible").each((i, el) => { el.remove(); diff --git a/resource/template/component/cron.html b/resource/template/component/cron.html index 2d3ba9d..0b71952 100644 --- a/resource/template/component/cron.html +++ b/resource/template/component/cron.html @@ -32,16 +32,16 @@ +
+ + +
-
- - -

diff --git a/resource/template/component/monitor.html b/resource/template/component/monitor.html index 332cf69..98fba8a 100644 --- a/resource/template/component/monitor.html +++ b/resource/template/component/monitor.html @@ -44,6 +44,10 @@

+
+ + +
diff --git a/resource/template/component/notification.html b/resource/template/component/notification.html index 408fe78..b37d910 100644 --- a/resource/template/component/notification.html +++ b/resource/template/component/notification.html @@ -10,7 +10,7 @@
- +
diff --git a/resource/template/component/rule.html b/resource/template/component/rule.html index 02b9637..8448244 100644 --- a/resource/template/component/rule.html +++ b/resource/template/component/rule.html @@ -14,7 +14,7 @@
- +
diff --git a/resource/template/dashboard/cron.html b/resource/template/dashboard/cron.html index 78ab201..842d914 100644 --- a/resource/template/dashboard/cron.html +++ b/resource/template/dashboard/cron.html @@ -17,8 +17,8 @@ 名称 计划 命令 - 成功推送 通知方式组 + 成功推送 覆盖范围 特定服务器 最后执行 @@ -33,8 +33,8 @@ {{$cron.Name}} {{$cron.Scheduler}} {{$cron.Command}} + {{$cron.NotificationTag}} {{$cron.PushSuccessful}} - {$cron.NotificationTag} {{if eq $cron.Cover 0}}忽略所有{{else}}覆盖所有{{end}} {{$cron.ServersRaw}} {{$cron.LastExecutedAt|tf}} diff --git a/resource/template/dashboard/monitor.html b/resource/template/dashboard/monitor.html index bc69aaa..2feff3a 100644 --- a/resource/template/dashboard/monitor.html +++ b/resource/template/dashboard/monitor.html @@ -19,6 +19,7 @@ 特定服务器 类型 请求间隔 + 通知方式组 通知 管理 @@ -36,6 +37,7 @@ 2}} ICMP Ping {{else}} TCP 端口 {{end}} {{$monitor.Duration}}秒 + {{$monitor.NotificationTag}} {{$monitor.Notify}}