diff --git a/internal/web/actions/default/dns/providers/createPopup.go b/internal/web/actions/default/dns/providers/createPopup.go index 8239aac3..7ea1fd06 100644 --- a/internal/web/actions/default/dns/providers/createPopup.go +++ b/internal/web/actions/default/dns/providers/createPopup.go @@ -55,6 +55,10 @@ func (this *CreatePopupAction) RunPost(params struct { ParamApiKey string ParamApiSecret string + // CloudFlare + CloudFlareAPIKey string + CloudFlareEmail string + // CustomHTTP ParamCustomHTTPURL string ParamCustomHTTPSecret string @@ -97,6 +101,14 @@ func (this *CreatePopupAction) RunPost(params struct { apiParams["apiKey"] = params.ParamApiKey apiParams["apiSecret"] = params.ParamApiSecret + case "cloudFlare": + params.Must. + Field("cloudFlareAPIKey", params.CloudFlareAPIKey). + Require("请输入API密钥"). + Field("cloudFlareEmail", params.CloudFlareEmail). + Email("请输入正确格式的邮箱地址") + apiParams["apiKey"] = params.CloudFlareAPIKey + apiParams["email"] = params.CloudFlareEmail case "customHTTP": params.Must. Field("paramCustomHTTPURL", params.ParamCustomHTTPURL). diff --git a/internal/web/actions/default/dns/providers/updatePopup.go b/internal/web/actions/default/dns/providers/updatePopup.go index cbca95cc..a0f50f7a 100644 --- a/internal/web/actions/default/dns/providers/updatePopup.go +++ b/internal/web/actions/default/dns/providers/updatePopup.go @@ -84,6 +84,10 @@ func (this *UpdatePopupAction) RunPost(params struct { ParamApiKey string ParamApiSecret string + // CloudFlare + CloudFlareAPIKey string + CloudFlareEmail string + // CustomHTTP ParamCustomHTTPURL string ParamCustomHTTPSecret string @@ -128,6 +132,14 @@ func (this *UpdatePopupAction) RunPost(params struct { apiParams["apiKey"] = params.ParamApiKey apiParams["apiSecret"] = params.ParamApiSecret + case "cloudFlare": + params.Must. + Field("cloudFlareAPIKey", params.CloudFlareAPIKey). + Require("请输入API密钥"). + Field("cloudFlareEmail", params.CloudFlareEmail). + Email("请输入正确格式的邮箱地址") + apiParams["apiKey"] = params.CloudFlareAPIKey + apiParams["email"] = params.CloudFlareEmail case "customHTTP": params.Must. Field("paramCustomHTTPURL", params.ParamCustomHTTPURL). diff --git a/web/views/@default/clusters/cluster/settings/dns/index.html b/web/views/@default/clusters/cluster/settings/dns/index.html index 217a4b6b..01d20ab1 100644 --- a/web/views/@default/clusters/cluster/settings/dns/index.html +++ b/web/views/@default/clusters/cluster/settings/dns/index.html @@ -22,7 +22,7 @@ .主域名 -
和主域名一起组成子域名。
+当前集群的子域名,和主域名一起组成集群节点的子域名。
和主域名一起组成子域名。
+当前集群的子域名,和主域名一起组成集群节点的子域名。
在个人资料中的"API令牌"--"API密钥"--"Global API Key"中获取。
+登录账号使用的邮箱。
+在个人资料中的"API令牌"--"API密钥"--"Global API Key"中获取。
+登录账号使用的邮箱。
+