style: fix formatting

This commit is contained in:
Peace 2024-10-12 23:27:34 +02:00
parent 50d6ea36a4
commit 90b9173cfb
No known key found for this signature in database
GPG key ID: 0EF6B46E172B739F

View file

@ -404,9 +404,10 @@ class Monitor extends BeanModel {
if (lastBeat && (lastBeat.status === PENDING || lastBeat.status === DOWN)) { if (lastBeat && (lastBeat.status === PENDING || lastBeat.status === DOWN)) {
console.log(lastBeat.monitor_id); console.log(lastBeat.monitor_id);
const childMonitor = await Monitor.getMonitor(lastBeat.monitor_id); const childMonitor = await Monitor.getMonitor(lastBeat.monitor_id);
console.log(childMonitor) console.log(childMonitor);
if(errorChildNames.length > 0) if (errorChildNames.length > 0) {
bean.msg += "\r\n"; bean.msg += "\r\n";
}
bean.msg += "- " + childMonitor.name + ":\r\n" + lastBeat.msg.trim().replace(/^/gm, " "); bean.msg += "- " + childMonitor.name + ":\r\n" + lastBeat.msg.trim().replace(/^/gm, " ");
errorChildNames.push(childMonitor.name); errorChildNames.push(childMonitor.name);
@ -416,7 +417,7 @@ class Monitor extends BeanModel {
if (bean.status === UP) { if (bean.status === UP) {
bean.msg = "All children up and running"; bean.msg = "All children up and running";
} else if (bean.status === PENDING || bean.status === DOWN) { } else if (bean.status === PENDING || bean.status === DOWN) {
bean.msg = "Some Children are having problems (" + errorChildNames.join(', ') + ")\r\n" + bean.msg; bean.msg = "Some Children are having problems (" + errorChildNames.join(", ") + ")\r\n" + bean.msg;
} }
} else { } else {
// Set status pending if group is empty // Set status pending if group is empty