2015-03-05 18:32:38 +01:00
|
|
|
<?php
|
|
|
|
use Icinga\Module\Monitoring\Object\Service;
|
2015-04-09 13:53:05 +02:00
|
|
|
|
2015-04-09 17:16:14 +02:00
|
|
|
$i = 0;
|
2015-03-05 18:32:38 +01:00
|
|
|
?>
|
2015-02-02 16:26:55 +01:00
|
|
|
<?php if (($serviceCount = count($objects)) > 0): ?>
|
2015-05-18 14:58:51 +02:00
|
|
|
<table class='action state statesummary'>
|
2015-03-05 18:32:38 +01:00
|
|
|
<tbody>
|
|
|
|
<?php foreach ($objects as $service): /** @var Service $service */ ?>
|
|
|
|
<?php
|
2015-05-18 14:49:06 +02:00
|
|
|
if (++ $i > 5) {
|
2015-03-05 18:32:38 +01:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
?>
|
2015-09-29 19:29:43 +02:00
|
|
|
<tr>
|
|
|
|
<td class="state-col state-<?= Service::getStateText($service->service_state); ?><?= $service->service_handled ? ' handled' : '' ?>"?>
|
|
|
|
<?= Service::getStateText($service->service_state, true); ?><br />
|
|
|
|
</td>
|
2015-05-18 14:49:06 +02:00
|
|
|
<td>
|
2015-05-21 11:40:08 +02:00
|
|
|
<?= $this->iconImage()->service($service) ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
<?= implode(' ', $this->serviceFlags($service)) ?>
|
|
|
|
<b>
|
2015-06-17 11:33:55 +02:00
|
|
|
<?= $this->escape($service->getHost()->getName()); ?>:
|
|
|
|
<?= $this->escape($service->getName()); ?> <br>
|
2015-05-18 14:49:06 +02:00
|
|
|
</b>
|
|
|
|
<?= $this->escape($service->service_output) ?>
|
|
|
|
</td>
|
2015-03-05 18:32:38 +01:00
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2015-05-18 17:13:46 +02:00
|
|
|
<div class="hbox-item multi-commands">
|
|
|
|
<?php if ($i > 5): ?>
|
|
|
|
<?= $this->qlink(
|
2015-09-01 09:13:08 +02:00
|
|
|
sprintf($this->translate('List all %d services'), $i),
|
2015-04-09 15:44:21 +02:00
|
|
|
$listAllLink,
|
|
|
|
null,
|
2015-05-18 17:13:46 +02:00
|
|
|
array(
|
|
|
|
'icon' => 'down-open',
|
|
|
|
'data-base-target' => '_next'
|
|
|
|
)
|
2015-04-09 15:44:21 +02:00
|
|
|
);
|
|
|
|
?>
|
2015-05-18 17:13:46 +02:00
|
|
|
<?php endif ?>
|
2015-04-09 15:44:21 +02:00
|
|
|
</div>
|
2015-03-05 18:32:38 +01:00
|
|
|
<?php endif ?>
|