mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-01 19:32:34 +02:00
🚧 WIP: Pushover integration
This commit is contained in:
parent
ffe71229a9
commit
da8e15a90b
2 changed files with 33 additions and 0 deletions
|
@ -35,6 +35,20 @@ class Notification {
|
||||||
return false;
|
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") {
|
} else if (notification.type === "slack") {
|
||||||
try {
|
try {
|
||||||
if (heartbeatJSON == null) {
|
if (heartbeatJSON == null) {
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<option value="signal">Signal</option>
|
<option value="signal">Signal</option>
|
||||||
<option value="gotify">Gotify</option>
|
<option value="gotify">Gotify</option>
|
||||||
<option value="slack">Slack</option>
|
<option value="slack">Slack</option>
|
||||||
|
<option value="pushover">Pushover</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -203,6 +204,24 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
Loading…
Add table
Reference in a new issue