mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-10 00:00:26 +08:00
界面优化
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<div class="ui tabular menu tiny">
|
||||
<a href="" class="item" :class="{active: tab == 'domainMatch'}" @click.prevent="selectTab('domainMatch')">域名匹配配置</a>
|
||||
<a href="" class="item" :class="{active: tab == 'domainAuditing'}" @click.prevent="selectTab('domainAuditing')">域名审核配置</a>
|
||||
<a href="" class="item" :class="{active: tab == 'tcpPorts'}" @click.prevent="selectTab('tcpPorts')">TCP/TLS端口</a>
|
||||
</div>
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
@@ -78,6 +79,36 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- TCP 相关 -->
|
||||
<div v-show="tab == 'tcpPorts'">
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">允许的端口范围</td>
|
||||
<td>
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field">
|
||||
<input type="text" name="tcpAllPortRangeMin" maxlength="5" size="6" v-model="tcpAllPortRangeMin"/>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
-
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<input type="text" name="tcpAllPortRangeMax" maxlength="5" size="6" v-model="tcpAllPortRangeMax"/>
|
||||
</div>
|
||||
</div>
|
||||
<p class="comment">用户创建TCP/TLS负载均衡服务时可以随机选择的端口范围,最小不能小于1024,最大不能大于65534。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>排除的端口</td>
|
||||
<td>
|
||||
<values-box placeholder="端口" size="6" name="tcpAllDenyPorts" :values="tcpAllDenyPorts"></values-box>
|
||||
<p class="comment">当为用户随机分配端口时要排除的端口。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="margin"></div>
|
||||
<submit-btn>保存</submit-btn>
|
||||
</form>
|
||||
|
||||
@@ -1,22 +1,31 @@
|
||||
Tea.context(function () {
|
||||
this.tab = "domainMatch"
|
||||
this.tab = "domainMatch"
|
||||
|
||||
this.selectTab = function (tab) {
|
||||
this.tab = tab
|
||||
}
|
||||
this.$delay(function () {
|
||||
if (window.location.hash != null && window.location.hash.length > 1) {
|
||||
this.selectTab(window.location.hash.substr(1))
|
||||
}
|
||||
})
|
||||
|
||||
this.success = function () {
|
||||
teaweb.success("保存成功")
|
||||
}
|
||||
this.selectTab = function (tab) {
|
||||
this.tab = tab
|
||||
window.location.hash = "#" + tab
|
||||
}
|
||||
|
||||
/**
|
||||
* 域名不匹配动作
|
||||
*/
|
||||
this.domainMismatchAction = "page"
|
||||
this.success = function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
|
||||
this.domainMismatchActionPageOptions = {
|
||||
statusCode: 404,
|
||||
contentHTML: `<!DOCTYPE html>
|
||||
/**
|
||||
* 域名不匹配动作
|
||||
*/
|
||||
this.domainMismatchAction = "page"
|
||||
|
||||
this.domainMismatchActionPageOptions = {
|
||||
statusCode: 404,
|
||||
contentHTML: `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
@@ -28,13 +37,29 @@ Tea.context(function () {
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
}
|
||||
if (this.globalConfig.httpAll.domainMismatchAction != null) {
|
||||
this.domainMismatchAction = this.globalConfig.httpAll.domainMismatchAction.code
|
||||
}
|
||||
if (this.globalConfig.httpAll.domainMismatchAction != null) {
|
||||
this.domainMismatchAction = this.globalConfig.httpAll.domainMismatchAction.code
|
||||
|
||||
if (this.domainMismatchAction == "page") {
|
||||
this.domainMismatchActionPageOptions = this.globalConfig.httpAll.domainMismatchAction.options;
|
||||
}
|
||||
}
|
||||
if (this.domainMismatchAction == "page") {
|
||||
this.domainMismatchActionPageOptions = this.globalConfig.httpAll.domainMismatchAction.options;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TCP端口
|
||||
*/
|
||||
this.tcpAllPortRangeMin = 10000
|
||||
this.tcpAllPortRangeMax = 40000
|
||||
if (this.globalConfig.tcpAll.portRangeMin > 0) {
|
||||
this.tcpAllPortRangeMin = this.globalConfig.tcpAll.portRangeMin
|
||||
}
|
||||
if (this.globalConfig.tcpAll.portRangeMax > 0) {
|
||||
this.tcpAllPortRangeMax = this.globalConfig.tcpAll.portRangeMax
|
||||
}
|
||||
|
||||
this.tcpAllDenyPorts = []
|
||||
if (this.globalConfig.tcpAll.denyPorts != null) {
|
||||
this.tcpAllDenyPorts = this.globalConfig.tcpAll.denyPorts
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user