mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-11 03:59:38 +08:00
[feat] Adding PagerDuty notification
This commit is contained in:
40
src/components/notifications/PagerDuty.vue
Normal file
40
src/components/notifications/PagerDuty.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<div class="mb-3">
|
||||
<label for="pagerduty-integration-key" class="form-label">{{ $t("Integration Key") }}</label>
|
||||
<HiddenInput id="pagerduty-integration-key" v-model="$parent.notification.pagerdutyIntegrationKey" :required="true" autocomplete="false"></HiddenInput>
|
||||
<i18n-t tag="div" keypath="wayToGetPagerDutyKey" class="form-text">
|
||||
<a href="https://support.pagerduty.com/docs/services-and-integrations" target="_blank">{{ $t("here") }}</a>
|
||||
</i18n-t>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="pagerduty-integration-url" class="form-label">{{ $t("Integration URL") }}</label>
|
||||
<input id="pagerduty-integration-url" v-model="$parent.notification.pagerdutyIntegrationUrl" type="text" class="form-control" autocomplete="false" value="https://events.pagerduty.com/v2/enqueue">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="pagerduty-priority" class="form-label">{{ $t("Priority") }}</label>
|
||||
<select id="pagerduty-priority" v-model="$parent.notification.pagerdutyPriority" class="form-select">
|
||||
<option value="info">{{ $t("info") }}</option>
|
||||
<option value="warning" selected="selected">{{ $t("warning") }}</option>
|
||||
<option value="error">{{ $t("error") }}</option>
|
||||
<option value="critical">{{ $t("critical") }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="pagerduty-resolve" class="form-label">{{ $t("Auto resolve or acknowledged") }}</label>
|
||||
<select id="pagerduty-resolve" v-model="$parent.notification.pagerdutyAutoResolve" class="form-select">
|
||||
<option value="0" selected="selected">{{ $t("do nothing") }}</option>
|
||||
<option value="acknowledge">{{ $t("auto acknowledged") }}</option>
|
||||
<option value="resolve">{{ $t("auto resolve") }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HiddenInput from "../HiddenInput.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
HiddenInput,
|
||||
},
|
||||
};
|
||||
</script>
|
@@ -27,6 +27,7 @@ import SerwerSMS from "./SerwerSMS.vue";
|
||||
import Stackfield from "./Stackfield.vue";
|
||||
import WeCom from "./WeCom.vue";
|
||||
import GoogleChat from "./GoogleChat.vue";
|
||||
import PagerDuty from "./PagerDuty.vue";
|
||||
import Gorush from "./Gorush.vue";
|
||||
import Alerta from "./Alerta.vue";
|
||||
import OneBot from "./OneBot.vue";
|
||||
@@ -67,6 +68,7 @@ const NotificationFormList = {
|
||||
"stackfield": Stackfield,
|
||||
"WeCom": WeCom,
|
||||
"GoogleChat": GoogleChat,
|
||||
"PagerDuty": PagerDuty,
|
||||
"gorush": Gorush,
|
||||
"alerta": Alerta,
|
||||
"OneBot": OneBot,
|
||||
|
Reference in New Issue
Block a user