mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-20 14:02:34 +02:00
Merge fcd903e174
into c67f6efe29
This commit is contained in:
commit
dce69c5804
1 changed files with 11 additions and 4 deletions
|
@ -1256,18 +1256,23 @@ class Monitor extends BeanModel {
|
||||||
// PENDING -> PENDING = not important
|
// PENDING -> PENDING = not important
|
||||||
// * PENDING -> DOWN = important
|
// * PENDING -> DOWN = important
|
||||||
// PENDING -> UP = not important
|
// PENDING -> UP = not important
|
||||||
|
// PENDING -> MAINTENANCE = important
|
||||||
// DOWN -> PENDING = this case not exists
|
// DOWN -> PENDING = this case not exists
|
||||||
// DOWN -> DOWN = not important
|
// DOWN -> DOWN = not important
|
||||||
// * DOWN -> UP = important
|
// * DOWN -> UP = important
|
||||||
// MAINTENANCE -> MAINTENANCE = not important
|
// MAINTENANCE -> MAINTENANCE = not important
|
||||||
// MAINTENANCE -> UP = not important
|
// * MAINTENANCE -> UP = important
|
||||||
// * MAINTENANCE -> DOWN = important
|
// * MAINTENANCE -> DOWN = important
|
||||||
// DOWN -> MAINTENANCE = not important
|
// * DOWN -> MAINTENANCE = important
|
||||||
// UP -> MAINTENANCE = not important
|
// * UP -> MAINTENANCE = 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 === MAINTENANCE) ||
|
||||||
(previousBeatStatus === PENDING && currentBeatStatus === DOWN);
|
(previousBeatStatus === PENDING && currentBeatStatus === DOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1285,8 +1290,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 = "🔵 In Maintenance";
|
||||||
}
|
}
|
||||||
|
|
||||||
let msg = `[${monitor.name}] [${text}] ${bean.msg}`;
|
let msg = `[${monitor.name}] [${text}] ${bean.msg}`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue