mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-06 05:29:35 -05:00
Merge pull request #139 from Icinga/missing-counters
BpNode: Count missing nodes in getStateSummary
This commit is contained in:
commit
1c76e7a152
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