1.4.5.2
This commit is contained in:
9
EdgeUser/web/views/@default/ns/domains/batch/@menu.html
Normal file
9
EdgeUser/web/views/@default/ns/domains/batch/@menu.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<first-menu>
|
||||
<menu-item href="/ns/domains/batch" :active="secondMenuItem == 'index'">添加域名</menu-item>
|
||||
<menu-item href="/ns/domains/batch/deleteDomains" :active="secondMenuItem == 'deleteDomains'">删除域名</menu-item>
|
||||
<menu-item href="/ns/domains/batch/createRecords" :active="secondMenuItem == 'createRecords'">添加解析</menu-item>
|
||||
<menu-item href="/ns/domains/batch/updateRecords" :active="secondMenuItem == 'updateRecords'">修改解析</menu-item>
|
||||
<menu-item href="/ns/domains/batch/deleteRecords" :active="secondMenuItem == 'deleteRecords'">删除解析</menu-item>
|
||||
<menu-item href="/ns/domains/batch/enableRecords" :active="secondMenuItem == 'enableRecords'">启用/暂停解析</menu-item>
|
||||
<menu-item href="/ns/domains/batch/importRecords" :active="secondMenuItem == 'importRecords'">混合添加解析</menu-item>
|
||||
</first-menu>
|
||||
@@ -0,0 +1,35 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<textarea rows="15" name="names" placeholder="每行一个域名" ref="focus"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>解析记录 *</td>
|
||||
<td>
|
||||
<ns-create-records-table :v-types="types" :v-default-ttl="defaultTTL"></ns-create-records-table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>删除原有同名记录</td>
|
||||
<td>
|
||||
<checkbox name="removeOld"></checkbox>
|
||||
<p class="comment">选中后,在导入新的记录之前,先删除域名中的同名且同类型记录。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>清空原有记录</td>
|
||||
<td>
|
||||
<checkbox name="removeAll"></checkbox>
|
||||
<p class="comment">选中后,在导入新的记录之前,先清空域名中的所有记录。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
})
|
||||
@@ -0,0 +1,15 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<textarea name="names" rows="15" ref="focus" placeholder="每行一个域名"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn>批量删除</submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("删除成功")
|
||||
})
|
||||
@@ -0,0 +1,50 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<textarea rows="15" name="names" placeholder="每行一个域名" ref="focus"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>匹配条件</td>
|
||||
<td>
|
||||
<table class="ui table definition">
|
||||
<tr>
|
||||
<td class="title">记录名</td>
|
||||
<td>
|
||||
<input type="text" name="searchName"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录值</td>
|
||||
<td>
|
||||
<input type="text" name="searchValue"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录类型</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="searchType">
|
||||
<option v-for="type in types" :value="type.type">{{type.type}}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>线路</td>
|
||||
<td>
|
||||
<ns-routes-selector name="searchRouteCodes"></ns-routes-selector>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn>批量删除</submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("删除成功")
|
||||
})
|
||||
@@ -0,0 +1,59 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<textarea rows="15" name="names" placeholder="每行一个域名" ref="focus"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>匹配条件</td>
|
||||
<td>
|
||||
<table class="ui table definition">
|
||||
<tr>
|
||||
<td class="title">记录名</td>
|
||||
<td>
|
||||
<input type="text" name="searchName"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录值</td>
|
||||
<td>
|
||||
<input type="text" name="searchValue"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录类型</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="searchType">
|
||||
<option v-for="type in types" :value="type.type">{{type.type}}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>线路</td>
|
||||
<td>
|
||||
<ns-routes-selector name="searchRouteCodes"></ns-routes-selector>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>修改状态为</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="isOn">
|
||||
<option value="1">启用</option>
|
||||
<option value="0">停用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn>批量修改</submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
})
|
||||
@@ -0,0 +1,17 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">解析记录 *</td>
|
||||
<td>
|
||||
<textarea rows="15" name="records" placeholder="每行一个解析记录
|
||||
example.com www A 192.168.1.100 600" ref="focus"></textarea>
|
||||
<p class="comment">每行一个解析记录,格式:<code-label>域名 记录名 记录类型 记录值 TTL</code-label>,比如<code-label>example.com www A 192.168.1.100 600</code-label>,各项用空格隔开。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn>批量导入</submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("导入成功")
|
||||
})
|
||||
21
EdgeUser/web/views/@default/ns/domains/batch/index.html
Normal file
21
EdgeUser/web/views/@default/ns/domains/batch/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<textarea rows="15" name="names" placeholder="每行一个域名" ref="namesInput"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="hasGroups">
|
||||
<td>所属分组</td>
|
||||
<td>
|
||||
<ns-domain-group-selector ref="groupSelector"></ns-domain-group-selector>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
24
EdgeUser/web/views/@default/ns/domains/batch/index.js
Normal file
24
EdgeUser/web/views/@default/ns/domains/batch/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
Tea.context(function () {
|
||||
this.$delay(function () {
|
||||
this.$refs.namesInput.focus()
|
||||
this.changeUserId(0)
|
||||
})
|
||||
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
|
||||
this.hasGroups = false
|
||||
this.changeUserId = function (userId) {
|
||||
this.$post("/ns/domains/groups/options")
|
||||
.params({
|
||||
userId: userId
|
||||
})
|
||||
.success(function (resp) {
|
||||
this.hasGroups = resp.data.groups.length > 0
|
||||
if (this.hasGroups) {
|
||||
this.$delay(function () {
|
||||
this.$refs.groupSelector.reload(userId)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,85 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<textarea rows="15" name="names" placeholder="每行一个域名" ref="focus"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>匹配条件</td>
|
||||
<td>
|
||||
<table class="ui table definition">
|
||||
<tr>
|
||||
<td class="title">记录名</td>
|
||||
<td>
|
||||
<input type="text" name="searchName"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录值</td>
|
||||
<td>
|
||||
<input type="text" name="searchValue"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录类型</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="searchType">
|
||||
<option v-for="type in types" :value="type.type">{{type.type}}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>线路</td>
|
||||
<td>
|
||||
<ns-routes-selector name="searchRouteCodes"></ns-routes-selector>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>修改后的记录</td>
|
||||
<td>
|
||||
<table class="ui table definition">
|
||||
<tr>
|
||||
<td class="title">记录名</td>
|
||||
<td>
|
||||
<input type="text" name="newName"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录值</td>
|
||||
<td>
|
||||
<input type="text" name="newValue"/>
|
||||
<p class="comment">只有不为空时才生效。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>记录类型</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="newType">
|
||||
<option v-for="type in types" :value="type.type">{{type.type}}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>线路</td>
|
||||
<td>
|
||||
<ns-routes-selector name="newRouteCodes"></ns-routes-selector>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn>批量修改</submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
})
|
||||
Reference in New Issue
Block a user