From 6c4395ed5ec0f3c9a75573a1109d70e44b3bbfc9 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 8 Sep 2022 11:02:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E9=9B=86=E7=BE=A4=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E5=8F=AF=E4=BB=A5=E8=AE=BE=E7=BD=AEDNS?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=9A=84=E9=BB=98=E8=AE=A4TTL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/actions/default/clusters/create.go | 4 +++- .../@default/clusters/cluster/settings/dns/index.html | 2 +- web/views/@default/clusters/create.html | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/internal/web/actions/default/clusters/create.go b/internal/web/actions/default/clusters/create.go index 5fb5ae8f..ec3ba712 100644 --- a/internal/web/actions/default/clusters/create.go +++ b/internal/web/actions/default/clusters/create.go @@ -63,6 +63,7 @@ func (this *CreateAction) RunPost(params struct { // DNS相关 DnsDomainId int64 DnsName string + DnsTTL int32 Must *actions.Must }) { @@ -93,7 +94,7 @@ func (this *CreateAction) RunPost(params struct { // TODO 检查DnsDomainId的有效性 // 系统服务 - systemServices := map[string]interface{}{} + var systemServices = map[string]any{} if params.SystemdServiceIsOn { systemServices[nodeconfigs.SystemServiceTypeSystemd] = &nodeconfigs.SystemdServiceConfig{ IsOn: true, @@ -111,6 +112,7 @@ func (this *CreateAction) RunPost(params struct { InstallDir: params.InstallDir, DnsDomainId: params.DnsDomainId, DnsName: params.DnsName, + DnsTTL: params.DnsTTL, HttpCachePolicyId: params.CachePolicyId, HttpFirewallPolicyId: params.HttpFirewallPolicyId, SystemServicesJSON: systemServicesJSON, diff --git a/web/views/@default/clusters/cluster/settings/dns/index.html b/web/views/@default/clusters/cluster/settings/dns/index.html index 084f7012..b70f243e 100644 --- a/web/views/@default/clusters/cluster/settings/dns/index.html +++ b/web/views/@default/clusters/cluster/settings/dns/index.html @@ -60,7 +60,7 @@ - 记录TTL + 解析记录TTL
diff --git a/web/views/@default/clusters/create.html b/web/views/@default/clusters/create.html index 6b00c7b2..79dc5044 100644 --- a/web/views/@default/clusters/create.html +++ b/web/views/@default/clusters/create.html @@ -71,6 +71,16 @@

当前集群的子域名,和主域名一起组成集群节点的子域名。

+ + 解析记录TTL + +
+ + +
+

生成解析记录时使用的TTL;每个DNS服务商或者套餐、账号限制各有不同,请注意允许的取值范围。0表示使用默认。

+ +