mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-23 12:29:16 +02:00
adding notification on Maintenance mode.
This commit is contained in:
parent
5401f3937e
commit
78aa4d58d2
1 changed files with 6 additions and 1 deletions
|
@ -1266,6 +1266,9 @@ class Monitor extends BeanModel {
|
||||||
// UP -> MAINTENANCE = not important
|
// UP -> MAINTENANCE = not important
|
||||||
return isFirstBeat ||
|
return isFirstBeat ||
|
||||||
(previousBeatStatus === MAINTENANCE && currentBeatStatus === DOWN) ||
|
(previousBeatStatus === MAINTENANCE && currentBeatStatus === DOWN) ||
|
||||||
|
(previousBeatStatus === MAINTENANCE && currentBeatStatus === UP) ||
|
||||||
|
(previousBeatStatus === UP && currentBeatStatus === MAINTENANCE) ||
|
||||||
|
(previousBeatStatus === DOWN && currentBeatStatus === MAINTENANCE) ||
|
||||||
(previousBeatStatus === UP && currentBeatStatus === DOWN) ||
|
(previousBeatStatus === UP && currentBeatStatus === DOWN) ||
|
||||||
(previousBeatStatus === DOWN && currentBeatStatus === UP) ||
|
(previousBeatStatus === DOWN && currentBeatStatus === UP) ||
|
||||||
(previousBeatStatus === PENDING && currentBeatStatus === DOWN);
|
(previousBeatStatus === PENDING && currentBeatStatus === DOWN);
|
||||||
|
@ -1285,8 +1288,10 @@ class Monitor extends BeanModel {
|
||||||
let text;
|
let text;
|
||||||
if (bean.status === UP) {
|
if (bean.status === UP) {
|
||||||
text = "✅ Up";
|
text = "✅ Up";
|
||||||
} else {
|
} else if(bean.status === DOWN) {
|
||||||
text = "🔴 Down";
|
text = "🔴 Down";
|
||||||
|
} else if(bean.status === MAINTENANCE) {
|
||||||
|
text = "🔴 Maintenance";
|
||||||
}
|
}
|
||||||
|
|
||||||
let msg = `[${monitor.name}] [${text}] ${bean.msg}`;
|
let msg = `[${monitor.name}] [${text}] ${bean.msg}`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue