Skip to content

Commit

Permalink
Fix that handled nodes are not handled
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Apr 22, 2024
1 parent 77d5af4 commit fc9e4c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/Businessprocess/BpNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function hasProblems()
return true;
}

$okStates = array('OK', 'UP', 'PENDING', 'MISSING');
$okStates = ['OK', 'UP', 'PENDING', 'MISSING', 'CRITICAL-HANDLED', 'WARNING-HANDLED', 'UNKNOWN-HANDLED'];

foreach ($this->getStateSummary() as $state => $cnt) {
if ($cnt !== 0 && ! in_array($state, $okStates)) {
Expand Down
2 changes: 1 addition & 1 deletion library/Businessprocess/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function setMissing($missing = true)

public function isProblem()
{
return $this->getState() > 0;
return $this->getState() > 0 && ! $this->isHandled();
}

public function hasBeenChanged()
Expand Down
3 changes: 3 additions & 0 deletions library/Businessprocess/Web/Component/BpDashboardTile.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public function __construct(BpConfig $bp, $title, $description, $icon, $url, $ur

foreach ($bp->getChildren() as $node) {
$state = strtolower($node->getStateName());
if ($node->isHandled()) {
$state .= ' handled';
}

$tiles->add(Html::tag(
'a',
Expand Down

0 comments on commit fc9e4c1

Please sign in to comment.