mirror of
https://github.com/netbirdio/netbird.git
synced 2025-03-31 11:16:46 +02:00
use new policy-rule object
This commit is contained in:
parent
22e81f493b
commit
6fd13f563e
@ -200,13 +200,14 @@ func (w *Worker) generateProperties() properties {
|
||||
routes = routes + len(account.Routes)
|
||||
nameservers = nameservers + len(account.NameServerGroups)
|
||||
|
||||
for _, rule := range account.Rules {
|
||||
policyRule := rule.ToPolicyRule()
|
||||
rulesProtocol[string(policyRule.Protocol)]++
|
||||
if policyRule.Bidirectional {
|
||||
rulesDirection["bidirectional"]++
|
||||
} else {
|
||||
rulesDirection["oneway"]++
|
||||
for _, policy := range account.Policies {
|
||||
for _, rule := range policy.Rules {
|
||||
rulesProtocol[string(rule.Protocol)]++
|
||||
if rule.Bidirectional {
|
||||
rulesDirection["bidirectional"]++
|
||||
} else {
|
||||
rulesDirection["oneway"]++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user