Merge pull request #3218 from Icinga/bugfix/remove-leading-and-trailing-blank-from-ip-address-2494

Remove leading and trailing blanks from ip addresses
This commit is contained in:
lippserd 2018-01-16 09:20:37 +01:00 committed by GitHub
commit e529b9b2ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View File

@ -41,14 +41,10 @@ $linkHostName = ! ($url->getPath() === 'monitoring/host/show' && $url->getParam(
<?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

@ -29,14 +29,10 @@ $linkServiceName = ! ($url->getPath() === 'monitoring/service/show' && $url->get
</a>
<?= $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>