Skip to content

Commit

Permalink
monitoring: Fix service-header markup
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Oct 28, 2015
1 parent 8cc96e6 commit d15673f
Showing 1 changed file with 22 additions and 34 deletions.
Expand Up @@ -6,52 +6,40 @@ use Icinga\Module\Monitoring\Object\Service;
<table>
<tr>
<td class="state-col state-<?= Host::getStateText($object->host_state) ?><?= $object->host_handled ? ' handled' : '' ?>">
<p>
<?= Host::getStateText($object->host_state, true) ?>
<br>
<?= $this->timeSince($object->host_last_state_change) ?>
</p>
<div class="state-label"><?= Host::getStateText($object->host_state, true) ?></div>
<div class="state-meta"><?= $this->timeSince($object->host_last_state_change) ?></div>
</td>
<td>
<p>
<?= $this->iconImage()->service($object) ?>
<span class="selectable"><?= $this->escape($object->host_display_name) ?></span>
<?php if ($object->host_display_name !== $object->host_name): ?>
<span class="selectable text-small">&#40;<?= $this->escape($object->host_name) ?>&#41;</span>
<?php endif ?>
<?php if ($object->host_address6 && $object->host_address6 !== $object->host_name): ?>
<br>
<span class="selectable text-small" title="<?= $this->translate('IPv6 address') ?>">
<?= $this->iconImage()->service($object) ?>
<span class="selectable"><?= $this->escape($object->host_display_name) ?></span>
<?php if ($object->host_display_name !== $object->host_name): ?>
<span class="selectable host-meta">&#40;<?= $this->escape($object->host_name) ?>&#41;</span>
<?php endif ?>
<?= $this->render('partials/host/statusicons.phtml') ?>
<?php if ($object->host_address6 && $object->host_address6 !== $object->host_name): ?>
<div class="selectable host-meta" title="<?= $this->translate('IPv6 address') ?>">
<?= $this->escape($object->host_address6) ?>
</span>
<?php endif ?>
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
<br>
<span class="selectable text-small" title="<?= $this->translate('IPv4 address') ?>">
</div>
<?php endif ?>
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
<div class="selectable host-meta" title="<?= $this->translate('IPv4 address') ?>">
<?= $this->escape($object->host_address) ?>
</span>
<?php endif ?>
<?= $this->render('partials/host/statusicons.phtml') ?>
</p>
</div>
<?php endif ?>
</td>
</tr>
<tr>
<td class="state-col state-<?= Service::getStateText($object->service_state) ?><?= $object->service_handled ? ' handled' : '' ?>">
<p>
<?= Service::getStateText($object->service_state, true) ?>
<br>
<?= $this->timeSince($object->service_last_state_change) ?>
</p>
<div class="state-label"><?= Service::getStateText($object->service_state, true) ?></div>
<div class="state-meta"><?= $this->timeSince($object->service_last_state_change) ?></div>
</td>
<td>
<p>
<?= $this->iconImage()->host($object) ?>
<?= $this->translate('Service') ?>&#58; <span class="selectable"><?= $this->escape($object->service_display_name) ?></span>
<?= $this->iconImage()->host($object) ?>
<?= $this->translate('Service') ?>&#58; <span class="selectable"><?= $this->escape($object->service_display_name) ?></span>
<?php if ($object->service_display_name !== $object->service_description): ?>
<span class="selectable text-small">&#40;<?= $this->escape($object->service_description) ?>&#41;</span>
<span class="selectable service-meta">&#40;<?= $this->escape($object->service_description) ?>&#41;</span>
<?php endif ?>
<?= $this->render('partials/service/statusicons.phtml') ?>
</p>
<?= $this->render('partials/service/statusicons.phtml') ?>
</td>
</tr>
</table>

0 comments on commit d15673f

Please sign in to comment.