mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 20:40:26 +08:00
创建集群时自动创建缓存策略和WAF策略/优化界面
This commit is contained in:
@@ -19,6 +19,7 @@ func (this *CreateAction) Init() {
|
||||
}
|
||||
|
||||
func (this *CreateAction) RunGet(params struct{}) {
|
||||
// 是否有域名
|
||||
hasDomainsResp, err := this.RPC().DNSDomainRPC().ExistAvailableDomains(this.AdminContext(), &pb.ExistAvailableDomainsRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
@@ -53,13 +54,6 @@ func (this *CreateAction) RunPost(params struct {
|
||||
Field("name", params.Name).
|
||||
Require("请输入集群名称")
|
||||
|
||||
if params.CachePolicyId <= 0 {
|
||||
this.Fail("请选择或者创建缓存策略")
|
||||
}
|
||||
if params.HttpFirewallPolicyId <= 0 {
|
||||
this.Fail("请选择或者创建WAF策略")
|
||||
}
|
||||
|
||||
// 检查DNS名称
|
||||
if len(params.DnsName) > 0 {
|
||||
if !domainutils.ValidateDomainFormat(params.DnsName) {
|
||||
@@ -113,5 +107,7 @@ func (this *CreateAction) RunPost(params struct {
|
||||
// 创建日志
|
||||
defer this.CreateLog(oplogs.LevelInfo, "创建节点集群:%d", createResp.NodeClusterId)
|
||||
|
||||
this.Data["clusterId"] = createResp.NodeClusterId
|
||||
|
||||
this.Success()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user