<?= $this->controls->render() ?>
<div class="content">
    <?php /** @var \Icinga\Repository\RepositoryQuery $sni */ if (! $sni->hasResult()): ?>
        <p><?= $this->escape($this->translate('No SNI maps configured yet.')) ?></p>
    <?php else: ?>
        <table class="common-table table-row-selectable" data-base-target="_next">
            <thead>
            <tr>
                <th><?= $this->escape($this->translate('IP')) ?></th>
            </tr>
            </thead>
            <tbody>
            <?php foreach ($sni as $data): ?>
                <tr>
                    <td><?= $this->qlink($data->ip, 'x509/sni/update', ['ip' => $data->ip]) ?></td>
                    <td class="icon-col"><?= $this->qlink(
                            null,
                            'x509/sni/remove',
                            array('ip' => $data->ip),
                            array(
                                'class' => 'action-link',
                                'icon'  => 'cancel',
                                'title' => $this->translate('Remove this SNI map')
                            )
                        ) ?></td>
                </tr>
            <?php endforeach ?>
            </tbody>
        </table>
    <?php endif ?>
</div>
