mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-02-19 02:27:57 -05:00
36 lines
796 B
PHP
36 lines
796 B
PHP
<?php
|
|
|
|
/* Icinga DB Web | (c) 2024 Icinga GmbH | GPLv2 */
|
|
|
|
namespace Icinga\Module\Icingadb\Widget;
|
|
|
|
use Icinga\Module\Icingadb\Common\StateBadges;
|
|
|
|
/**
|
|
* State badges for the dependency nodes
|
|
*/
|
|
class DependencyNodeStateBadges extends StateBadges
|
|
{
|
|
protected function getType(): string
|
|
{
|
|
return 'nodes';
|
|
}
|
|
|
|
protected function getPrefix(): string
|
|
{
|
|
return 'nodes';
|
|
}
|
|
|
|
protected function assemble(): void
|
|
{
|
|
$this->addAttributes(['class' => 'dependency-node-state-badges']);
|
|
|
|
$this->add(array_filter([
|
|
$this->createGroup('problem'),
|
|
$this->createGroup('warning'),
|
|
$this->createGroup('unknown'),
|
|
$this->createBadge('ok'),
|
|
$this->createBadge('pending')
|
|
]));
|
|
}
|
|
}
|