Philipp Dormann
4 years ago
No known key found for this signature in database
GPG Key ID: 3BB9ADD52DCA4314
2 changed files with
33 additions and
0 deletions
-
server/notification.js
-
src/components/NotificationDialog.vue
|
|
@ -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) { |
|
|
|
|
|
@ -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"> |
|
|
|