monitoring/commands: Show affected objects in command forms

refs #6593
This commit is contained in:
Eric Lippmann 2014-09-23 22:34:19 -07:00
parent c8f00be75b
commit 3034ac5257
2 changed files with 21 additions and 4 deletions

View File

@ -1,4 +1,25 @@
<div class="content">
<h1><?= $title ?></h1>
<table class="objectlist">
<thead>
<tr>
<th><?= $this->img('img/icons/host.png') ?> <?= $this->translate('Host') ?></th>
<th><?= $this->img('img/icons/service.png') ?> <?= $this->translate('Service') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($form->getObjects() as $object): /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ ?>
<tr>
<?php if ($object->getType() === $object::TYPE_HOST): ?>
<td colspan="2"><?= $this->escape($object->getName()) ?></td>
<?php else: ?>
<td><?= $this->escape($object->getHost()->getName()) ?></td>
<td><?= $this->escape($object->getName()) ?></td>
<?php endif ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<hr>
<?= $form ?>
</div>

View File

@ -1,4 +0,0 @@
<div class="content">
<h1><?= $title ?></h1>
<?= $form ?>
</div>