From 9ac35912dde4aecef5417cf78e53a5c4646a07aa Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Tue, 22 Nov 2022 16:29:06 -0600 Subject: [PATCH] update block ratio format --- config.yml | 2 +- panel.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.yml b/config.yml index e248712..5ee497b 100644 --- a/config.yml +++ b/config.yml @@ -2,7 +2,7 @@ core: autostart: true clockspeed: 20 interval: 5 - level: 2 + level: 3 localadmin: true sftp: filepath: diff --git a/panel.py b/panel.py index 594d864..4f885e7 100644 --- a/panel.py +++ b/panel.py @@ -170,7 +170,7 @@ class ServerPanel(wx.Panel): else: logintxt = "Not logged in" - stattxt = "Statistics:\nBlocked Connections: " + str(settings["stats"][0]) + " \nAllowed Connections: " + str(settings["stats"][1]) + " \nUpload count: " + str(settings["stats"][2]) + " \nDownload count: " + str(settings["stats"][3]) + " \nBlock ratio: " + str(settings["stats"][4]) + stattxt = "Statistics:\nBlocked Connections: " + str(settings["stats"][0]) + " \nAllowed Connections: " + str(settings["stats"][1]) + " \nUpload count: " + str(settings["stats"][2]) + " \nDownload count: " + str(settings["stats"][3]) + " \nBlock ratio: " + str("{:.4f}".format(settings["stats"][4])) self.statustext = wx.StaticText(self, label=txt) # pos=(20,20)) self.logintext = wx.StaticText(self, label=logintxt) # pos=(20,20)) self.stattext = wx.StaticText(self, label=stattxt) @@ -240,7 +240,7 @@ class ServerPanel(wx.Panel): self.login_button.SetLabelText("Login") logintxt = "Not logged in" - stattxt = "Statistics:\nBlocked Connections: " + str(settings["stats"][0]) + " \nAllowed Connections: " + str(settings["stats"][1]) + " \nUpload count: " + str(settings["stats"][2]) + " \nDownload count: " + str(settings["stats"][3]) + " \nBlock ratio: " + str(settings["stats"][4]) + stattxt = "Statistics:\nBlocked Connections: " + str(settings["stats"][0]) + " \nAllowed Connections: " + str(settings["stats"][1]) + " \nUpload count: " + str(settings["stats"][2]) + " \nDownload count: " + str(settings["stats"][3]) + " \nBlock ratio: " + str("{:.4f}".format(settings["stats"][4])) self.statustext.SetLabel(txt) self.logintext.SetLabel(logintxt)