Initial commit (code only without large binaries)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{$layout}
|
||||
{$template "../settings_menu"}
|
||||
{$template "/left_menu_with_menu"}
|
||||
|
||||
<div class="right-box with-menu">
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="serverId" :value="serverId"/>
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">当前网站CNAME</td>
|
||||
<td>
|
||||
<span id="cname-text">{{dnsName}}.<span v-if="dnsDomain.length > 0">{{dnsDomain}}</span><span v-else>根域名</span></span> <copy-to-clipboard :v-target="'cname-text'"></copy-to-clipboard> <a href="" @click.prevent="regenerateCNAME()" style="font-size: 0.8em">[重新生成]</a> <a href="" @click.prevent="updateCNAME()" style="font-size: 0.8em">[手动修改]</a>
|
||||
<p class="comment">你需要为你的每个<a :href="'/servers/server/settings/serverNames?serverId=' + serverId">网站域名</a>设置一个CNAME解析,值为上面内容。</p>
|
||||
<p v-if="dnsDomain.length == 0"><span class="red">你尚未为当前网站所在集群指定CNAME根域名,可以在 <a :href="'/clusters/cluster/settings/dns?clusterId=' + server.clusterId" target="_blank">[这里]</a> 修改。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支持任意域名CNAME</td>
|
||||
<td>
|
||||
<checkbox name="supportCNAME" v-model="supportCNAME"></checkbox>
|
||||
<p class="comment">选中后表示允许任意域名使用此服务的CNAME直接访问此服务。需要节点服务器可以正确解析DNS记录。在严格匹配域名时才会生效。此选项可能导致安全问题,请谨慎开启。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,22 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
|
||||
this.regenerateCNAME = function () {
|
||||
let serverId = this.serverId
|
||||
teaweb.confirm("确定要重新生成此服务的CNAME吗?", function () {
|
||||
this.$post(".regenerateCNAME")
|
||||
.params({
|
||||
serverId: serverId
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
|
||||
this.updateCNAME = function () {
|
||||
teaweb.popup("/servers/server/settings/dns/updateCNAMEPopup?serverId=" + this.serverId, {
|
||||
callback: function () {
|
||||
teaweb.successRefresh("保存成功")
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,20 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>修改服务CNAME</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<input type="hidden" name="serverId" :value="serverId"/>
|
||||
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">CNAME *</td>
|
||||
<td>
|
||||
<input type="text" name="dnsName" maxlength="30" v-model="dnsName"/>
|
||||
<p class="comment">英文字母、数字的组合,最长30个字符。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
Reference in New Issue
Block a user