mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 07:10:09 +01:00
commit
27ae99864c
@ -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"
|
||||
|
@ -43,7 +43,7 @@
|
||||
<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>
|
||||
</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 class="col-sm">
|
||||
<small class="text-muted"><strong>LISTEN PORT</strong></small>
|
||||
|
@ -122,7 +122,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include "tools.html" %}
|
||||
</body>
|
||||
|
||||
{% include "footer.html" %}
|
||||
<script>
|
||||
$(".sb-settings-url").addClass("active")
|
||||
|
@ -39,7 +39,7 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
<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>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<main role="main" class="container login-container">
|
||||
<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">
|
||||
{% if message != ""%}
|
||||
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
Loading…
Reference in New Issue
Block a user