mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-24 07:14:04 +00:00
Linting fixes
This commit is contained in:
parent
4157c7d546
commit
bef9cb6a5f
1 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
||||||
const NotificationProvider = require("./notification-provider");
|
const NotificationProvider = require("./notification-provider");
|
||||||
const axios = require("axios");
|
const axios = require("axios");
|
||||||
const { DOWN, UP } = require("../../src/util");
|
const { DOWN } = require("../../src/util");
|
||||||
|
|
||||||
class Squadcast extends NotificationProvider {
|
class Squadcast extends NotificationProvider {
|
||||||
|
|
||||||
|
@ -14,21 +14,21 @@ class Squadcast extends NotificationProvider {
|
||||||
let config = {};
|
let config = {};
|
||||||
let data = {
|
let data = {
|
||||||
message: msg,
|
message: msg,
|
||||||
description: '',
|
description: "",
|
||||||
tags: {},
|
tags: {},
|
||||||
heartbeat: heartbeatJSON,
|
heartbeat: heartbeatJSON,
|
||||||
source: 'uptime-kuma'
|
source: "uptime-kuma"
|
||||||
}
|
};
|
||||||
|
|
||||||
if (heartbeatJSON !== null) {
|
if (heartbeatJSON !== null) {
|
||||||
data.description = heartbeatJSON["msg"];
|
data.description = heartbeatJSON["msg"];
|
||||||
data.event_id = heartbeatJSON["monitorID"];
|
data.event_id = heartbeatJSON["monitorID"];
|
||||||
|
|
||||||
if (heartbeatJSON["status"] === DOWN) {
|
if (heartbeatJSON["status"] === DOWN) {
|
||||||
data.message = `${monitorJSON['name']} is DOWN`;
|
data.message = `${monitorJSON["name"]} is DOWN`;
|
||||||
data.status = "trigger";
|
data.status = "trigger";
|
||||||
} else {
|
} else {
|
||||||
data.message = `${monitorJSON['name']} is UP`;
|
data.message = `${monitorJSON["name"]} is UP`;
|
||||||
data.status = "resolve";
|
data.status = "resolve";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class Squadcast extends NotificationProvider {
|
||||||
value: tag["value"]
|
value: tag["value"]
|
||||||
};
|
};
|
||||||
if (tag["color"] !== null) {
|
if (tag["color"] !== null) {
|
||||||
data.tags[tag["name"]]["color"] = tag["color"]
|
data.tags[tag["name"]]["color"] = tag["color"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue