diff --git a/server/notification-providers/flashduty.js b/server/notification-providers/flashduty.js index 77638798e..952d0a2f1 100644 --- a/server/notification-providers/flashduty.js +++ b/server/notification-providers/flashduty.js @@ -63,12 +63,8 @@ class FlashDuty extends NotificationProvider { resource: this.genMonitorUrl(monitorInfo), check: monitorInfo.name, }; - if (monitorInfo?.tags?.length > 0) { - labels = monitorInfo?.tags?.reduce( - (acc, item) => ({ ...acc, - [item.name]: item.value }), - labels - ); + for (let tag of monitorInfo.tags) { + labels[tag.name] = tag.value; } const options = { method: "POST", diff --git a/src/lang/en.json b/src/lang/en.json index 155b9c140..a9f602153 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -797,7 +797,7 @@ "noGroupMonitorMsg": "Not Available. Create a Group Monitor First.", "Close": "Close", "Request Body": "Request Body", - "wayToGetFlashDutyKey":"You can go to Channel -> (Select a Channel) -> Integrations -> Add a new integration' page, add a 'Custom Event' to get a push address, copy the Integration Key in the address. For more information, please visit", + "wayToGetFlashDutyKey":"You can go to Channel -> (Select a Channel) -> Integrations -> Add a new integration' page, add a 'Uptime Kuma' to get a push address, copy the Integration Key in the address. For more information, please visit", "FlashDuty Severity":"Severity", "nostrRelays": "Nostr relays", "nostrRelaysHelp": "One relay URL per line", diff --git a/src/lang/yue.json b/src/lang/yue.json index 991c9b7b7..63b0b233d 100644 --- a/src/lang/yue.json +++ b/src/lang/yue.json @@ -99,6 +99,6 @@ "Add New Monitor": "新增監測器", "Quick Stats": "綜合數據", "markdownSupported": "可以用 Markdown", - "wayToGetFlashDutyKey": "您可以进入 协作空间 -> (选择一个 协作空间) -> 集成数据 -> 新增一个集成 页面,添加“自定义事件”获得一个推送地址,复制地址中的 Integration Key,更多信息前往{0}", + "wayToGetFlashDutyKey": "您可以进入 协作空间 -> (选择一个 协作空间) -> 集成数据 -> 新增一个集成 页面,添加“Uptime Kuma”获得一个推送地址,复制地址中的 Integration Key,更多信息前往{0}", "FlashDuty Severity":"严重程度" } diff --git a/src/lang/zh-CN.json b/src/lang/zh-CN.json index 65ffcccd7..45bc10d89 100644 --- a/src/lang/zh-CN.json +++ b/src/lang/zh-CN.json @@ -413,7 +413,7 @@ "smtpDkimheaderFieldNames": "包含在哈希计算对象内的 Header 列表(可选)", "smtpDkimskipFields": "不包含在哈希计算对象内的 Header 列表(可选)", "wayToGetPagerDutyKey": "您可以在 Service -> Service Directory -> (选择一个 Service) -> Integrations -> Add integration 页面中搜索“Events API V2”以获取此 Integration Key,更多信息请看{0}", - "wayToGetFlashDutyKey": "您可以进入 协作空间 -> (选择一个 协作空间) -> 集成数据 -> 新增一个集成 页面,添加“自定义事件”获得一个推送地址,复制地址中的 Integration Key,更多信息前往{0}", + "wayToGetFlashDutyKey": "您可以进入 协作空间 -> (选择一个 协作空间) -> 集成数据 -> 新增一个集成 页面,添加“Uptime Kuma”获得一个推送地址,复制地址中的 Integration Key,更多信息前往{0}", "Integration Key": "集成密钥", "Integration URL": "集成网址", "Auto resolve or acknowledged": "自动标记为已解决或已读",