mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-06 05:12:33 +02:00
refactor: use for-loop to replace reduce;
flashduty support uptime kuma plugin, so rename;
This commit is contained in:
parent
6346e0db52
commit
7557073619
4 changed files with 5 additions and 9 deletions
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -99,6 +99,6 @@
|
|||
"Add New Monitor": "新增監測器",
|
||||
"Quick Stats": "綜合數據",
|
||||
"markdownSupported": "可以用 Markdown",
|
||||
"wayToGetFlashDutyKey": "您可以进入 协作空间 -> (选择一个 协作空间) -> 集成数据 -> 新增一个集成 页面,添加“自定义事件”获得一个推送地址,复制地址中的 Integration Key,更多信息前往{0}",
|
||||
"wayToGetFlashDutyKey": "您可以进入 协作空间 -> (选择一个 协作空间) -> 集成数据 -> 新增一个集成 页面,添加“Uptime Kuma”获得一个推送地址,复制地址中的 Integration Key,更多信息前往{0}",
|
||||
"FlashDuty Severity":"严重程度"
|
||||
}
|
||||
|
|
|
@ -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": "自动标记为已解决或已读",
|
||||
|
|
Loading…
Add table
Reference in a new issue