mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 20:40:26 +08:00
可以设置集群的DNS记录TTL
This commit is contained in:
@@ -51,6 +51,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
} else {
|
||||
this.Data["cnameRecords"] = dnsInfoResp.CnameRecords
|
||||
}
|
||||
this.Data["ttl"] = dnsInfoResp.Ttl
|
||||
|
||||
this.Show()
|
||||
}
|
||||
@@ -63,6 +64,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
NodesAutoSync bool
|
||||
ServersAutoSync bool
|
||||
CnameRecords []string
|
||||
Ttl int32
|
||||
|
||||
Must *actions.Must
|
||||
CSRF *actionutils.CSRF
|
||||
@@ -105,6 +107,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
NodesAutoSync: params.NodesAutoSync,
|
||||
ServersAutoSync: params.ServersAutoSync,
|
||||
CnameRecords: params.CnameRecords,
|
||||
Ttl: params.Ttl,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
// 修改集群的DNS设置
|
||||
// UpdateClusterPopupAction 修改集群的DNS设置
|
||||
type UpdateClusterPopupAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
@@ -52,6 +52,8 @@ func (this *UpdateClusterPopupAction) RunGet(params struct {
|
||||
this.Data["cnameRecords"] = dnsResp.CnameRecords
|
||||
}
|
||||
|
||||
this.Data["ttl"] = dnsResp.Ttl
|
||||
|
||||
// 所有服务商
|
||||
providerTypesResp, err := this.RPC().DNSProviderRPC().FindAllDNSProviderTypes(this.AdminContext(), &pb.FindAllDNSProviderTypesRequest{})
|
||||
if err != nil {
|
||||
@@ -77,6 +79,7 @@ func (this *UpdateClusterPopupAction) RunPost(params struct {
|
||||
NodesAutoSync bool
|
||||
ServersAutoSync bool
|
||||
CnameRecords []string
|
||||
Ttl int32
|
||||
|
||||
Must *actions.Must
|
||||
CSRF *actionutils.CSRF
|
||||
@@ -111,6 +114,7 @@ func (this *UpdateClusterPopupAction) RunPost(params struct {
|
||||
NodesAutoSync: params.NodesAutoSync,
|
||||
ServersAutoSync: params.ServersAutoSync,
|
||||
CnameRecords: params.CnameRecords,
|
||||
Ttl: params.Ttl,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -30,13 +30,23 @@
|
||||
<td>自动设置CNAME记录</td>
|
||||
<td>
|
||||
<values-box :values="cnameRecords" name="cnameRecords" placeholder="记录名" ref="cnameRecords"></values-box>
|
||||
<p class="comment">除了集群节点记录之外,自动加入的CNAME记录,比如<code-label @click.prevent="addCnameRecord('@')">@</code-label>、<code-label @click.prevent="addCnameRecord('www')">www</code-label>。</p>
|
||||
<p class="comment">除集群已创建的网站服务之外,自动解析到集群的CNAME记录,比如<code-label @click.prevent="addCnameRecord('@')">@</code-label>、<code-label @click.prevent="addCnameRecord('www')">www</code-label>。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>记录TTL</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="ttl" maxlength="6" style="width: 6em" v-model="ttl"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">每个DNS服务商或者账号的TTL限制各有不同,请注意取值范围。0表示使用默认。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否同步节点DNS状态</td>
|
||||
<td>
|
||||
|
||||
@@ -48,13 +48,23 @@
|
||||
<td>自动设置CNAME记录</td>
|
||||
<td>
|
||||
<values-box :values="cnameRecords" name="cnameRecords" placeholder="记录名" ref="cnameRecords"></values-box>
|
||||
<p class="comment">除了集群节点记录之外,自动加入的CNAME记录,比如<code-label @click.prevent="addCnameRecord('@')">@</code-label>、<code-label @click.prevent="addCnameRecord('www')">www</code-label>。</p>
|
||||
<p class="comment">除集群已创建的网站服务之外,自动解析到集群的CNAME记录,比如<code-label @click.prevent="addCnameRecord('@')">@</code-label>、<code-label @click.prevent="addCnameRecord('www')">www</code-label>。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>记录TTL</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="ttl" maxlength="6" style="width: 6em" v-model="ttl"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">每个DNS服务商或者账号的TTL限制各有不同,请注意取值范围。0表示使用默认。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否同步节点DNS状态</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user