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

41 lines
1.2 KiB
PHTML
Raw Normal View History

<?php
use Icinga\Module\Monitoring\Object\Service;
$i = 0;
?>
<?php if (($serviceCount = count($objects)) > 0): ?>
<table class='action state statesummary'>
<tbody>
<?php foreach ($objects as $service): /** @var Service $service */ ?>
<?php
2015-05-18 14:49:06 +02:00
if (++ $i > 5) {
continue;
}
?>
<tr class="state <?= Service::getStateText($service->service_state); ?><?= $service->service_handled ? ' handled' : '' ?>">
<td class="state"><?= Service::getStateText($service->service_state, true); ?><br /></td>
2015-05-18 14:49:06 +02:00
<td>
<?= implode(' ', $this->serviceFlags($service)) ?>
<b>
<?= $this->escape($service->getName()); ?>
<?= $this->translate('on') ?>
<?= $this->escape($service->getHost()->getName()); ?><br>
</b>
<?= $this->escape($service->service_output) ?>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<div class="hbox-item">
<?php
echo $this->qlink(
sprintf($this->translate('List all %d services ...'), $i),
$listAllLink,
null,
array('data-base-target' => '_next')
);
?>
</div>
<?php endif ?>