mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-18 23:16:16 -05:00
32 lines
735 B
PHP
32 lines
735 B
PHP
<?php
|
|
|
|
/**
|
|
* @deprecated
|
|
*/
|
|
class Zend_View_Helper_RenderStateBadges extends Zend_View_Helper_Abstract // phpcs:ignore
|
|
{
|
|
public function renderStateBadges($summary)
|
|
{
|
|
$html = '';
|
|
|
|
foreach ($summary as $state => $cnt) {
|
|
if (
|
|
$cnt === 0
|
|
|| $state === 'OK'
|
|
|| $state === 'UP'
|
|
) {
|
|
continue;
|
|
}
|
|
|
|
$html .= '<span class="badge badge-' . strtolower($state)
|
|
. '" title="' . mt('monitoring', $state) . '">'
|
|
. $cnt . '</span>';
|
|
}
|
|
|
|
if ($html !== '') {
|
|
$html = '<div class="badges">' . $html . '</div>';
|
|
}
|
|
|
|
return $html;
|
|
}
|
|
}
|