From 9f3d7e7ae3aab6494ae11d23dd6ec517f5da74fa Mon Sep 17 00:00:00 2001 From: Etzelia Date: Wed, 5 Dec 2018 17:01:50 -0600 Subject: [PATCH] Changed ratios to percentages --- overview.py | 8 ++++---- templates/minecraft_manager/overview.html | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/overview.py b/overview.py index ab1687c..b8ae322 100644 --- a/overview.py +++ b/overview.py @@ -43,10 +43,10 @@ def overview_data(): # Ratios data['ratio'] = { - 'accepted': data['total']['application']['accepted'] / - data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1, - 'banned': data['total']['player']['banned'] / - data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1 + 'accepted': (data['total']['application']['accepted'] / + data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1) * 100, + 'banned': (data['total']['player']['banned'] / + data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1) * 100 } return data diff --git a/templates/minecraft_manager/overview.html b/templates/minecraft_manager/overview.html index 63f261b..665ac76 100644 --- a/templates/minecraft_manager/overview.html +++ b/templates/minecraft_manager/overview.html @@ -40,10 +40,10 @@
-

Acceptance Rate: {{ data.ratio.accepted }}

+

Acceptance Rate: {{ data.ratio.accepted }}%

-

Ban Rate: {{ data.ratio.banned }}

+

Ban Rate: {{ data.ratio.banned }}%