mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-30 18:39:33 -05:00
BpNode: show full process missing if childs are so
This commit is contained in:
parent
6cfba947d6
commit
19ab1a28cc
1 changed files with 15 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ class BpNode extends Node
|
|||
protected $child_names = array();
|
||||
protected $alias;
|
||||
protected $counters;
|
||||
protected $missing = null;
|
||||
|
||||
public function __construct(
|
||||
BusinessProcess $bp,
|
||||
|
|
@ -52,6 +53,20 @@ class BpNode extends Node
|
|||
return $this->counters;
|
||||
}
|
||||
|
||||
public function isMissing()
|
||||
{
|
||||
if ($this->missing === null) {
|
||||
$exists = false;
|
||||
foreach ($this->getChildren() as $child) {
|
||||
if (! $child->isMissing()) {
|
||||
$exists = true;
|
||||
}
|
||||
}
|
||||
$this->missing = ! $exists;
|
||||
}
|
||||
return $this->missing;
|
||||
}
|
||||
|
||||
public function getOperator()
|
||||
{
|
||||
return $this->operator;
|
||||
|
|
|
|||
Loading…
Reference in a new issue