From 82ba15ba5a20d4ee3a11338983aaa26374ee7a10 Mon Sep 17 00:00:00 2001 From: Donald Cheng Hong Zou Date: Tue, 24 Aug 2021 20:15:28 -0400 Subject: [PATCH] Small fix on HTML files --- src/dashboard.py | 8 ++++++-- src/templates/get_conf.html | 2 +- src/templates/settings.html | 2 ++ src/templates/sidebar.html | 2 +- src/templates/signin.html | 4 ++-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/dashboard.py b/src/dashboard.py index 192ca8b..2fa6d36 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -18,7 +18,7 @@ from tinydb import TinyDB, Query from icmplib import ping, multiping, traceroute, resolve, Host, Hop # Dashboard Version -dashboard_version = 'v2.2.1' +dashboard_version = 'v2.2.2' # Dashboard Config Name dashboard_conf = 'wg-dashboard.ini' # Default Wireguard IP @@ -471,7 +471,7 @@ def auth(): config.clear() return redirect(url_for("index")) else: - session['message'] = "Username or Password is correct." + session['message'] = "Username or Password is incorrect." config.clear() return redirect(url_for("signin")) @@ -650,6 +650,10 @@ def ping_ip(): "package_received": result.packets_received, "package_loss": result.packet_loss } + if returnjson['package_loss'] == 1.0: + returnjson['package_loss'] = returnjson['package_sent'] + + return jsonify(returnjson) except Exception: return "Error" diff --git a/src/templates/get_conf.html b/src/templates/get_conf.html index 820b40e..b8739f2 100644 --- a/src/templates/get_conf.html +++ b/src/templates/get_conf.html @@ -43,7 +43,7 @@ PUBLIC KEY CLICK TO COPY -
{{conf_data['public_key']}}
+
{{conf_data['public_key']}}
LISTEN PORT diff --git a/src/templates/settings.html b/src/templates/settings.html index f9af059..1cb2ab1 100644 --- a/src/templates/settings.html +++ b/src/templates/settings.html @@ -122,7 +122,9 @@
+{% include "tools.html" %} + {% include "footer.html" %}