From 234569a29fa08ded07f538834bd0714ee3cd17b9 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 28 Mar 2025 08:54:42 +0100 Subject: [PATCH] StateListItem: Don't assume a limit for affected children --- .../View/BaseHostAndServiceRenderer.php | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/library/Icingadb/View/BaseHostAndServiceRenderer.php b/library/Icingadb/View/BaseHostAndServiceRenderer.php index 77d86a27..a5943b2d 100644 --- a/library/Icingadb/View/BaseHostAndServiceRenderer.php +++ b/library/Icingadb/View/BaseHostAndServiceRenderer.php @@ -141,29 +141,20 @@ abstract class BaseHostAndServiceRenderer implements ItemRenderer if (isset($item->state->affects_children) && $item->state->affects_children) { $total = (int) $item->total_children; - if ($total > 1000) { - $total = '1000+'; - $tooltip = $this->translate('Up to 1000+ affected objects'); - } else { - $tooltip = sprintf( - $this->translatePlural( - '%d affected object', - 'Up to %d affected objects', - $total - ), - $total - ); - } - - $icon = new Icon(Icons::UNREACHABLE); - $title->addHtml(new HtmlElement( 'span', Attributes::create([ 'class' => 'affected-objects', - 'title' => $tooltip + 'title' => sprintf( + $this->translatePlural( + '%d affected object', + 'Up to %d affected objects', + $total + ), + $total + ) ]), - $icon, + new Icon(Icons::UNREACHABLE), Text::create($total) )); }