{$layout}
{$template "../domain_menu"}

<second-menu>
    <menu-item @click.prevent="createKey">[创建密钥]</menu-item>
</second-menu>

<tip-message-box>这里的密钥可以用于TSIG通讯校验。</tip-message-box>

<p class="comment" v-if="keys.length == 0">暂时还没有密钥。</p>

<table class="ui table celled selectable" v-if="keys.length > 0">
    <thead>
        <tr>
            <th class="three wide">密钥名称</th>
            <th class="three wide">算法</th>
            <th>密码</th>
            <th class="two wide">密码类型</th>
            <th class="two wide">状态</th>
            <th class="two op">操作</th>
        </tr>
    </thead>
    <tr v-for="key in keys">
        <td>{{key.name}}</td>
        <td>{{key.algoName}}</td>
        <td>{{key.secret}}</td>
        <td>{{key.secretTypeName}}</td>
        <td>
            <label-on :v-is-on="key.isOn"></label-on>
        </td>
        <td>
            <a href="" @click.prevent="updateKey(key.id)">修改</a> &nbsp;
            <a href="" @click.prevent="deleteKey(key.id)">删除</a>
        </td>
    </tr>
</table>

<div class="page" v-html="page"></div>