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
|
|
|
{
|
2020-04-17 12:41:33 -04: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
|
|
|
}
|
|
|
|
|
|
2021-09-22 04:21:15 -04:00
|
|
|
protected function createStateBadges(): BaseHtmlElement
|
2019-12-03 05:37:11 -05:00
|
|
|
{
|
2023-07-05 04:33:20 -04:00
|
|
|
return (new ServiceStateBadges($this->summary))->setBaseFilter($this->getBaseFilter());
|
2019-12-03 05:37:11 -05:00
|
|
|
}
|
|
|
|
|
}
|