Introduce widget ServiceStateBadges

This commit is contained in:
Eric Lippmann 2019-10-31 14:28:31 +01:00
parent 1ad00535a9
commit 7cfcf288a2

View file

@ -0,0 +1,24 @@
<?php
namespace Icinga\Module\Eagle\Widget;
use Icinga\Module\Eagle\Common\StateBadges;
class ServiceStateBadges extends StateBadges
{
protected function getPrefix()
{
return 'services';
}
protected function assemble()
{
$this->add(array_filter([
$this->createGroup('critical'),
$this->createGroup('warning'),
$this->createGroup('unknown'),
$this->createBadge('ok'),
$this->createBadge('pending')
]));
}
}