diff --git a/internal/web/actions/default/clusters/cluster/node/settings/cache/index.go b/internal/web/actions/default/clusters/cluster/node/settings/cache/index.go index 44b89bf0..c95d93f1 100644 --- a/internal/web/actions/default/clusters/cluster/node/settings/cache/index.go +++ b/internal/web/actions/default/clusters/cluster/node/settings/cache/index.go @@ -17,7 +17,7 @@ type IndexAction struct { } func (this *IndexAction) Init() { - this.Nav("", "", "update") + this.Nav("", "node", "update") this.SecondMenu("cache") } diff --git a/internal/web/actions/default/clusters/cluster/node/settings/dns/index.go b/internal/web/actions/default/clusters/cluster/node/settings/dns/index.go index 2f8095c2..b094bd1a 100644 --- a/internal/web/actions/default/clusters/cluster/node/settings/dns/index.go +++ b/internal/web/actions/default/clusters/cluster/node/settings/dns/index.go @@ -16,7 +16,7 @@ type IndexAction struct { } func (this *IndexAction) Init() { - this.Nav("", "", "update") + this.Nav("", "node", "update") this.SecondMenu("dns") } diff --git a/internal/web/actions/default/clusters/cluster/node/settings/ssh/index.go b/internal/web/actions/default/clusters/cluster/node/settings/ssh/index.go index 1cbd4c7c..ccf15e6d 100644 --- a/internal/web/actions/default/clusters/cluster/node/settings/ssh/index.go +++ b/internal/web/actions/default/clusters/cluster/node/settings/ssh/index.go @@ -17,7 +17,7 @@ type IndexAction struct { } func (this *IndexAction) Init() { - this.Nav("", "", "update") + this.Nav("", "node", "update") this.SecondMenu("ssh") } diff --git a/internal/web/actions/default/clusters/cluster/node/settings/system/index.go b/internal/web/actions/default/clusters/cluster/node/settings/system/index.go index 405d4ce6..f24f957f 100644 --- a/internal/web/actions/default/clusters/cluster/node/settings/system/index.go +++ b/internal/web/actions/default/clusters/cluster/node/settings/system/index.go @@ -15,7 +15,7 @@ type IndexAction struct { } func (this *IndexAction) Init() { - this.Nav("", "", "update") + this.Nav("", "node", "update") this.SecondMenu("system") } diff --git a/internal/web/actions/default/clusters/cluster/node/settings/thresholds/index.go b/internal/web/actions/default/clusters/cluster/node/settings/thresholds/index.go index 7c2384a4..1578394e 100644 --- a/internal/web/actions/default/clusters/cluster/node/settings/thresholds/index.go +++ b/internal/web/actions/default/clusters/cluster/node/settings/thresholds/index.go @@ -15,7 +15,7 @@ type IndexAction struct { } func (this *IndexAction) Init() { - this.Nav("", "", "update") + this.Nav("", "node", "update") this.SecondMenu("threshold") } diff --git a/internal/web/actions/default/servers/components/waf/policy.go b/internal/web/actions/default/servers/components/waf/policy.go index 6f2abec9..a227c5cf 100644 --- a/internal/web/actions/default/servers/components/waf/policy.go +++ b/internal/web/actions/default/servers/components/waf/policy.go @@ -85,14 +85,15 @@ func (this *PolicyAction) RunGet(params struct { firewallPolicy.Mode = firewallconfigs.FirewallModeDefend } this.Data["firewallPolicy"] = maps.Map{ - "id": firewallPolicy.Id, - "name": firewallPolicy.Name, - "isOn": firewallPolicy.IsOn, - "description": firewallPolicy.Description, - "mode": firewallPolicy.Mode, - "modeInfo": firewallconfigs.FindFirewallMode(firewallPolicy.Mode), - "groups": internalGroups, - "blockOptions": firewallPolicy.BlockOptions, + "id": firewallPolicy.Id, + "name": firewallPolicy.Name, + "isOn": firewallPolicy.IsOn, + "description": firewallPolicy.Description, + "mode": firewallPolicy.Mode, + "modeInfo": firewallconfigs.FindFirewallMode(firewallPolicy.Mode), + "groups": internalGroups, + "blockOptions": firewallPolicy.BlockOptions, + "useLocalFirewall": firewallPolicy.UseLocalFirewall, } // 正在使用此策略的集群 diff --git a/internal/web/actions/default/servers/components/waf/update.go b/internal/web/actions/default/servers/components/waf/update.go index dcd8bd90..de7954af 100644 --- a/internal/web/actions/default/servers/components/waf/update.go +++ b/internal/web/actions/default/servers/components/waf/update.go @@ -49,12 +49,13 @@ func (this *UpdateAction) RunGet(params struct { this.Data["modes"] = firewallconfigs.FindAllFirewallModes() this.Data["firewallPolicy"] = maps.Map{ - "id": firewallPolicy.Id, - "name": firewallPolicy.Name, - "description": firewallPolicy.Description, - "isOn": firewallPolicy.IsOn, - "mode": firewallPolicy.Mode, - "blockOptions": firewallPolicy.BlockOptions, + "id": firewallPolicy.Id, + "name": firewallPolicy.Name, + "description": firewallPolicy.Description, + "isOn": firewallPolicy.IsOn, + "mode": firewallPolicy.Mode, + "blockOptions": firewallPolicy.BlockOptions, + "useLocalFirewall": firewallPolicy.UseLocalFirewall, } // 预置分组 @@ -87,6 +88,7 @@ func (this *UpdateAction) RunPost(params struct { Description string IsOn bool Mode string + UseLocalFirewall bool Must *actions.Must }) { @@ -112,6 +114,7 @@ func (this *UpdateAction) RunPost(params struct { FirewallGroupCodes: params.GroupCodes, BlockOptionsJSON: params.BlockOptionsJSON, Mode: params.Mode, + UseLocalFirewall: params.UseLocalFirewall, }) if err != nil { this.ErrorPage(err) diff --git a/web/views/@default/servers/components/waf/policy.html b/web/views/@default/servers/components/waf/policy.html index 539be22a..66ab51ed 100644 --- a/web/views/@default/servers/components/waf/policy.html +++ b/web/views/@default/servers/components/waf/policy.html @@ -51,6 +51,14 @@ +
可以在合适的时候自动使用系统自带防火墙进行防御。
+开启后,可以在合适的时候自动使用系统自带防火墙进行防御。
+