WAF策略增加观察模式和通过模式

This commit is contained in:
刘祥超
2021-09-30 11:30:36 +08:00
parent ca72b3c18b
commit 0b26cbdd01
6 changed files with 50 additions and 5 deletions

View File

@@ -70,10 +70,17 @@ func (this *IndexAction) RunGet(params struct {
}
countClusters := countClustersResp.Count
// mode
if len(policy.Mode) == 0 {
policy.Mode = firewallconfigs.FirewallModeDefend
}
policyMaps = append(policyMaps, maps.Map{
"id": policy.Id,
"isOn": policy.IsOn,
"name": policy.Name,
"mode": policy.Mode,
"modeInfo": firewallconfigs.FindFirewallMode(policy.Mode),
"countInbound": countInbound,
"countOutbound": countOutbound,
"countClusters": countClusters,