mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-29 22:36:35 +08:00
实现域名服务器集群管理
This commit is contained in:
4
web/views/@default/ns/clusters/@menu.html
Normal file
4
web/views/@default/ns/clusters/@menu.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<first-menu>
|
||||
<menu-item href="/ns/clusters" code="index">集群列表</menu-item>
|
||||
<menu-item href="/ns/clusters/create" code="create">创建集群</menu-item>
|
||||
</first-menu>
|
||||
8
web/views/@default/ns/clusters/cluster/delete.css
Normal file
8
web/views/@default/ns/clusters/cluster/delete.css
Normal file
@@ -0,0 +1,8 @@
|
||||
.buttons-box {
|
||||
text-align: center;
|
||||
margin-top: 2em;
|
||||
}
|
||||
.buttons-box button {
|
||||
width: 20em;
|
||||
}
|
||||
/*# sourceMappingURL=delete.css.map */
|
||||
1
web/views/@default/ns/clusters/cluster/delete.css.map
Normal file
1
web/views/@default/ns/clusters/cluster/delete.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["delete.less"],"names":[],"mappings":"AAAA;EACC,kBAAA;EACA,eAAA;;AAFD,YAIC;EACC,WAAA","file":"delete.css"}
|
||||
5
web/views/@default/ns/clusters/cluster/delete.html
Normal file
5
web/views/@default/ns/clusters/cluster/delete.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{$layout}
|
||||
|
||||
<div class="buttons-box">
|
||||
<button class="ui button red" type="button" @click.prevent="deleteCluster(clusterId)">删除当前集群</button>
|
||||
</div>
|
||||
16
web/views/@default/ns/clusters/cluster/delete.js
Normal file
16
web/views/@default/ns/clusters/cluster/delete.js
Normal file
@@ -0,0 +1,16 @@
|
||||
Tea.context(function () {
|
||||
this.deleteCluster = function (clusterId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此集群吗?", function () {
|
||||
that.$post("/ns/clusters/cluster/delete")
|
||||
.params({
|
||||
clusterId: clusterId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.success("删除成功", function () {
|
||||
window.location = "/ns/clusters"
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
8
web/views/@default/ns/clusters/cluster/delete.less
Normal file
8
web/views/@default/ns/clusters/cluster/delete.less
Normal file
@@ -0,0 +1,8 @@
|
||||
.buttons-box {
|
||||
text-align: center;
|
||||
margin-top: 2em;
|
||||
|
||||
button {
|
||||
width: 20em;
|
||||
}
|
||||
}
|
||||
1
web/views/@default/ns/clusters/cluster/index.html
Normal file
1
web/views/@default/ns/clusters/cluster/index.html
Normal file
@@ -0,0 +1 @@
|
||||
{$layout}
|
||||
28
web/views/@default/ns/clusters/cluster/settings/index.html
Normal file
28
web/views/@default/ns/clusters/cluster/settings/index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{$layout}
|
||||
{$template "/left_menu"}
|
||||
|
||||
<div class="right-box">
|
||||
<h3>基础设置</h3>
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="clusterId" :value="cluster.id"/>
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">集群名称 *</td>
|
||||
<td><input type="text" name="name" maxlength="50" ref="focus" v-model="cluster.name"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>是否启用</td>
|
||||
<td>
|
||||
<checkbox name="isOn" value="1" v-model="cluster.isOn"></checkbox>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
</div>
|
||||
3
web/views/@default/ns/clusters/cluster/settings/index.js
Normal file
3
web/views/@default/ns/clusters/cluster/settings/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
})
|
||||
16
web/views/@default/ns/clusters/create.html
Normal file
16
web/views/@default/ns/clusters/create.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<div class="ui margin"></div>
|
||||
<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>
|
||||
<input type="text" name="name" maxlength="50" ref="focus"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
3
web/views/@default/ns/clusters/create.js
Normal file
3
web/views/@default/ns/clusters/create.js
Normal file
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifySuccess("保存成功", "/ns/clusters")
|
||||
})
|
||||
25
web/views/@default/ns/clusters/index.html
Normal file
25
web/views/@default/ns/clusters/index.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<p class="comment" v-if="clusters.length == 0">暂时还没有集群。</p>
|
||||
|
||||
<table class="ui table selectable celled" v-if="clusters.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>集群名称</th>
|
||||
<th class="two wide">集群状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="cluster in clusters">
|
||||
<td>{{cluster.name}}</td>
|
||||
<td>
|
||||
<label-on :v-is-on="cluster.isOn"></label-on>
|
||||
</td>
|
||||
<td>
|
||||
<a :href="'/ns/clusters/cluster?clusterId=' + cluster.id">详情</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="page" v-html="page"></div>
|
||||
Reference in New Issue
Block a user