mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-14 13:28:55 +08:00
自建DNS增加全局配置
This commit is contained in:
@@ -28,7 +28,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
return
|
||||
}
|
||||
|
||||
accessLogRef := &dnsconfigs.AccessLogRef{}
|
||||
accessLogRef := &dnsconfigs.NSAccessLogRef{}
|
||||
if len(accessLogResp.AccessLogJSON) > 0 {
|
||||
err = json.Unmarshal(accessLogResp.AccessLogJSON, accessLogRef)
|
||||
if err != nil {
|
||||
@@ -50,7 +50,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
}) {
|
||||
defer this.CreateLogInfo("修改域名服务集群 %d 访问日志配置", params.ClusterId)
|
||||
|
||||
ref := &dnsconfigs.AccessLogRef{}
|
||||
ref := &dnsconfigs.NSAccessLogRef{}
|
||||
err := json.Unmarshal(params.AccessLogJSON, ref)
|
||||
if err != nil {
|
||||
this.Fail("数据格式错误:" + err.Error())
|
||||
|
||||
@@ -20,7 +20,7 @@ func (this *CreateAction) Init() {
|
||||
|
||||
func (this *CreateAction) RunGet(params struct{}) {
|
||||
// 默认的访问日志设置
|
||||
this.Data["accessLogRef"] = &dnsconfigs.AccessLogRef{
|
||||
this.Data["accessLogRef"] = &dnsconfigs.NSAccessLogRef{
|
||||
IsOn: true,
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ func (this *CreateAction) RunPost(params struct {
|
||||
Require("请输入集群名称")
|
||||
|
||||
// 校验访问日志设置
|
||||
ref := &dnsconfigs.AccessLogRef{}
|
||||
ref := &dnsconfigs.NSAccessLogRef{}
|
||||
err := json.Unmarshal(params.AccessLogJSON, ref)
|
||||
if err != nil {
|
||||
this.Fail("数据格式错误:" + err.Error())
|
||||
|
||||
Reference in New Issue
Block a user