This is an automated email from the ASF dual-hosted git repository.
zhaoqingran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new 9d842a241b [bugfix] Wrong webhook alert template (#3265)
9d842a241b is described below
commit 9d842a241b9c9c84d946b2005c875471f366c73d
Author: Sherlock Yin <[email protected]>
AuthorDate: Fri Apr 18 23:48:58 2025 +0800
[bugfix] Wrong webhook alert template (#3265)
Co-authored-by: yinyijun <[email protected]>
Co-authored-by: Logic <[email protected]>
---
.../src/main/resources/templates/2-WebhookTemplate.txt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/hertzbeat-manager/src/main/resources/templates/2-WebhookTemplate.txt
b/hertzbeat-manager/src/main/resources/templates/2-WebhookTemplate.txt
index e202b2e668..163084adf5 100644
--- a/hertzbeat-manager/src/main/resources/templates/2-WebhookTemplate.txt
+++ b/hertzbeat-manager/src/main/resources/templates/2-WebhookTemplate.txt
@@ -26,13 +26,13 @@
</#if>
"triggerTimes": ${alert.triggerTimes!0},
"startAt": "${((alert.startAt!0)?number_to_datetime)?string('yyyy-MM-dd
HH:mm:ss')}",
- <#if alert.activeAt?? && alert.activeAt gt 0>,
- "activeAt":
"${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}"
+ <#if alert.activeAt?? && alert.activeAt gt 0>
+ "activeAt":
"${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}",
</#if>
- <#if alert.endAt?? && alert.endAt gt 0>,
- "endAt": "${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd
HH:mm:ss')}"
+ <#if alert.endAt?? && alert.endAt gt 0>
+ "endAt": "${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd
HH:mm:ss')}"<#if alert.annotations?? && alert.annotations?size gt 0>,</#if>
</#if>
- <#if alert.annotations?? && alert.annotations?size gt 0>,
+ <#if alert.annotations?? && alert.annotations?size gt 0>
"annotations": {
<#list alert.annotations?keys as key>
"${key}": "${alert.annotations[key]?json_string}"<#if
key?has_next>,</#if>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]