1.4.5.2
This commit is contained in:
20
EdgeAdmin/web/views/@default/dns/domains/clustersPopup.html
Normal file
20
EdgeAdmin/web/views/@default/dns/domains/clustersPopup.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>使用域名"{{domain}}"的集群</h3>
|
||||
<table class="ui table selectable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>集群</th>
|
||||
<th>域名</th>
|
||||
<th class="width10">解析状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="cluster in clusters">
|
||||
<td>{{cluster.name}}<a :href="'/clusters/cluster?clusterId=' + cluster.id" target="_blank"><link-icon></link-icon></a> </td>
|
||||
<td>{{cluster.dnsName}}.{{domain}}</td>
|
||||
<td>
|
||||
<span class="green" v-if="cluster.isOk">已解析</span>
|
||||
<span class="red" v-else>未解析</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
19
EdgeAdmin/web/views/@default/dns/domains/createPopup.html
Normal file
19
EdgeAdmin/web/views/@default/dns/domains/createPopup.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>添加管理域名</h3>
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<input type="hidden" name="providerId" :value="providerId"/>
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="64" ref="focus"/>
|
||||
<p class="comment">在DNS服务商中可以管理的域名。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
42
EdgeAdmin/web/views/@default/dns/domains/nodesPopup.html
Normal file
42
EdgeAdmin/web/views/@default/dns/domains/nodesPopup.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>使用域名"{{domain}}"的节点</h3>
|
||||
<form class="ui form" action="/dns/domains/nodesPopup" method="get">
|
||||
<input type="hidden" name="domainId" :value="domainId"/>
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field">
|
||||
<input type="text" placeholder="关键词" v-model="keyword"/>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown auto-width" v-model="status">
|
||||
<option value="">[全部状态]</option>
|
||||
<option value="ok">已解析</option>
|
||||
<option value="notOk">未解析</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="ui divider"></div>
|
||||
<table class="ui table selectable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>集群</th>
|
||||
<th>节点</th>
|
||||
<th>子域名</th>
|
||||
<th>线路</th>
|
||||
<th>IP</th>
|
||||
<th class="width10">解析状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="node in nodes">
|
||||
<td>{{node.cluster.name}}<a :href="'/clusters/cluster?clusterId=' + node.cluster.id" target="_blank"><link-icon></link-icon></a> </td>
|
||||
<td>{{node.name}}<a :href="'/clusters/cluster/node?clusterId=' + node.cluster.id + '&nodeId=' + node.id" target="_blank"><link-icon></link-icon></a></td>
|
||||
<td>{{node.cluster.dnsName}}</td>
|
||||
<td>{{node.route.name}}</td>
|
||||
<td>{{node.ipAddr}}</td>
|
||||
<td>
|
||||
<span class="green" v-if="node.isOk">已解析</span>
|
||||
<span class="red" v-else>未解析</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
45
EdgeAdmin/web/views/@default/dns/domains/nodesPopup.js
Normal file
45
EdgeAdmin/web/views/@default/dns/domains/nodesPopup.js
Normal file
@@ -0,0 +1,45 @@
|
||||
Tea.context(function () {
|
||||
this.keyword = ""
|
||||
this.status = ""
|
||||
|
||||
let allNodes = []
|
||||
this.clusters.forEach(function (cluster) {
|
||||
let nodes = cluster.nodes
|
||||
nodes.forEach(function (node) {
|
||||
node.cluster = cluster
|
||||
allNodes.push(node)
|
||||
})
|
||||
})
|
||||
|
||||
this.nodes = allNodes
|
||||
|
||||
this.$delay(function () {
|
||||
this.$watch("keyword", function () {
|
||||
this.reloadNodes()
|
||||
})
|
||||
this.$watch("status", function () {
|
||||
this.reloadNodes()
|
||||
})
|
||||
})
|
||||
|
||||
this.reloadNodes = function () {
|
||||
let that = this
|
||||
this.nodes = allNodes.$copy().$findAll(function (k, v) {
|
||||
if (that.keyword.length > 0
|
||||
&& !teaweb.match(v.cluster.name, that.keyword)
|
||||
&& !teaweb.match(v.cluster.dnsName, that.keyword)
|
||||
&& !teaweb.match(v.name, that.keyword)
|
||||
&& !teaweb.match(v.ipAddr, that.keyword)
|
||||
&& !teaweb.match(v.route.name, that.keyword)) {
|
||||
return false
|
||||
}
|
||||
if (that.status == "ok" && !v.isOk) {
|
||||
return false
|
||||
}
|
||||
if (that.status == "notOk" && v.isOk) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
})
|
||||
18
EdgeAdmin/web/views/@default/dns/domains/routesPopup.html
Normal file
18
EdgeAdmin/web/views/@default/dns/domains/routesPopup.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>域名支持的线路</h3>
|
||||
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">线路</td>
|
||||
<td>
|
||||
<p class="comment" v-if="routes.length == 0">暂时还没有支持的线路。</p>
|
||||
<div v-if="routes.length > 0">
|
||||
<div class="ui label tiny basic" v-for="route in routes" style="margin-bottom: 0.5em">{{route.name}}<span v-if="route.code.length > 0 && route.code != route.name"> ({{route.code}})</span></div>
|
||||
</div>
|
||||
<p class="comment">注意:有些DNS服务商会根据账号的会员级别等限制线路的使用。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<button class="ui button primary" @click.prevent="close" type="button">确定</button>
|
||||
3
EdgeAdmin/web/views/@default/dns/domains/routesPopup.js
Normal file
3
EdgeAdmin/web/views/@default/dns/domains/routesPopup.js
Normal file
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.close = NotifyPopup
|
||||
})
|
||||
39
EdgeAdmin/web/views/@default/dns/domains/selectPopup.html
Normal file
39
EdgeAdmin/web/views/@default/dns/domains/selectPopup.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>选择集群DNS设置</h3>
|
||||
|
||||
<form method="post" class="ui form" data-tea-success="success" data-tea-action="$">
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">DNS服务商</td>
|
||||
<td>
|
||||
<select name="providerType" class="ui dropdown auto-width" v-model="providerType" @change="changeProviderType">
|
||||
<option v-for="providerType in providerTypes" :value="providerType.code">{{providerType.name}}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>账号</td>
|
||||
<td>
|
||||
<p class="comment" v-if="providers.length == 0">没有账号可选</p>
|
||||
<select name="providerId" class="ui dropdown auto-width" v-model="providerId" v-show="providers.length > 0">
|
||||
<option v-for="provider in providers" :value="provider.id">{{provider.name}}</option>
|
||||
</select>
|
||||
<p class="comment"><a href="/dns/providers" target="_blank">去管理DNS服务商账号»</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="providerId > 0">
|
||||
<td>域名</td>
|
||||
<td>
|
||||
<p class="comment" v-if="domains.length == 0">没有域名可选</p>
|
||||
<select name="domainId" class="ui dropdown auto-width" v-model="domainId" v-show="domains.length > 0">
|
||||
<option v-for="domain in domains" :value="domain.id">{{domain.name}}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
80
EdgeAdmin/web/views/@default/dns/domains/selectPopup.js
Normal file
80
EdgeAdmin/web/views/@default/dns/domains/selectPopup.js
Normal file
@@ -0,0 +1,80 @@
|
||||
Tea.context(function () {
|
||||
this.$delay(function () {
|
||||
this.changeProviderType()
|
||||
this.changeProvider()
|
||||
|
||||
this.$watch("providerId", function () {
|
||||
this.changeProvider()
|
||||
})
|
||||
this.$watch("domainId", function () {
|
||||
this.changeDomain()
|
||||
})
|
||||
})
|
||||
|
||||
this.success = NotifyPopup
|
||||
|
||||
// 初始化的内容
|
||||
// this.domainId = 0
|
||||
// this.domain = ""
|
||||
// this.providerId = 0
|
||||
|
||||
if (this.providerType == "") {
|
||||
this.providerType = this.providerTypes[0].code
|
||||
}
|
||||
this.providers = []
|
||||
this.domains = []
|
||||
|
||||
this.changeProviderType = function () {
|
||||
this.$post("/dns/providerOptions")
|
||||
.params({
|
||||
type: this.providerType
|
||||
})
|
||||
.success(function (resp) {
|
||||
this.providers = resp.data.providers
|
||||
|
||||
// 检查providerId
|
||||
if (this.providers.length == 0) {
|
||||
this.providerId = 0
|
||||
return
|
||||
}
|
||||
let that = this
|
||||
if (this.providers.$find(function (k, v) {
|
||||
return v.id == that.providerId
|
||||
}) == null) {
|
||||
this.providerId = this.providers[0].id
|
||||
}
|
||||
this.changeProvider()
|
||||
})
|
||||
}
|
||||
|
||||
this.changeProvider = function () {
|
||||
this.$post("/dns/domainOptions")
|
||||
.params({
|
||||
providerId: this.providerId
|
||||
})
|
||||
.success(function (resp) {
|
||||
this.domains = resp.data.domains
|
||||
this.changeDomain()
|
||||
})
|
||||
}
|
||||
|
||||
this.changeDomain = function () {
|
||||
if (this.domains.length == 0) {
|
||||
this.domainId = 0
|
||||
this.domain = ""
|
||||
return
|
||||
}
|
||||
|
||||
let domainId = this.domainId
|
||||
let domainInfo = this.domains.$find(function (k, v) {
|
||||
return v.id == domainId
|
||||
})
|
||||
if (domainInfo == null) {
|
||||
// 默认选取第一个
|
||||
this.domainId = this.domains[0].id
|
||||
this.domain = this.domains[0].name
|
||||
} else {
|
||||
this.domain = domainInfo.name
|
||||
}
|
||||
}
|
||||
})
|
||||
40
EdgeAdmin/web/views/@default/dns/domains/serversPopup.html
Normal file
40
EdgeAdmin/web/views/@default/dns/domains/serversPopup.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>使用域名"{{domain}}"的网站</h3>
|
||||
<form class="ui form" action="/dns/domains/serversPopup" method="get">
|
||||
<input type="hidden" name="domainId" :value="domainId"/>
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field">
|
||||
<input type="text" placeholder="关键词" v-model="keyword"/>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown auto-width" v-model="status">
|
||||
<option value="">[全部状态]</option>
|
||||
<option value="ok">已解析</option>
|
||||
<option value="notOk">未解析</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="ui divider"></div>
|
||||
<table class="ui table selectable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>集群</th>
|
||||
<th>网站</th>
|
||||
<th>子域名</th>
|
||||
<th>CNAME</th>
|
||||
<th class="width10">解析状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="server in servers">
|
||||
<td>{{server.cluster.name}}<a :href="'/clusters/cluster?clusterId=' + server.cluster.id" target="_blank"><link-icon></link-icon></a> </td>
|
||||
<td>{{server.name}}<a :href="'/servers/server?clusterId=' + server.cluster.id + '&serverId=' + server.id" target="_blank"><link-icon></link-icon></a></td>
|
||||
<td>{{server.cluster.dnsName}}</td>
|
||||
<td>{{server.dnsName}}</td>
|
||||
<td>
|
||||
<span class="green" v-if="server.isOk">已解析</span>
|
||||
<span class="red" v-else>未解析</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
44
EdgeAdmin/web/views/@default/dns/domains/serversPopup.js
Normal file
44
EdgeAdmin/web/views/@default/dns/domains/serversPopup.js
Normal file
@@ -0,0 +1,44 @@
|
||||
Tea.context(function () {
|
||||
this.keyword = ""
|
||||
this.status = ""
|
||||
|
||||
let allServers = []
|
||||
this.clusters.forEach(function (cluster) {
|
||||
let servers = cluster.servers
|
||||
servers.forEach(function (server) {
|
||||
server.cluster = cluster
|
||||
allServers.push(server)
|
||||
})
|
||||
})
|
||||
|
||||
this.servers = allServers
|
||||
|
||||
this.$delay(function () {
|
||||
this.$watch("keyword", function () {
|
||||
this.reloadServers()
|
||||
})
|
||||
this.$watch("status", function () {
|
||||
this.reloadServers()
|
||||
})
|
||||
})
|
||||
|
||||
this.reloadServers = function () {
|
||||
let that = this
|
||||
this.servers = allServers.$copy().$findAll(function (k, v) {
|
||||
if (that.keyword.length > 0
|
||||
&& !teaweb.match(v.cluster.name, that.keyword)
|
||||
&& !teaweb.match(v.cluster.dnsName, that.keyword)
|
||||
&& !teaweb.match(v.name, that.keyword)
|
||||
&& !teaweb.match(v.dnsName, that.keyword)) {
|
||||
return false
|
||||
}
|
||||
if (that.status == "ok" && !v.isOk) {
|
||||
return false
|
||||
}
|
||||
if (that.status == "notOk" && v.isOk) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
})
|
||||
33
EdgeAdmin/web/views/@default/dns/domains/updatePopup.html
Normal file
33
EdgeAdmin/web/views/@default/dns/domains/updatePopup.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>修改管理域名</h3>
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<input type="hidden" name="domainId" :value="domain.id"/>
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">域名 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="64" ref="focus" v-model="domain.name"/>
|
||||
<p class="comment">在DNS服务商中可以管理的域名。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>启用当前域名</td>
|
||||
<td>
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="isOn" value="1" v-model="domain.isOn"/>
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
Reference in New Issue
Block a user