mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-06 23:00:25 +08:00
WAF策略增加是否使用本地防火墙设置
This commit is contained in:
@@ -17,7 +17,7 @@ type IndexAction struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *IndexAction) Init() {
|
func (this *IndexAction) Init() {
|
||||||
this.Nav("", "", "update")
|
this.Nav("", "node", "update")
|
||||||
this.SecondMenu("cache")
|
this.SecondMenu("cache")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type IndexAction struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *IndexAction) Init() {
|
func (this *IndexAction) Init() {
|
||||||
this.Nav("", "", "update")
|
this.Nav("", "node", "update")
|
||||||
this.SecondMenu("dns")
|
this.SecondMenu("dns")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ type IndexAction struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *IndexAction) Init() {
|
func (this *IndexAction) Init() {
|
||||||
this.Nav("", "", "update")
|
this.Nav("", "node", "update")
|
||||||
this.SecondMenu("ssh")
|
this.SecondMenu("ssh")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type IndexAction struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *IndexAction) Init() {
|
func (this *IndexAction) Init() {
|
||||||
this.Nav("", "", "update")
|
this.Nav("", "node", "update")
|
||||||
this.SecondMenu("system")
|
this.SecondMenu("system")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type IndexAction struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *IndexAction) Init() {
|
func (this *IndexAction) Init() {
|
||||||
this.Nav("", "", "update")
|
this.Nav("", "node", "update")
|
||||||
this.SecondMenu("threshold")
|
this.SecondMenu("threshold")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ func (this *PolicyAction) RunGet(params struct {
|
|||||||
"modeInfo": firewallconfigs.FindFirewallMode(firewallPolicy.Mode),
|
"modeInfo": firewallconfigs.FindFirewallMode(firewallPolicy.Mode),
|
||||||
"groups": internalGroups,
|
"groups": internalGroups,
|
||||||
"blockOptions": firewallPolicy.BlockOptions,
|
"blockOptions": firewallPolicy.BlockOptions,
|
||||||
|
"useLocalFirewall": firewallPolicy.UseLocalFirewall,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 正在使用此策略的集群
|
// 正在使用此策略的集群
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ func (this *UpdateAction) RunGet(params struct {
|
|||||||
"isOn": firewallPolicy.IsOn,
|
"isOn": firewallPolicy.IsOn,
|
||||||
"mode": firewallPolicy.Mode,
|
"mode": firewallPolicy.Mode,
|
||||||
"blockOptions": firewallPolicy.BlockOptions,
|
"blockOptions": firewallPolicy.BlockOptions,
|
||||||
|
"useLocalFirewall": firewallPolicy.UseLocalFirewall,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 预置分组
|
// 预置分组
|
||||||
@@ -87,6 +88,7 @@ func (this *UpdateAction) RunPost(params struct {
|
|||||||
Description string
|
Description string
|
||||||
IsOn bool
|
IsOn bool
|
||||||
Mode string
|
Mode string
|
||||||
|
UseLocalFirewall bool
|
||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
@@ -112,6 +114,7 @@ func (this *UpdateAction) RunPost(params struct {
|
|||||||
FirewallGroupCodes: params.GroupCodes,
|
FirewallGroupCodes: params.GroupCodes,
|
||||||
BlockOptionsJSON: params.BlockOptionsJSON,
|
BlockOptionsJSON: params.BlockOptionsJSON,
|
||||||
Mode: params.Mode,
|
Mode: params.Mode,
|
||||||
|
UseLocalFirewall: params.UseLocalFirewall,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
|
|||||||
@@ -51,6 +51,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>使用系统防火墙</td>
|
||||||
|
<td>
|
||||||
|
<span class="green" v-if="firewallPolicy.useLocalFirewall">启用</span>
|
||||||
|
<span class="disabled" v-if="!firewallPolicy.useLocalFirewall">不启用</span>
|
||||||
|
<p class="comment" v-if="firewallPolicy.useLocalFirewall">可以在合适的时候自动使用系统自带防火墙进行防御。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>描述</td>
|
<td>描述</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -37,6 +37,13 @@
|
|||||||
<http-firewall-block-options :v-block-options="firewallPolicy.blockOptions"></http-firewall-block-options>
|
<http-firewall-block-options :v-block-options="firewallPolicy.blockOptions"></http-firewall-block-options>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>使用系统防火墙</td>
|
||||||
|
<td>
|
||||||
|
<checkbox name="useLocalFirewall" v-model="firewallPolicy.useLocalFirewall"></checkbox>
|
||||||
|
<p class="comment">开启后,可以在合适的时候自动使用系统自带防火墙进行防御。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user