mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
StateListItem: Don't assume a limit for affected children
This commit is contained in:
parent
b66d69a19f
commit
234569a29f
1 changed files with 9 additions and 18 deletions
|
|
@ -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)
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue