2015-03-06 12:31:34 +01:00
|
|
|
<?php
|
|
|
|
use Icinga\Module\Monitoring\Object\Host;
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
?>
|
|
|
|
|
2015-02-02 16:26:55 +01:00
|
|
|
<?php if (($hostCount = count($objects)) > 0): ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
<table class="action state statesummary">
|
2015-03-06 12:31:34 +01:00
|
|
|
<tbody>
|
|
|
|
<?php foreach ($objects as $host): /** @var Host $host */ ?>
|
|
|
|
<?php
|
2015-05-18 14:49:06 +02:00
|
|
|
if (++ $i > 5) {
|
2015-03-06 12:31:34 +01:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2015-09-29 19:29:43 +02:00
|
|
|
<tr>
|
|
|
|
<td class="state-col state-<?= Host::getStateText($host->host_state); ?><?= $host->host_handled ? ' handled' : '' ?>">
|
|
|
|
<?= Host::getStateText($host->host_state, true); ?>
|
|
|
|
<br />
|
|
|
|
</td>
|
2015-05-18 14:49:06 +02:00
|
|
|
<td>
|
2015-05-21 11:40:08 +02:00
|
|
|
<?= $this->iconImage()->host($host) ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
<?= implode(' ', $this->hostFlags($host)) ?>
|
|
|
|
<b><?= $this->escape($host->getName()); ?></b><br>
|
|
|
|
<?= $this->escape($host->host_output) ?>
|
|
|
|
</td>
|
2015-03-06 12:31:34 +01:00
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
2015-04-09 15:44:21 +02:00
|
|
|
</tbody>
|
2015-03-06 12:31:34 +01:00
|
|
|
</table>
|
2015-05-18 17:13:46 +02:00
|
|
|
<div class="hbox-item multi-commands">
|
|
|
|
<?php if ($i > 5): ?>
|
2015-04-09 15:44:21 +02:00
|
|
|
<?=
|
|
|
|
$this->qlink(
|
2015-05-18 17:13:46 +02:00
|
|
|
sprintf($this->translate('show all %d hosts'), $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 ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|