mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-22 20:22:53 -05:00
BpNode: Count missing nodes in getStateSummary
Children that are missing should increment the counter, as well as if no children are present. So it's easy to find missing nodes following the counters.
This commit is contained in:
parent
75a0da12fe
commit
98cc43f01b
1 changed files with 5 additions and 0 deletions
|
|
@ -68,11 +68,16 @@ class BpNode extends Node
|
|||
foreach ($counters as $k => $v) {
|
||||
$this->counters[$k] += $v;
|
||||
}
|
||||
} elseif ($child->isMissing()) {
|
||||
$this->counters['MISSING']++;
|
||||
} else {
|
||||
$state = $child->getStateName();
|
||||
$this->counters[$state]++;
|
||||
}
|
||||
}
|
||||
if (! $this->hasChildren()) {
|
||||
$this->counters['MISSING']++;
|
||||
}
|
||||
}
|
||||
return $this->counters;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue