diff --git a/library/Icingadb/Widget/ItemList/StateListItem.php b/library/Icingadb/Widget/ItemList/StateListItem.php index adb68e586..18e73dae4 100644 --- a/library/Icingadb/Widget/ItemList/StateListItem.php +++ b/library/Icingadb/Widget/ItemList/StateListItem.php @@ -10,10 +10,10 @@ use Icinga\Module\Icingadb\Widget\CheckAttempt; use Icinga\Module\Icingadb\Widget\IconImage; use Icinga\Module\Icingadb\Widget\PluginOutputContainer; +use ipl\Html\Attributes; use ipl\Html\HtmlElement; use ipl\Web\Common\BaseListItem; use ipl\Web\Widget\EmptyState; -use ipl\Web\Widget\StateBadge; use ipl\Web\Widget\TimeSince; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -104,12 +104,15 @@ protected function assembleTitle(BaseHtmlElement $title): void $icon = new Icon(Icons::UNREACHABLE); - $title->addHtml((new StateBadge([$icon, Text::create($total)], '')) - ->addAttributes([ + $title->addHtml(new HtmlElement( + 'span', + Attributes::create([ 'class' => 'affected-objects', 'title' => sprintf(t('Up to %s affected objects'), $total) - ]) - ); + ]), + $icon, + Text::create($total) + )); } } diff --git a/public/css/common.less b/public/css/common.less index 1fcda57ed..2492b899a 100644 --- a/public/css/common.less +++ b/public/css/common.less @@ -407,6 +407,7 @@ form[name="form_confirm_removal"] { .affected-objects { display: inline-flex; align-items: baseline; + border-radius: 0.4em; background-color: @state-critical; color: @text-color-inverted; padding: 0 0.25em;