monitoring: Wrap td content in p in the service detail header

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-25 11:14:42 +02:00
parent 4912b30b1b
commit 4eafb1825c

View File

@ -6,34 +6,44 @@ use Icinga\Module\Monitoring\Object\Service;
<table> <table>
<tr> <tr>
<td class="state-col state-<?= Host::getStateText($object->host_state) ?><?= $object->host_handled ? ' handled' : '' ?>"> <td class="state-col state-<?= Host::getStateText($object->host_state) ?><?= $object->host_handled ? ' handled' : '' ?>">
<?= Host::getStateText($object->host_state, true) ?><br> <p>
<?= $this->timeSince($object->host_last_state_change) ?> <?= Host::getStateText($object->host_state, true) ?>
<br>
<?= $this->timeSince($object->host_last_state_change) ?>
</p>
</td> </td>
<td> <td>
<?= $this->iconImage()->service($object) ?> <p>
<?= $this->escape($object->host_display_name) ?> <?= $this->iconImage()->service($object) ?>
<?php if ($object->host_display_name !== $object->host_name): ?> <?= $this->escape($object->host_display_name) ?>
(<?= $this->escape($object->host_name) ?>) <?php if ($object->host_display_name !== $object->host_name): ?>
<?php endif ?> (<?= $this->escape($object->host_name) ?>)
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?> <?php endif ?>
<br> <?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
<?= $this->escape($object->host_address) ?> <br>
<?php endif ?> <?= $this->escape($object->host_address) ?>
<?php endif ?>
<?= $this->render('partials/host/statusicons.phtml') ?> <?= $this->render('partials/host/statusicons.phtml') ?>
</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="state-col state-<?= Service::getStateText($object->service_state) ?><?= $object->service_handled ? ' handled' : '' ?>"> <td class="state-col state-<?= Service::getStateText($object->service_state) ?><?= $object->service_handled ? ' handled' : '' ?>">
<?= Service::getStateText($object->service_state, true) ?><br> <p>
<?= $this->timeSince($object->service_last_state_change) ?> <?= Service::getStateText($object->service_state, true) ?>
<br>
<?= $this->timeSince($object->service_last_state_change) ?>
</p>
</td> </td>
<td> <td>
<?= $this->iconImage()->host($object) ?> <p>
<?= $this->translate('Service') ?>: <?= $this->escape($object->service_display_name) ?> <?= $this->iconImage()->host($object) ?>
<?php if ($object->service_display_name !== $object->service_description): ?> <?= $this->translate('Service') ?>: <?= $this->escape($object->service_display_name) ?>
(<?= $this->escape($object->service_description) ?>) <?php if ($object->service_display_name !== $object->service_description): ?>
<?php endif ?> (<?= $this->escape($object->service_description) ?>)
<?= $this->render('partials/service/statusicons.phtml') ?> <?php endif ?>
<?= $this->render('partials/service/statusicons.phtml') ?>
</p>
</td> </td>
</tr> </tr>
</table> </table>