mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-01 11:22:34 +02:00
Merge 336dac5f25
into 839ead80cc
This commit is contained in:
commit
ff74dc705e
3 changed files with 10 additions and 6 deletions
|
@ -73,13 +73,13 @@ class FlashDuty extends NotificationProvider {
|
||||||
}
|
}
|
||||||
const options = {
|
const options = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "https://api.flashcat.cloud/event/push/alert/standard?integration_key=" + notification.flashdutyIntegrationKey,
|
url: notification.flashdutyIntegrationKey.startsWith("http") ? notification.flashdutyIntegrationKey : "https://api.flashcat.cloud/event/push/alert/standard?integration_key=" + notification.flashdutyIntegrationKey,
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
data: {
|
data: {
|
||||||
description: `[${title}] [${monitorInfo.name}] ${body}`,
|
description: `[${title}] [${monitorInfo.name}] ${body}`,
|
||||||
title,
|
title,
|
||||||
event_status: eventStatus || "Info",
|
event_status: eventStatus || "Info",
|
||||||
alert_key: String(monitorInfo.id) || Math.random().toString(36).substring(7),
|
alert_key: monitorInfo.id ? String(monitorInfo.id) : Math.random().toString(36).substring(7),
|
||||||
labels,
|
labels,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="flashduty-integration-url" class="form-label">Integration Key</label>
|
<label for="flashduty-integration-url" class="form-label">{{ $t("FlashDuty Push URL") }} <span style="color: red;"><sup>*</sup></span></label>
|
||||||
<HiddenInput id="flashduty-integration-url" v-model="$parent.notification.flashdutyIntegrationKey" autocomplete="false"></HiddenInput>
|
<HiddenInput id="flashduty-integration-url" v-model="$parent.notification.flashdutyIntegrationKey" autocomplete="false" :placeholder="$t('FlashDuty Push URL Placeholder')" />
|
||||||
|
<div class="form-text">
|
||||||
|
<p><span style="color: red;"><sup>*</sup></span>{{ $t("Required") }}</p>
|
||||||
|
</div>
|
||||||
<i18n-t tag="div" keypath="wayToGetFlashDutyKey" class="form-text">
|
<i18n-t tag="div" keypath="wayToGetFlashDutyKey" class="form-text">
|
||||||
<a href="https://flashcat.cloud/product/flashduty?from=kuma" target="_blank">{{ $t("here") }}</a>
|
<a href="https://flashcat.cloud/product/flashduty?from=kuma" target="_blank">{{ $t("here") }}</a>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
|
@ -18,7 +21,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import HiddenInput from "../HiddenInput.vue";
|
import HiddenInput from "../HiddenInput.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
HiddenInput,
|
HiddenInput,
|
||||||
|
|
|
@ -895,8 +895,10 @@
|
||||||
"noGroupMonitorMsg": "Not Available. Create a Group Monitor First.",
|
"noGroupMonitorMsg": "Not Available. Create a Group Monitor First.",
|
||||||
"Close": "Close",
|
"Close": "Close",
|
||||||
"Request Body": "Request Body",
|
"Request Body": "Request Body",
|
||||||
"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",
|
"wayToGetFlashDutyKey": "To integrate Uptime Kuma with Flashduty: Go to Channels > Select a channel > Integrations > Add a new integration, choose Uptime Kuma, and copy the Push URL.",
|
||||||
"FlashDuty Severity": "Severity",
|
"FlashDuty Severity": "Severity",
|
||||||
|
"FlashDuty Push URL": "Push URL",
|
||||||
|
"FlashDuty Push URL Placeholder": "Copy from the alerting integration page",
|
||||||
"nostrRelays": "Nostr relays",
|
"nostrRelays": "Nostr relays",
|
||||||
"nostrRelaysHelp": "One relay URL per line",
|
"nostrRelaysHelp": "One relay URL per line",
|
||||||
"nostrSender": "Sender Private Key (nsec)",
|
"nostrSender": "Sender Private Key (nsec)",
|
||||||
|
|
Loading…
Add table
Reference in a new issue