<div class="controls">
    <?= $this->tabs->showOnlyCloseButton() ?>
</div>
<div class="content">
    <h1><?= $title ?> <?= /** @var \Icinga\Module\Monitoring\Forms\Command\CommandForm $form */ $this->icon('help', $form->getHelp()) ?></h1>
    <table class="objectlist">
        <thead>
            <tr>
                <th><?= $this->icon('host') ?> <?= $this->translate('Host') ?></th>
                <th><?= $this->icon('conf') ?> <?= $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>
