将全局的通用设置--域名审核设置移到“集群设置--网站设置”中

This commit is contained in:
GoEdgeLab
2023-09-18 16:07:57 +08:00
parent dc535f96b9
commit b62476b899
6 changed files with 40 additions and 73 deletions

View File

@@ -7,7 +7,7 @@
<csrf-token></csrf-token>
<input type="hidden" name="clusterId" :value="clusterId"/>
<h4>域名</h4>
<h4>域名绑定</h4>
<table class="ui table definition selectable">
<tr>
@@ -81,6 +81,26 @@
</tr>
</table>
<div v-show="teaIsPlus">
<h4>域名审核</h4>
<table class="ui table definition selectable">
<tr>
<td class="title">域名变更时需要审核</td>
<td>
<checkbox name="httpAllDomainAuditingIsOn" v-model="config.httpAll.domainAuditingIsOn"></checkbox>
<p class="comment">选中后,用户在创建和修改域名时需要管理员审核通过才能生效。</p>
</td>
</tr>
<tr v-show="config.httpAll.domainAuditingIsOn">
<td>审核提示</td>
<td>
<input name="httpAllDomainAuditingPrompt" type="text" v-model="config.httpAll.domainAuditingPrompt" maxlength="200"/>
<p class="comment">提示用户需要审核的文字说明。</p>
</td>
</tr>
</table>
</div>
<h4>访问日志</h4>
<table class="ui table definition selectable">
<tr>

View File

@@ -1,33 +1,12 @@
{$layout}
<div class="ui tabular menu tiny">
<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">
<input type="hidden" name="globalConfigJSON" :value="JSON.stringify(globalConfig)"/>
<!-- 域名审核相关配置 -->
<div v-show="tab == 'domainAuditing'">
<table class="ui table definition selectable">
<tr>
<td class="title">域名变更时是否需要审核</td>
<td>
<checkbox v-model="globalConfig.httpAll.domainAuditingIsOn"></checkbox>
<p class="comment">选中后,用户在修改域名时需要管理员审核通过才能生效。</p>
</td>
</tr>
<tr v-show="globalConfig.httpAll.domainAuditingIsOn">
<td>审核提示</td>
<td>
<input type="text" v-model="globalConfig.httpAll.domainAuditingPrompt" maxlength="200"/>
<p class="comment">提示用户需要审核的文字说明。</p>
</td>
</tr>
</table>
</div>
<!-- TCP 相关 -->
<div v-show="tab == 'tcpPorts'">
<table class="ui table definition selectable">

View File

@@ -1,5 +1,5 @@
Tea.context(function () {
this.tab = "domainAuditing"
this.tab = "tcpPorts"
this.$delay(function () {
if (window.location.hash != null && window.location.hash.length > 1) {
@@ -18,41 +18,6 @@ Tea.context(function () {
})
}
/**
* 域名不匹配动作
*/
this.domainMismatchAction = "page"
this.domainMismatchActionPageOptions = {
statusCode: 404,
contentHTML: `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>404 not found</title>
<style type="text/css">
* { font-family: Roboto, system-ui, sans-serif; }
h3, p { text-align: center; }
p { color: grey; }
</style>
</head>
<body>
<h3>Error: 404 Page Not Found</h3>
<h3>找不到您要访问的页面。</h3>
<p>原因:找不到当前访问域名对应的网站,请联系网站管理员。</p>
</body>
</html>`
}
if (this.globalConfig.httpAll.domainMismatchAction != null) {
this.domainMismatchAction = this.globalConfig.httpAll.domainMismatchAction.code
if (this.domainMismatchAction == "page") {
this.domainMismatchActionPageOptions = this.globalConfig.httpAll.domainMismatchAction.options;
}
}
/**
* TCP端口
*/