Skip to content

Commit ef82431

Browse files
IncidentHistoryListItem: Use colored icon to visualise notification-state
1 parent ede7734 commit ef82431

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

library/Notifications/Widget/ItemList/IncidentHistoryListItem.php

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ protected function assembleVisual(BaseHtmlElement $visual): void
3131
$content = new Icon($incidentIcon, ['class' => 'severity-' . $this->item->new_severity]);
3232
} else {
3333
$content = new IconBall($incidentIcon);
34+
35+
if ($this->item->type === 'notified') {
36+
$content->addAttributes(['class' => ['notification', $this->item->notification_state]]);
37+
}
3438
}
3539

3640
$visual->addHtml($content);

public/css/detail/incident-detail.less

+22-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,27 @@
2727
}
2828
}
2929

30-
.list-item.notification-suppressed {
31-
opacity: .75;
30+
.list-item {
31+
&.notification-suppressed {
32+
opacity: .75;
33+
}
34+
35+
.visual .notification {
36+
&.failed {
37+
color: @state-critical;
38+
}
39+
40+
&.pending {
41+
42+
}
43+
44+
&.suppressed {
45+
color: @state-warning;
46+
}
47+
48+
&.sent {
49+
color: @state-ok;
50+
}
51+
}
3252
}
3353
}

0 commit comments

Comments
 (0)