From 06fba5b55a8566e7d4d252edc914aa7e03b04b9c Mon Sep 17 00:00:00 2001 From: AnnAngela Date: Fri, 12 May 2023 22:04:44 +0800 Subject: [PATCH 1/2] feat: show time as server timezone in dingding notification --- server/notification-providers/dingding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notification-providers/dingding.js b/server/notification-providers/dingding.js index 59efd053a..1fce30fc4 100644 --- a/server/notification-providers/dingding.js +++ b/server/notification-providers/dingding.js @@ -15,7 +15,7 @@ class DingDing extends NotificationProvider { msgtype: "markdown", markdown: { title: `[${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]}`, - text: `## [${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]} \n > ${heartbeatJSON["msg"]} \n > Time(UTC):${heartbeatJSON["time"]}`, + text: `## [${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]} \n> ${heartbeatJSON["msg"]}\n> Time(${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`, } }; if (this.sendToDingDing(notification, params)) { From ce70b3fc62636b3da489a6e33a284119dc0600f2 Mon Sep 17 00:00:00 2001 From: AnnAngela Date: Fri, 12 May 2023 22:14:59 +0800 Subject: [PATCH 2/2] feat: add a space to separate the words --- server/notification-providers/dingding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notification-providers/dingding.js b/server/notification-providers/dingding.js index 1fce30fc4..cea0b0a1e 100644 --- a/server/notification-providers/dingding.js +++ b/server/notification-providers/dingding.js @@ -15,7 +15,7 @@ class DingDing extends NotificationProvider { msgtype: "markdown", markdown: { title: `[${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]}`, - text: `## [${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]} \n> ${heartbeatJSON["msg"]}\n> Time(${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`, + text: `## [${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]} \n> ${heartbeatJSON["msg"]}\n> Time (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`, } }; if (this.sendToDingDing(notification, params)) {