Remove leading and trailing blanks from ip addresses

refs #2494
This commit is contained in:
Alexander A. Klimov 2017-12-15 13:08:14 +01:00
parent 4b458fd719
commit ba9d286567
2 changed files with 4 additions and 12 deletions

View File

@ -26,14 +26,10 @@ use Icinga\Module\Monitoring\Object\Host;
<?php endif ?>
<?= $this->hostFlags($object) ?>
<?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) ?>
</div>
<div class="selectable host-meta" title="<?= $this->translate('IPv6 address') ?>"><?= $this->escape($object->host_address6) ?></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) ?>
</div>
<div class="selectable host-meta" title="<?= $this->translate('IPv4 address') ?>"><?= $this->escape($object->host_address) ?></div>
<?php endif ?>
</td>
</tr>

View File

@ -22,14 +22,10 @@ use Icinga\Module\Monitoring\Object\Service;
<?php endif ?>
<?= $this->hostFlags($object) ?>
<?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) ?>
</div>
<div class="selectable host-meta" title="<?= $this->translate('IPv6 address') ?>"><?= $this->escape($object->host_address6) ?></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) ?>
</div>
<div class="selectable host-meta" title="<?= $this->translate('IPv4 address') ?>"><?= $this->escape($object->host_address) ?></div>
<?php endif ?>
</td>
</tr>