mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Introduce widget ServiceStateBadges
This commit is contained in:
parent
1ad00535a9
commit
7cfcf288a2
1 changed files with 24 additions and 0 deletions
24
library/Eagle/Widget/ServiceStateBadges.php
Normal file
24
library/Eagle/Widget/ServiceStateBadges.php
Normal 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')
|
||||
]));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue