mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-09 14:42:53 -05:00
BpNode: calculate latest state change
This commit is contained in:
parent
bf69d5298a
commit
951d4d0ab0
1 changed files with 4 additions and 0 deletions
|
|
@ -156,9 +156,13 @@ class BpNode extends Node
|
|||
protected function calculateState()
|
||||
{
|
||||
$sort_states = array();
|
||||
$lastStateChange = 0;
|
||||
foreach ($this->getChildren() as $child) {
|
||||
$sort_states[] = $child->getSortingState();
|
||||
$lastStateChange = max($lastStateChange, $child->getLastStateChange());
|
||||
}
|
||||
$this->setLastStateChange($lastStateChange);
|
||||
|
||||
switch ($this->operator) {
|
||||
case self::OP_AND:
|
||||
$sort_state = max($sort_states);
|
||||
|
|
|
|||
Loading…
Reference in a new issue