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

25 lines
639 B
PHP
Raw Permalink Normal View History

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