mirror of
https://github.com/netbirdio/netbird.git
synced 2025-04-10 01:59:01 +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)
|
routes = routes + len(account.Routes)
|
||||||
nameservers = nameservers + len(account.NameServerGroups)
|
nameservers = nameservers + len(account.NameServerGroups)
|
||||||
|
|
||||||
for _, rule := range account.Rules {
|
for _, policy := range account.Policies {
|
||||||
policyRule := rule.ToPolicyRule()
|
for _, rule := range policy.Rules {
|
||||||
rulesProtocol[string(policyRule.Protocol)]++
|
rulesProtocol[string(rule.Protocol)]++
|
||||||
if policyRule.Bidirectional {
|
if rule.Bidirectional {
|
||||||
rulesDirection["bidirectional"]++
|
rulesDirection["bidirectional"]++
|
||||||
} else {
|
} else {
|
||||||
rulesDirection["oneway"]++
|
rulesDirection["oneway"]++
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user