Added total peers in peers count

This commit is contained in:
Donald Zou
2024-10-05 16:10:36 +08:00
parent 5e1769b81f
commit 2cb06bb4bb
6 changed files with 18 additions and 14 deletions

View File

@@ -913,7 +913,8 @@ class WireguardConfiguration:
"Sent": sum(list(map(lambda x: x.cumu_sent + x.total_sent, self.Peers))),
"Receive": sum(list(map(lambda x: x.cumu_receive + x.total_receive, self.Peers)))
},
"ConnectedPeers": len(list(filter(lambda x: x.status == "running", self.Peers)))
"ConnectedPeers": len(list(filter(lambda x: x.status == "running", self.Peers))),
"TotalPeers": len(self.Peers)
}
def updateConfigurationSettings(self, newData: dict) -> tuple[bool, str]: