Host/show: display host alias if it differs from host_name and display_name

fixes #11348
This commit is contained in:
Alexander A. Klimov 2016-06-01 13:12:48 +02:00
parent 1be8e14772
commit b6a76581b0
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,11 @@ use Icinga\Module\Monitoring\Object\Host;
<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 ?>
<?php if ($object->host_alias !== $object->host_display_name && $object->host_alias !== $object->host_name): ?>
<div class="selectable host-meta">
<?= $this->escape($this->translate('Alias', 'host') . ': ' . $object->host_alias) ?>
</div>
<?php endif ?>
<?= $this->render('partials/host/statusicons.phtml') ?>
<?php if ($object->host_address6 && $object->host_address6 !== $object->host_name): ?>