Remove leading and trailing whitespace from service header partial

refs #12208
This commit is contained in:
Alexander A. Klimov 2016-08-31 11:35:32 +02:00
parent 0e5b2806fd
commit 3af68ef166

View File

@ -14,24 +14,24 @@ use Icinga\Module\Monitoring\Object\Service;
<?php endif ?> <?php endif ?>
</div> </div>
</td> </td>
<td> <td><?php
<?= $this->iconImage()->host($object) ?> echo $this->iconImage()->host($object);
<span class="selectable"><?= $this->escape($object->host_display_name) ?></span> echo '<span class="selectable">' . $this->escape($object->host_display_name) . '</span>';
<?php if ($object->host_display_name !== $object->host_name): ?> if ($object->host_display_name !== $object->host_name) {
<span class="selectable host-meta">&#40;<?= $this->escape($object->host_name) ?>&#41;</span> echo ' <span class="selectable host-meta">&#40;' . $this->escape($object->host_name) . '&#41;</span>';
<?php endif ?> }
<?= $this->render('partials/host/statusicons.phtml') ?> echo $this->render('partials/host/statusicons.phtml');
<?php if ($object->host_address6 && $object->host_address6 !== $object->host_name): ?> if ($object->host_address6 && $object->host_address6 !== $object->host_name) {
<div class="selectable host-meta" title="<?= $this->translate('IPv6 address') ?>"> echo '<div class="selectable host-meta" title="' . $this->translate('IPv6 address') . '">'
<?= $this->escape($object->host_address6) ?> . $this->escape($object->host_address6)
</div> . '</div>';
<?php endif ?> }
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?> if ($object->host_address && $object->host_address !== $object->host_name) {
<div class="selectable host-meta" title="<?= $this->translate('IPv4 address') ?>"> echo '<div class="selectable host-meta" title="' . $this->translate('IPv4 address') . '">'
<?= $this->escape($object->host_address) ?> . $this->escape($object->host_address)
</div> . '</div>';
<?php endif ?> }
</td> ?></td>
</tr> </tr>
<tr> <tr>
<td class="state-col state-<?= Service::getStateText($object->service_state) ?><?= $object->service_handled ? ' handled' : '' ?>"> <td class="state-col state-<?= Service::getStateText($object->service_state) ?><?= $object->service_handled ? ' handled' : '' ?>">
@ -43,13 +43,14 @@ use Icinga\Module\Monitoring\Object\Service;
<?php endif ?> <?php endif ?>
</div> </div>
</td> </td>
<td> <td><?php
<?= $this->iconImage()->service($object) ?> echo $this->iconImage()->service($object);
<?= $this->translate('Service') ?>&#58; <span class="selectable"><?= $this->escape($object->service_display_name) ?></span> echo $this->translate('Service')
<?php if ($object->service_display_name !== $object->service_description): ?> . '&#58; <span class="selectable">' . $this->escape($object->service_display_name) . '</span>';
<span class="selectable service-meta">&#40;<?= $this->escape($object->service_description) ?>&#41;</span> if ($object->service_display_name !== $object->service_description) {
<?php endif ?> echo ' <span class="selectable service-meta">&#40;' . $this->escape($object->service_description) . '&#41;</span>';
<?= $this->render('partials/service/statusicons.phtml') ?> }
</td> echo $this->render('partials/service/statusicons.phtml');
?></td>
</tr> </tr>
</table> </table>