1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 15:20:09 +01:00

Small fix on HTML files

This commit is contained in:
Donald Cheng Hong Zou 2021-08-24 20:15:28 -04:00
parent 6ec0a65d0c
commit 82ba15ba5a
5 changed files with 12 additions and 6 deletions

View File

@ -18,7 +18,7 @@ from tinydb import TinyDB, Query
from icmplib import ping, multiping, traceroute, resolve, Host, Hop from icmplib import ping, multiping, traceroute, resolve, Host, Hop
# Dashboard Version # Dashboard Version
dashboard_version = 'v2.2.1' dashboard_version = 'v2.2.2'
# Dashboard Config Name # Dashboard Config Name
dashboard_conf = 'wg-dashboard.ini' dashboard_conf = 'wg-dashboard.ini'
# Default Wireguard IP # Default Wireguard IP
@ -471,7 +471,7 @@ def auth():
config.clear() config.clear()
return redirect(url_for("index")) return redirect(url_for("index"))
else: else:
session['message'] = "Username or Password is correct." session['message'] = "Username or Password is incorrect."
config.clear() config.clear()
return redirect(url_for("signin")) return redirect(url_for("signin"))
@ -650,6 +650,10 @@ def ping_ip():
"package_received": result.packets_received, "package_received": result.packets_received,
"package_loss": result.packet_loss "package_loss": result.packet_loss
} }
if returnjson['package_loss'] == 1.0:
returnjson['package_loss'] = returnjson['package_sent']
return jsonify(returnjson) return jsonify(returnjson)
except Exception: except Exception:
return "Error" return "Error"

View File

@ -43,7 +43,7 @@
<strong>PUBLIC KEY</strong> <strong>PUBLIC KEY</strong>
<strong style="margin-left: auto!important; opacity: 0; transition: 0.2s ease-in-out" class="text-primary">CLICK TO COPY</strong></small> <strong style="margin-left: auto!important; opacity: 0; transition: 0.2s ease-in-out" class="text-primary">CLICK TO COPY</strong></small>
</small> </small>
<h6 style="text-transform: uppercase;"><samp class="key">{{conf_data['public_key']}}</samp></h6> <h6><samp class="key">{{conf_data['public_key']}}</samp></h6>
</div> </div>
<div class="col-sm"> <div class="col-sm">
<small class="text-muted"><strong>LISTEN PORT</strong></small> <small class="text-muted"><strong>LISTEN PORT</strong></small>

View File

@ -122,7 +122,9 @@
</div> </div>
</div> </div>
</div> </div>
{% include "tools.html" %}
</body> </body>
{% include "footer.html" %} {% include "footer.html" %}
<script> <script>
$(".sb-settings-url").addClass("active") $(".sb-settings-url").addClass("active")

View File

@ -39,7 +39,7 @@
</ul> </ul>
{% endif %} {% endif %}
<ul class="nav flex-column"> <ul class="nav flex-column">
<li class="nav-item"><a href="https://github.com/donaldzou/wireguard-dashboard"><small class="nav-link text-muted">{{ session['dashboard_version'] }}</small></a></li> <li class="nav-item"><a href="https://github.com/donaldzou/wireguard-dashboard/releases/tag/{{ session['dashboard_version'] }}"><small class="nav-link text-muted">{{ session['dashboard_version'] }}</small></a></li>
</ul> </ul>
</div> </div>
</nav> </nav>

View File

@ -13,7 +13,7 @@
<main role="main" class="container login-container"> <main role="main" class="container login-container">
<div class="login-box" style="margin: auto !important;"> <div class="login-box" style="margin: auto !important;">
<h3 class="text-center">Sign In</h3> <h1 class="text-center">Sign In</h1>
<form style="margin-left: auto !important; margin-right: auto !important; max-width: 500px;" action="/auth" method="post"> <form style="margin-left: auto !important; margin-right: auto !important; max-width: 500px;" action="/auth" method="post">
{% if message != ""%} {% if message != ""%}
@ -22,7 +22,7 @@
</div> </div>
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<label for="username" class="text-left">User Name</label> <label for="username" class="text-left">Username</label>
<input type="text" class="form-control" id="username" name="username" required> <input type="text" class="form-control" id="username" name="username" required>
</div> </div>
<div class="form-group"> <div class="form-group">