Show Ack icon in tree view for nodes with both downtime and acknowledgement (#352)

Acknowledgement takes priority in handled nodes and hence it is
sufficient to show acknowledged icons in case the handled node has an
acknowledgement and also a downtime is scheduled for it.
This commit is contained in:
raviks789 2023-08-03 15:01:48 +02:00 committed by GitHub
parent 4a3b3e3657
commit 654ba0474d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View file

@ -133,12 +133,13 @@ class TreeRenderer extends Renderer
DateFormatter::timeSince($node->getLastStateChange())
)
]);
if ($node->isInDowntime()) {
$icons[] = Html::tag('i', ['class' => 'icon icon-plug']);
}
if ($node->isAcknowledged()) {
$icons[] = Html::tag('i', ['class' => 'icon icon-ok']);
} elseif ($node->isInDowntime()) {
$icons[] = new Icon('plug');
}
return $icons;
}

View file

@ -132,12 +132,8 @@ ul.bp {
opacity: .8;
}
i.icon-ok {
opacity: .8;
}
i.icon-plug {
opacity: .7;
span.state-ball ~ i:last-of-type {
margin-right: 0;
}
}