42 lines
1.3 KiB
PHTML
42 lines
1.3 KiB
PHTML
<?php
|
|
use Icinga\Web\Url;
|
|
?>
|
|
|
|
<h1 class="tinystatesummary">
|
|
<?= $this->qlink(
|
|
sprintf($this->translate('%d Services Selected:'), count($objects)),
|
|
$listAllLink
|
|
); ?>
|
|
|
|
<span class="badges">
|
|
<?php if ($serviceStates->services_ok): ?>
|
|
<?php $selfUrl = Url::fromPath('monitoring/list/services'); ?>
|
|
<span class="state ok"><b>
|
|
<?= $serviceStates->services_ok ?>
|
|
</b></span>
|
|
<?php endif ?>
|
|
|
|
<?php
|
|
foreach (
|
|
array(
|
|
2 => 'critical',
|
|
3 => 'unknown',
|
|
1 => 'warning',
|
|
4 => 'pending'
|
|
) as $stateId => $state) {
|
|
|
|
$stateName = 'services_' . $state;
|
|
$unhandledStateName = $stateName . '_unhandled';
|
|
if ($serviceStates->$unhandledStateName) {
|
|
echo '<span class="state ' . $state . '"><b>' . $serviceStates->$unhandledStateName . '</b>';
|
|
}
|
|
if ($serviceStates->$stateName) {
|
|
echo '<span class="state ' . $state . ' handled"><b>' . $serviceStates->$stateName . '</b></span>';
|
|
}
|
|
if ($serviceStates->$unhandledStateName) {
|
|
echo '</span>';
|
|
}
|
|
$stateName .= '_unhandled';
|
|
}?>
|
|
</span>
|
|
</h1>
|