From d2915b5b0536ea20162212c3f3fb028287e7b4f9 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 9 Aug 2024 16:09:23 -0400 Subject: [PATCH] Update dashboard.py --- src/dashboard.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dashboard.py b/src/dashboard.py index c613e94..ad373e8 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -869,12 +869,12 @@ class WireguardConfiguration: "PostUp": self.PostUp, "PostDown": self.PostDown, "SaveConfig": self.SaveConfig - # "DataUsage": { - # "Total": sum(list(map(lambda x: x.cumu_data + x.total_data, self.Peers))), - # "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(map(lambda x: x.status == "running", self.Peers))) + "DataUsage": { + "Total": sum(list(map(lambda x: x.cumu_data + x.total_data, self.Peers))), + "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(map(lambda x: x.status == "running", self.Peers))) } class Peer: