From 98fc692c5fac4670e4f8397db41db3c44e75b084 Mon Sep 17 00:00:00 2001 From: raviks789 Date: Tue, 15 Oct 2024 12:47:49 +0200 Subject: [PATCH] Do not use `StateBadge` to construct affected children indicator --- library/Icingadb/Widget/ItemList/StateListItem.php | 13 ++++++++----- public/css/common.less | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/library/Icingadb/Widget/ItemList/StateListItem.php b/library/Icingadb/Widget/ItemList/StateListItem.php index adb68e58..18e73dae 100644 --- a/library/Icingadb/Widget/ItemList/StateListItem.php +++ b/library/Icingadb/Widget/ItemList/StateListItem.php @@ -10,10 +10,10 @@ use Icinga\Module\Icingadb\Util\PluginOutput; 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 @@ abstract class StateListItem extends BaseListItem $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 1fcda57e..39da032f 100644 --- a/public/css/common.less +++ b/public/css/common.less @@ -410,4 +410,5 @@ form[name="form_confirm_removal"] { background-color: @state-critical; color: @text-color-inverted; padding: 0 0.25em; + .rounded-corners(); }