🚧 WIP: Pushover integration

This commit is contained in:
Philipp Dormann 2021-07-17 00:39:36 +02:00
parent ffe71229a9
commit da8e15a90b
No known key found for this signature in database
GPG key ID: 3BB9ADD52DCA4314
2 changed files with 33 additions and 0 deletions

View file

@ -35,6 +35,20 @@ class Notification {
return false;
}
} else if (notification.type === "pushover") {
try {
await axios.post("https://api.pushover.net/1/messages.json", {
"message": msg,
"token": notification.pushoverAppToken,
"user": notification.pushoverUserKey,
"title": "Uptime-Kuma"
})
return true;
} catch (error) {
console.log(error)
return false;
}
} else if (notification.type === "slack") {
try {
if (heartbeatJSON == null) {

View file

@ -20,6 +20,7 @@
<option value="signal">Signal</option>
<option value="gotify">Gotify</option>
<option value="slack">Slack</option>
<option value="pushover">Pushover</option>
</select>
</div>
@ -203,6 +204,24 @@
</p>
</div>
</template>
<template v-if="notification.type === 'pushover'">
<div class="mb-3">
<div class="mb-3">
<label for="pushover-app-token" class="form-label">APP_TOKEN</label>
<input type="text" class="form-control" id="pushover-app-token" required v-model="notification.pushoverAppToken">
</div>
<div class="mb-3">
<label for="pushover-user-key" class="form-label">USER_KEY</label>
<div class="input-group mb-3">
<input type="text" class="form-control" id="pushover-user-key" required v-model="notification.pushoverUserKey">
</div>
</div>
<p style="margin-top: 8px;">
More info on: <a href="https://pushover.net/api" target="_blank">https://pushover.net/api</a>
</p>
</template>
</div>
<div class="modal-footer">