mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-01 11:22:34 +02:00
Add SpugPush notification provider
This commit is contained in:
parent
73c9e27b70
commit
0454f93508
2 changed files with 6 additions and 3 deletions
|
@ -5,6 +5,9 @@ class SpugPush extends NotificationProvider {
|
||||||
|
|
||||||
name = "SpugPush";
|
name = "SpugPush";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully.";
|
let okMsg = "Sent Successfully.";
|
||||||
try {
|
try {
|
||||||
|
@ -25,11 +28,11 @@ class SpugPush extends NotificationProvider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the formatted target for message
|
* Get the formatted target for message
|
||||||
* @param {?Object} monitorJSON Monitor details (For Up/Down only)
|
* @param {object} monitorJSON Monitor details (For Up/Down only)
|
||||||
* @returns {string} Formatted target
|
* @returns {string} Formatted target
|
||||||
*/
|
*/
|
||||||
getTarget(monitorJSON) {
|
getTarget(monitorJSON) {
|
||||||
let target = '-'
|
let target = "-";
|
||||||
if (monitorJSON["hostname"]) {
|
if (monitorJSON["hostname"]) {
|
||||||
target = monitorJSON["hostname"];
|
target = monitorJSON["hostname"];
|
||||||
if (monitorJSON["port"]) {
|
if (monitorJSON["port"]) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<HiddenInput id="spugpush-templateKey" v-model="$parent.notification.templateKey" :required="true" autocomplete="new-password"></HiddenInput>
|
<HiddenInput id="spugpush-templateKey" v-model="$parent.notification.templateKey" :required="true" autocomplete="new-password"></HiddenInput>
|
||||||
</div>
|
</div>
|
||||||
<i18n-t tag="p" keypath="More info on:" style="margin-top: 8px;">
|
<i18n-t tag="p" keypath="More info on:" style="margin-top: 8px;">
|
||||||
<a href="https://push.spug.cc/guide/plugin/kuma" rel="noopener noreferrer" target="_blank">https://push.spug.cc</a>
|
<a href="https://push.spug.cc/guide/plugin/kuma" rel="noopener noreferrer" target="_blank">https://push.spug.cc</a>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue