icingaweb2/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml

40 lines
1.1 KiB
PHTML
Raw Normal View History

<?php
use Icinga\Module\Monitoring\Object\Host;
$i = 0;
?>
<?php if (($hostCount = count($objects)) > 0): ?>
<table class="state statesummary">
<tbody>
<?php foreach ($objects as $host): /** @var Host $host */ ?>
<?php
$i++;
if ($i > 5) {
continue;
}
?>
<tr class="state <?= Host::getStateText($host->host_state); ?><?= $host->host_handled ? ' handled' : '' ?>">
<td class="state"><?= Host::getStateText($host->host_state, true); ?><br /></td>
<td><?= implode(' ', $this->hostFlags($host)) ?></td>
<td class="name oneline"><?= $this->escape($host->getName()); ?></td>
<td><?= $this->escape($host->host_output) ?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<div class="hbox-item">
<?=
$this->qlink(
sprintf($this->translate('list all %d hosts ...'), $i),
$listAllLink,
null,
array('data-base-target' => '_next')
);
?>
</div>
<?php endif ?>