mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
feat: set group to pending if all childs are paused.
This commit is contained in:
parent
9eda25d0b6
commit
b02b21299b
1 changed files with 5 additions and 1 deletions
|
@ -380,7 +380,11 @@ class Monitor extends BeanModel {
|
|||
} else if (this.type === "group") {
|
||||
const children = await Monitor.getChildren(this.id);
|
||||
|
||||
if (children.length > 0) {
|
||||
if (children.length > 0 && children.filter(child => child.active).length === 0) {
|
||||
// Set status pending if all children are paused
|
||||
bean.status = PENDING;
|
||||
bean.msg = "All Children are paused.";
|
||||
} else if (children.length > 0) {
|
||||
bean.status = UP;
|
||||
bean.msg = "All children up and running";
|
||||
for (const child of children) {
|
||||
|
|
Loading…
Reference in a new issue