From ef82431becef33083f0464f55b4f24290942ce78 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 13 Feb 2025 16:54:22 +0100 Subject: [PATCH] IncidentHistoryListItem: Use colored icon to visualise notification-state --- .../ItemList/IncidentHistoryListItem.php | 4 ++++ public/css/detail/incident-detail.less | 24 +++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/library/Notifications/Widget/ItemList/IncidentHistoryListItem.php b/library/Notifications/Widget/ItemList/IncidentHistoryListItem.php index ad98a90c..088b8df3 100644 --- a/library/Notifications/Widget/ItemList/IncidentHistoryListItem.php +++ b/library/Notifications/Widget/ItemList/IncidentHistoryListItem.php @@ -31,6 +31,10 @@ protected function assembleVisual(BaseHtmlElement $visual): void $content = new Icon($incidentIcon, ['class' => 'severity-' . $this->item->new_severity]); } else { $content = new IconBall($incidentIcon); + + if ($this->item->type === 'notified') { + $content->addAttributes(['class' => ['notification', $this->item->notification_state]]); + } } $visual->addHtml($content); diff --git a/public/css/detail/incident-detail.less b/public/css/detail/incident-detail.less index 653911db..ff800fc1 100644 --- a/public/css/detail/incident-detail.less +++ b/public/css/detail/incident-detail.less @@ -27,7 +27,27 @@ } } - .list-item.notification-suppressed { - opacity: .75; + .list-item { + &.notification-suppressed { + opacity: .75; + } + + .visual .notification { + &.failed { + color: @state-critical; + } + + &.pending { + + } + + &.suppressed { + color: @state-warning; + } + + &.sent { + color: @state-ok; + } + } } }