mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-10 19:41:00 +08:00
Add Heii On-Call
This commit is contained in:
@@ -1,62 +1,132 @@
|
||||
<template>
|
||||
<form @submit.prevent="submit">
|
||||
<div ref="modal" class="modal fade" tabindex="-1" data-bs-backdrop="static">
|
||||
<div
|
||||
ref="modal"
|
||||
class="modal fade"
|
||||
tabindex="-1"
|
||||
data-bs-backdrop="static"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 id="exampleModalLabel" class="modal-title">
|
||||
{{ $t("Setup Notification") }}
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
|
||||
<button
|
||||
type="button"
|
||||
class="btn-close"
|
||||
data-bs-dismiss="modal"
|
||||
aria-label="Close"
|
||||
/>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label for="notification-type" class="form-label">{{ $t("Notification Type") }}</label>
|
||||
<select id="notification-type" v-model="notification.type" class="form-select">
|
||||
<option v-for="(name, type) in notificationNameList.regularList" :key="type" :value="type">{{ name }}</option>
|
||||
<label for="notification-type" class="form-label">{{
|
||||
$t("Notification Type")
|
||||
}}</label>
|
||||
<select
|
||||
id="notification-type"
|
||||
v-model="notification.type"
|
||||
class="form-select"
|
||||
>
|
||||
<option
|
||||
v-for="(
|
||||
name, type
|
||||
) in notificationNameList.regularList"
|
||||
:key="type"
|
||||
:value="type"
|
||||
>
|
||||
{{ name }}
|
||||
</option>
|
||||
<optgroup :label="$t('notificationRegional')">
|
||||
<option v-for="(name, type) in notificationNameList.regionalList" :key="type" :value="type">{{ name }}</option>
|
||||
<option
|
||||
v-for="(
|
||||
name, type
|
||||
) in notificationNameList.regionalList"
|
||||
:key="type"
|
||||
:value="type"
|
||||
>
|
||||
{{ name }}
|
||||
</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="notification-name" class="form-label">{{ $t("Friendly Name") }}</label>
|
||||
<input id="notification-name" v-model="notification.name" type="text" class="form-control" required>
|
||||
<label for="notification-name" class="form-label">{{
|
||||
$t("Friendly Name")
|
||||
}}</label>
|
||||
<input
|
||||
id="notification-name"
|
||||
v-model="notification.name"
|
||||
type="text"
|
||||
class="form-control"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- form body -->
|
||||
<component :is="currentForm" />
|
||||
|
||||
<div class="mb-3 mt-4">
|
||||
<hr class="dropdown-divider mb-4">
|
||||
<hr class="dropdown-divider mb-4" />
|
||||
|
||||
<div class="form-check form-switch">
|
||||
<input v-model="notification.isDefault" class="form-check-input" type="checkbox">
|
||||
<label class="form-check-label">{{ $t("Default enabled") }}</label>
|
||||
<input
|
||||
v-model="notification.isDefault"
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label class="form-check-label">{{
|
||||
$t("Default enabled")
|
||||
}}</label>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
{{ $t("enableDefaultNotificationDescription") }}
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br />
|
||||
|
||||
<div class="form-check form-switch">
|
||||
<input v-model="notification.applyExisting" class="form-check-input" type="checkbox">
|
||||
<label class="form-check-label">{{ $t("Apply on all existing monitors") }}</label>
|
||||
<input
|
||||
v-model="notification.applyExisting"
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label class="form-check-label">{{
|
||||
$t("Apply on all existing monitors")
|
||||
}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button v-if="id" type="button" class="btn btn-danger" :disabled="processing" @click="deleteConfirm">
|
||||
<button
|
||||
v-if="id"
|
||||
type="button"
|
||||
class="btn btn-danger"
|
||||
:disabled="processing"
|
||||
@click="deleteConfirm"
|
||||
>
|
||||
{{ $t("Delete") }}
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning" :disabled="processing" @click="test">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-warning"
|
||||
:disabled="processing"
|
||||
@click="test"
|
||||
>
|
||||
{{ $t("Test") }}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary" :disabled="processing">
|
||||
<div v-if="processing" class="spinner-border spinner-border-sm me-1"></div>
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary"
|
||||
:disabled="processing"
|
||||
>
|
||||
<div
|
||||
v-if="processing"
|
||||
class="spinner-border spinner-border-sm me-1"
|
||||
></div>
|
||||
{{ $t("Save") }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -65,7 +135,13 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Confirm ref="confirmDelete" btn-style="btn-danger" :yes-text="$t('Yes')" :no-text="$t('No')" @yes="deleteNotification">
|
||||
<Confirm
|
||||
ref="confirmDelete"
|
||||
btn-style="btn-danger"
|
||||
:yes-text="$t('Yes')"
|
||||
:no-text="$t('No')"
|
||||
@yes="deleteNotification"
|
||||
>
|
||||
{{ $t("deleteNotificationMsg") }}
|
||||
</Confirm>
|
||||
</template>
|
||||
@@ -121,6 +197,7 @@ export default {
|
||||
"gotify": "Gotify",
|
||||
"GrafanaOncall": "Grafana Oncall",
|
||||
"HomeAssistant": "Home Assistant",
|
||||
"HeiiOnCall": "Heii On-Call",
|
||||
"Kook": "Kook",
|
||||
"line": "LINE Messenger",
|
||||
"LineNotify": "LINE Notify",
|
||||
@@ -330,7 +407,8 @@ export default {
|
||||
@import "../assets/vars.scss";
|
||||
|
||||
.dark {
|
||||
.modal-dialog .form-text, .modal-dialog p {
|
||||
.modal-dialog .form-text,
|
||||
.modal-dialog p {
|
||||
color: $dark-font-color;
|
||||
}
|
||||
}
|
||||
|
35
src/components/notifications/HeiiOnCall.vue
Normal file
35
src/components/notifications/HeiiOnCall.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<div class="mb-3">
|
||||
<label for="heiioncall-apikey" class="form-label"
|
||||
>{{ $t("API Key")
|
||||
}}<span style="color: red"><sup>*</sup></span></label
|
||||
>
|
||||
<HiddenInput
|
||||
id="heiioncall-apikey"
|
||||
v-model="$parent.notification.heiiOnCallApiKey"
|
||||
required="true"
|
||||
autocomplete="false"
|
||||
></HiddenInput>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="heiioncall-trigger-id" class="form-label"
|
||||
>{{ $t("Trigger ID")
|
||||
}}<span style="color: red"><sup>*</sup></span></label
|
||||
>
|
||||
<HiddenInput
|
||||
id="heiioncall-trigger-id"
|
||||
v-model="$parent.notification.heiiOnCallTriggerId"
|
||||
required="true"
|
||||
autocomplete="false"
|
||||
></HiddenInput>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HiddenInput from "../HiddenInput.vue";
|
||||
export default {
|
||||
components: {
|
||||
HiddenInput,
|
||||
},
|
||||
};
|
||||
</script>
|
@@ -14,6 +14,7 @@ import Gorush from "./Gorush.vue";
|
||||
import Gotify from "./Gotify.vue";
|
||||
import GrafanaOncall from "./GrafanaOncall.vue";
|
||||
import HomeAssistant from "./HomeAssistant.vue";
|
||||
import HeiiOnCall from "./HeiiOnCall.vue";
|
||||
import Kook from "./Kook.vue";
|
||||
import Line from "./Line.vue";
|
||||
import LineNotify from "./LineNotify.vue";
|
||||
@@ -58,60 +59,61 @@ import Splunk from "./Splunk.vue";
|
||||
* @type { Record<string, any> }
|
||||
*/
|
||||
const NotificationFormList = {
|
||||
"alerta": Alerta,
|
||||
"AlertNow": AlertNow,
|
||||
"AliyunSMS": AliyunSMS,
|
||||
"apprise": Apprise,
|
||||
"Bark": Bark,
|
||||
"clicksendsms": ClickSendSMS,
|
||||
"smsc": SMSC,
|
||||
"DingDing": DingDing,
|
||||
"discord": Discord,
|
||||
"Feishu": Feishu,
|
||||
"FreeMobile": FreeMobile,
|
||||
"GoogleChat": GoogleChat,
|
||||
"gorush": Gorush,
|
||||
"gotify": Gotify,
|
||||
"GrafanaOncall": GrafanaOncall,
|
||||
"HomeAssistant": HomeAssistant,
|
||||
"Kook": Kook,
|
||||
"line": Line,
|
||||
"LineNotify": LineNotify,
|
||||
"lunasea": LunaSea,
|
||||
"matrix": Matrix,
|
||||
"mattermost": Mattermost,
|
||||
"nostr": Nostr,
|
||||
"ntfy": Ntfy,
|
||||
"octopush": Octopush,
|
||||
"OneBot": OneBot,
|
||||
"Opsgenie": Opsgenie,
|
||||
"PagerDuty": PagerDuty,
|
||||
"FlashDuty": FlashDuty,
|
||||
"PagerTree": PagerTree,
|
||||
"promosms": PromoSMS,
|
||||
"pushbullet": Pushbullet,
|
||||
"PushByTechulus": TechulusPush,
|
||||
"PushDeer": PushDeer,
|
||||
"pushover": Pushover,
|
||||
"pushy": Pushy,
|
||||
alerta: Alerta,
|
||||
AlertNow: AlertNow,
|
||||
AliyunSMS: AliyunSMS,
|
||||
apprise: Apprise,
|
||||
Bark: Bark,
|
||||
clicksendsms: ClickSendSMS,
|
||||
smsc: SMSC,
|
||||
DingDing: DingDing,
|
||||
discord: Discord,
|
||||
Feishu: Feishu,
|
||||
FreeMobile: FreeMobile,
|
||||
GoogleChat: GoogleChat,
|
||||
gorush: Gorush,
|
||||
gotify: Gotify,
|
||||
GrafanaOncall: GrafanaOncall,
|
||||
HomeAssistant: HomeAssistant,
|
||||
HeiiOnCall: HeiiOnCall,
|
||||
Kook: Kook,
|
||||
line: Line,
|
||||
LineNotify: LineNotify,
|
||||
lunasea: LunaSea,
|
||||
matrix: Matrix,
|
||||
mattermost: Mattermost,
|
||||
nostr: Nostr,
|
||||
ntfy: Ntfy,
|
||||
octopush: Octopush,
|
||||
OneBot: OneBot,
|
||||
Opsgenie: Opsgenie,
|
||||
PagerDuty: PagerDuty,
|
||||
FlashDuty: FlashDuty,
|
||||
PagerTree: PagerTree,
|
||||
promosms: PromoSMS,
|
||||
pushbullet: Pushbullet,
|
||||
PushByTechulus: TechulusPush,
|
||||
PushDeer: PushDeer,
|
||||
pushover: Pushover,
|
||||
pushy: Pushy,
|
||||
"rocket.chat": RocketChat,
|
||||
"serwersms": SerwerSMS,
|
||||
"signal": Signal,
|
||||
"SMSManager": SMSManager,
|
||||
"slack": Slack,
|
||||
"squadcast": Squadcast,
|
||||
"SMSEagle": SMSEagle,
|
||||
"smtp": STMP,
|
||||
"stackfield": Stackfield,
|
||||
"teams": Teams,
|
||||
"telegram": Telegram,
|
||||
"twilio": Twilio,
|
||||
"Splunk": Splunk,
|
||||
"webhook": Webhook,
|
||||
"WeCom": WeCom,
|
||||
"GoAlert": GoAlert,
|
||||
"ServerChan": ServerChan,
|
||||
"ZohoCliq": ZohoCliq
|
||||
serwersms: SerwerSMS,
|
||||
signal: Signal,
|
||||
SMSManager: SMSManager,
|
||||
slack: Slack,
|
||||
squadcast: Squadcast,
|
||||
SMSEagle: SMSEagle,
|
||||
smtp: STMP,
|
||||
stackfield: Stackfield,
|
||||
teams: Teams,
|
||||
telegram: Telegram,
|
||||
twilio: Twilio,
|
||||
Splunk: Splunk,
|
||||
webhook: Webhook,
|
||||
WeCom: WeCom,
|
||||
GoAlert: GoAlert,
|
||||
ServerChan: ServerChan,
|
||||
ZohoCliq: ZohoCliq,
|
||||
};
|
||||
|
||||
export default NotificationFormList;
|
||||
|
@@ -883,5 +883,6 @@
|
||||
"deleteRemoteBrowserMessage": "Are you sure want to delete this Remote Browser for all monitors?",
|
||||
"GrafanaOncallUrl": "Grafana Oncall URL",
|
||||
"Browser Screenshot": "Browser Screenshot",
|
||||
"What is a Remote Browser?": "What is a Remote Browser?"
|
||||
"What is a Remote Browser?": "What is a Remote Browser?",
|
||||
"Trigger ID": "Trigger ID"
|
||||
}
|
||||
|
Reference in New Issue
Block a user