monitoring: Fix host-header markup

refs #5543
This commit is contained in:
Eric Lippmann 2015-10-28 11:11:03 +01:00
parent e37b3c5527
commit 3e02007150

View File

@ -5,33 +5,26 @@ use Icinga\Module\Monitoring\Object\Host;
<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' : '' ?>">
<p> <div class="state-header"><?= Host::getStateText($object->host_state, true) ?></div>
<?= Host::getStateText($object->host_state, true) ?> <div class="state-meta"><?= $this->timeSince($object->host_last_state_change) ?></div>
<br>
<?= $this->timeSince($object->host_last_state_change) ?>
</p>
</td> </td>
<td> <td>
<p> <?= $this->iconImage()->host($object) ?>
<?= $this->iconImage()->host($object) ?> <span class="selectable"><?= $this->escape($object->host_display_name) ?></span>
<span class="selectable"><?= $this->escape($object->host_display_name) ?></span> <?php if ($object->host_display_name !== $object->host_name): ?>
<?php if ($object->host_display_name !== $object->host_name): ?> <span class="selectable host-meta">&#40;<?= $this->escape($object->host_name) ?>&#41;</span>
<span class="selectable text-small">&#40;<?= $this->escape($object->host_name) ?>&#41;</span> <?php endif ?>
<?php endif ?> <?= $this->render('partials/host/statusicons.phtml') ?>
<?php if ($object->host_address6 && $object->host_address6 !== $object->host_name): ?> <?php if ($object->host_address6 && $object->host_address6 !== $object->host_name): ?>
<br> <div class="selectable host-meta" title="<?= $this->translate('IPv6 address') ?>">
<span class="selectable text-small" title="<?= $this->translate('IPv6 address') ?>"> <?= $this->escape($object->host_address6) ?>
<?= $this->escape($object->host_address6) ?> </div>
</span> <?php endif ?>
<?php endif ?> <?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?> <div class="selectable host-meta" title="<?= $this->translate('IPv4 address') ?>">
<br> <?= $this->escape($object->host_address) ?>
<span class="selectable text-small" title="<?= $this->translate('IPv4 address') ?>"> </div>
<?= $this->escape($object->host_address) ?> <?php endif ?>
</span>
<?php endif ?>
<?= $this->render('partials/host/statusicons.phtml') ?>
</p>
</td> </td>
</tr> </tr>
</table> </table>