Browse Source
Merge branch 'feature/gotify-upstream-merge'
# Conflicts:
# src/components/NotificationDialog.vue
pull/154/head^2
Philipp Dormann
4 years ago
No known key found for this signature in database
GPG Key ID: 3BB9ADD52DCA4314
2 changed files with
9 additions and
1 deletions
-
server/notification.js
-
src/components/NotificationDialog.vue
|
@ -26,7 +26,7 @@ class Notification { |
|
|
} |
|
|
} |
|
|
await axios.post(`${notification.gotifyserverurl}/message?token=${notification.gotifyapplicationToken}`, { |
|
|
await axios.post(`${notification.gotifyserverurl}/message?token=${notification.gotifyapplicationToken}`, { |
|
|
"message": msg, |
|
|
"message": msg, |
|
|
"priority": 8, |
|
|
"priority": notification.gotifyPriority || 8, |
|
|
"title": "Uptime-Kuma" |
|
|
"title": "Uptime-Kuma" |
|
|
}) |
|
|
}) |
|
|
return true; |
|
|
return true; |
|
|
|
@ -183,7 +183,13 @@ |
|
|
<input type="text" class="form-control" id="gotify-server-url" required v-model="notification.gotifyserverurl"> |
|
|
<input type="text" class="form-control" id="gotify-server-url" required v-model="notification.gotifyserverurl"> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3"> |
|
|
|
|
|
<label for="gotify-priority" class="form-label">Priority</label> |
|
|
|
|
|
<input type="number" class="form-control" id="gotify-priority" v-model="notification.gotifyPriority" required min="0" max="10" step="1"> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<template v-if="notification.type === 'slack'"> |
|
|
<template v-if="notification.type === 'slack'"> |
|
|
<div class="mb-3"> |
|
|
<div class="mb-3"> |
|
|
<label for="slack-webhook-url" class="form-label">Slack Webhook URL</label> |
|
|
<label for="slack-webhook-url" class="form-label">Slack Webhook URL</label> |
|
@ -234,6 +240,7 @@ export default { |
|
|
notification: { |
|
|
notification: { |
|
|
name: "", |
|
|
name: "", |
|
|
type: null, |
|
|
type: null, |
|
|
|
|
|
gotifyPriority: 8 |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -273,6 +280,7 @@ export default { |
|
|
|
|
|
|
|
|
// Default set to Telegram |
|
|
// Default set to Telegram |
|
|
this.notification.type = "telegram" |
|
|
this.notification.type = "telegram" |
|
|
|
|
|
this.notification.gotifyPriority = 8 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.modal.show() |
|
|
this.modal.show() |
|
|