icingadb-web/library/Icingadb/Widget/HostStatusBar.php

22 lines
587 B
PHP
Raw Permalink Normal View History

2019-12-03 05:36:59 -05:00
<?php
2020-03-13 03:38:01 -04:00
/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */
2019-12-03 05:36:59 -05:00
namespace Icinga\Module\Icingadb\Widget;
use Icinga\Module\Icingadb\Common\BaseStatusBar;
use ipl\Html\BaseHtmlElement;
class HostStatusBar extends BaseStatusBar
{
2023-08-09 08:25:44 -04:00
protected function assembleTotal(BaseHtmlElement $total): void
2019-12-03 05:36:59 -05:00
{
$total->add(sprintf(tp('%d Host', '%d Hosts', $this->summary->hosts_total), $this->summary->hosts_total));
2019-12-03 05:36:59 -05:00
}
protected function createStateBadges(): BaseHtmlElement
2019-12-03 05:36:59 -05:00
{
return (new HostStateBadges($this->summary))->setBaseFilter($this->getBaseFilter());
2019-12-03 05:36:59 -05:00
}
}