mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-09-08 10:23:57 +00:00
Fixed alert features unnecessary URL field #2009
The filling of the URL field was incorrect previously. It has been updated to handle new monitor types. Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
ceeb47bf82
commit
6a3eccf6a6
@ -63,7 +63,7 @@ class Teams extends NotificationProvider {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (monitorUrl) {
|
if (monitorUrl && monitorUrl !== "https://") {
|
||||||
facts.push({
|
facts.push({
|
||||||
name: "URL",
|
name: "URL",
|
||||||
value: monitorUrl,
|
value: monitorUrl,
|
||||||
@ -127,13 +127,17 @@ class Teams extends NotificationProvider {
|
|||||||
|
|
||||||
let url;
|
let url;
|
||||||
|
|
||||||
if (monitorJSON["type"] === "port") {
|
switch (monitorJSON["type"]) {
|
||||||
url = monitorJSON["hostname"];
|
case "http":
|
||||||
if (monitorJSON["port"]) {
|
case "keywork":
|
||||||
url += ":" + monitorJSON["port"];
|
url = monitorJSON["url"];
|
||||||
}
|
break;
|
||||||
} else {
|
case "docker":
|
||||||
url = monitorJSON["url"];
|
url = monitorJSON["docker_host"];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
url = monitorJSON["hostname"];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const payload = this._notificationPayloadFactory({
|
const payload = this._notificationPayloadFactory({
|
||||||
|
Loading…
Reference in New Issue
Block a user