Add Flashduty notification (#3475)

* feat: add FlashDuty notification channel

* refactor: #3475 nofify with Up or Down;
refactor code;
add en zh-hk zh-tw lang

* refactor: default select Info

* refactor: add space in word

* refactor the flashduty notification code

* refactor:compatible when Test flashduty nofication

* refactor: add function param description

* refactor: revert zh-hk zh-tw changes of flashduty
This commit is contained in:
Damon
2023-08-01 02:13:04 +08:00
committed by GitHub
parent ae2867e305
commit 587d9e4781
8 changed files with 140 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
<template>
<div class="mb-3">
<label for="flashduty-integration-url" class="form-label">Integration Key</label>
<HiddenInput id="flashduty-integration-url" v-model="$parent.notification.flashdutyIntegrationKey" autocomplete="false"></HiddenInput>
<i18n-t tag="div" keypath="wayToGetFlashDutyKey" class="form-text">
<a href="https://flashcat.cloud/product/flashduty?from=kuma" target="_blank">{{ $t("here") }}</a>
</i18n-t>
</div>
<div class="mb-3">
<label for="flashduty-severity" class="form-label">{{ $t("FlashDuty Severity") }}</label>
<select id="flashduty-severity" v-model="$parent.notification.flashdutySeverity" class="form-select" :required="true">
<option value="Info" selected>Info</option>
<option value="Warning" selected>Warning</option>
<option value="Critical">Critical</option>
</select>
</div>
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
export default {
components: {
HiddenInput,
},
mounted() {
}
};
</script>

View File

@@ -25,6 +25,7 @@ import Octopush from "./Octopush.vue";
import OneBot from "./OneBot.vue";
import Opsgenie from "./Opsgenie.vue";
import PagerDuty from "./PagerDuty.vue";
import FlashDuty from "./FlashDuty.vue";
import PagerTree from "./PagerTree.vue";
import PromoSMS from "./PromoSMS.vue";
import Pushbullet from "./Pushbullet.vue";
@@ -84,6 +85,7 @@ const NotificationFormList = {
"OneBot": OneBot,
"Opsgenie": Opsgenie,
"PagerDuty": PagerDuty,
"FlashDuty": FlashDuty,
"PagerTree": PagerTree,
"promosms": PromoSMS,
"pushbullet": Pushbullet,