From 654ba0474d913013eb3c8fce56328008a20ba3c3 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Thu, 3 Aug 2023 15:01:48 +0200 Subject: [PATCH] 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. --- library/Businessprocess/Renderer/TreeRenderer.php | 7 ++++--- public/css/module.less | 8 ++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/library/Businessprocess/Renderer/TreeRenderer.php b/library/Businessprocess/Renderer/TreeRenderer.php index add4334..c5733af 100644 --- a/library/Businessprocess/Renderer/TreeRenderer.php +++ b/library/Businessprocess/Renderer/TreeRenderer.php @@ -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; } diff --git a/public/css/module.less b/public/css/module.less index 18edea8..95617e5 100644 --- a/public/css/module.less +++ b/public/css/module.less @@ -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; } }