1.4.5.2
This commit is contained in:
50
EdgeAdmin/web/views/@default/dns/issues/index.html
Normal file
50
EdgeAdmin/web/views/@default/dns/issues/index.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{$layout}
|
||||
|
||||
<first-menu>
|
||||
<span class="item" v-if="issues.length > 0">共<span class="red">{{issues.length}}</span>个问题</span>
|
||||
<span class="item" v-if="issues.length > 0">|</span>
|
||||
<a href="/dns/issues" title="刷新" class="item" @click.prevent="reload">刷新</a>
|
||||
<span class="item">|</span>
|
||||
<span class="item"><tip-icon content="这里是一个全局的DNS解析问题发现页,方便我们诊断并修复问题。"></tip-icon></span>
|
||||
</first-menu>
|
||||
|
||||
<div v-if="isRequesting">
|
||||
<div class="margin"></div>
|
||||
正在检查系统问题,请耐心等待...
|
||||
</div>
|
||||
|
||||
<div v-if="issues.length == 0 && !isRequesting">
|
||||
<div class="margin"></div>
|
||||
<p class="comment">暂时没有发现问题。</p>
|
||||
</div>
|
||||
|
||||
<table class="ui table selectable celled" v-if="issues.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50%">问题对象</th>
|
||||
<th>问题描述</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="issue in issues">
|
||||
<td>
|
||||
<div v-if="issue.type == 'cluster'">
|
||||
集群 "{{issue.target}}" <link-icon :href="'/clusters/cluster?clusterId=' + issue.targetId"></link-icon>
|
||||
</div>
|
||||
<div v-if="issue.type == 'node'">
|
||||
集群 "{{issue.params.clusterName}}" 节点 "{{issue.target}}" <link-icon :href="'/clusters/cluster/node?clusterId=' + issue.params.clusterId + '&nodeId=' + issue.targetId"></link-icon>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{issue.description}}</span>
|
||||
</td>
|
||||
<td>
|
||||
<div v-if="issue.type == 'cluster'">
|
||||
<link-red @click.prevent="updateCluster(issue.targetId)">修复</link-red>
|
||||
</div>
|
||||
<div v-if="issue.type == 'node'">
|
||||
<link-red @click.prevent="updateNode(issue.params.clusterId, issue.targetId)">修复</link-red>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
43
EdgeAdmin/web/views/@default/dns/issues/index.js
Normal file
43
EdgeAdmin/web/views/@default/dns/issues/index.js
Normal file
@@ -0,0 +1,43 @@
|
||||
Tea.context(function () {
|
||||
this.isRequesting = true
|
||||
|
||||
this.$delay(function () {
|
||||
this.reload()
|
||||
})
|
||||
|
||||
this.updateCluster = function (clusterId) {
|
||||
let that = this
|
||||
teaweb.popup("/dns/updateClusterPopup?clusterId=" + clusterId, {
|
||||
height: "25em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
that.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.updateNode = function (clusterId, nodeId) {
|
||||
let that = this
|
||||
teaweb.popup("/dns/issues/updateNodePopup?clusterId=" + clusterId + "&nodeId=" + nodeId, {
|
||||
width: "46em",
|
||||
height: "26em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
that.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.reload = function () {
|
||||
this.isRequesting = true
|
||||
this.$post("$")
|
||||
.success(function (resp) {
|
||||
this.issues = resp.data.issues;
|
||||
})
|
||||
.done(function () {
|
||||
this.isRequesting = false
|
||||
})
|
||||
}
|
||||
})
|
||||
42
EdgeAdmin/web/views/@default/dns/issues/updateNodePopup.html
Normal file
42
EdgeAdmin/web/views/@default/dns/issues/updateNodePopup.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>修改节点DNS设置</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<input type="hidden" name="nodeId" :value="nodeId"/>
|
||||
<input type="hidden" name="domainId" :value="domainId"/>
|
||||
<input type="hidden" name="ipAddrId" :value="ipAddrId"/>
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<table class="ui table definition selectable">
|
||||
<tr v-if="domainName.length > 0">
|
||||
<td>主域名</td>
|
||||
<td>{{domainName}}
|
||||
<p class="comment">由当前节点所属集群设置。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title">IP地址 *</td>
|
||||
<td>
|
||||
<input type="text" name="ipAddr" maxlength="64" ref="focus" v-model="ipAddr"/>
|
||||
<p class="comment">用于域名解析的节点IP地址。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="domainId > 0">
|
||||
<td>线路</td>
|
||||
<td>
|
||||
<p class="comment" v-if="allRoutes.length == 0">没有可选的线路。<a href="" @click.prevent="syncDomain(domainId)">[获取线路]</a></p>
|
||||
<div v-if="allRoutes.length > 0">
|
||||
<dns-route-selector :v-all-routes="allRoutes" :v-routes="routes"></dns-route-selector>
|
||||
<p class="comment">当前节点IP对应的线路。<a href="" @click.prevent="syncDomain(domainId)">[重新获取线路]</a></p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="domainId == 0">
|
||||
<td>线路</td>
|
||||
<td><span class="disabled">当前集群没有选择域名。</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
13
EdgeAdmin/web/views/@default/dns/issues/updateNodePopup.js
Normal file
13
EdgeAdmin/web/views/@default/dns/issues/updateNodePopup.js
Normal file
@@ -0,0 +1,13 @@
|
||||
Tea.context(function () {
|
||||
this.syncDomain = function (domainId) {
|
||||
this.$post(".syncDomain")
|
||||
.params({
|
||||
domainId: domainId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.success("从服务商获取线路成功", function () {
|
||||
window.location.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user