mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 10:14:03 +00:00
code cleanup
This commit is contained in:
parent
5b87da94b3
commit
b8941403d1
1 changed files with 4 additions and 6 deletions
|
@ -14,9 +14,9 @@ class Teams extends NotificationProvider {
|
||||||
*/
|
*/
|
||||||
_statusMessageFactory = (status, monitorName) => {
|
_statusMessageFactory = (status, monitorName) => {
|
||||||
if (status === DOWN) {
|
if (status === DOWN) {
|
||||||
return `🔴 [${monitorName}] went down`;
|
return `[${monitorName}] went down`;
|
||||||
} else if (status === UP) {
|
} else if (status === UP) {
|
||||||
return `✅ [${monitorName}] is back online`;
|
return `[${monitorName}] is back online`;
|
||||||
}
|
}
|
||||||
return "Notification";
|
return "Notification";
|
||||||
};
|
};
|
||||||
|
@ -82,8 +82,6 @@ class Teams extends NotificationProvider {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerMessage = `**${notificationMessage}**`;
|
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
"type": "message",
|
"type": "message",
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
@ -123,7 +121,7 @@ class Teams extends NotificationProvider {
|
||||||
"type": "TextBlock",
|
"type": "TextBlock",
|
||||||
"size": "Medium",
|
"size": "Medium",
|
||||||
"weight": "Bolder",
|
"weight": "Bolder",
|
||||||
"text": headerMessage,
|
"text": `**${notificationMessage}**`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "TextBlock",
|
"type": "TextBlock",
|
||||||
|
@ -141,7 +139,7 @@ class Teams extends NotificationProvider {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "FactSet",
|
"type": "FactSet",
|
||||||
"separator": true,
|
"separator": false,
|
||||||
"facts": facts
|
"facts": facts
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue