should be embeded now
This commit is contained in:
parent
74ea8ee854
commit
fa45d97576
@ -159,7 +159,7 @@ def change_password():
|
|||||||
# handle login failed
|
# handle login failed
|
||||||
@app.errorhandler(401)
|
@app.errorhandler(401)
|
||||||
def unauthorized(e):
|
def unauthorized(e):
|
||||||
return(render_template("login.html"))
|
return(redirect("login"))
|
||||||
|
|
||||||
|
|
||||||
# callback to reload the user object
|
# callback to reload the user object
|
||||||
@ -363,6 +363,10 @@ def logs():
|
|||||||
print(configs)
|
print(configs)
|
||||||
return(render_template("logs.html", data=configs))
|
return(render_template("logs.html", data=configs))
|
||||||
|
|
||||||
|
@app.route("/stats/", methods=["GET", "POST"])
|
||||||
|
def logs():
|
||||||
|
return(render_template("stats.html"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route('/download/<path:filename>', methods=['GET', 'POST'])
|
@app.route('/download/<path:filename>', methods=['GET', 'POST'])
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button class="unselected" onclick="location.href = '/grafana';">stats</button>
|
<button class="unselected" onclick="location.href = '/stats';">stats</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
51
Flask/templates/stats.html
Normal file
51
Flask/templates/stats.html
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% block left_pannel %}
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button class="unselected" onclick="location.href = '/override';">override</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button class="unselected" onclick="location.href = '/config';">config</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button class="unselected" onclick="location.href = '/discord';">discord</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button class="unselected" onclick="location.href = '/proxy';">proxy</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button class="selected" onclick="location.href = '/logs';">logs</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button class="unselected" onclick="location.href = '/grafana';">stats</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button class="unselected" onclick="location.href = '/settings';">settings</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
{%if not current_user.is_authenticated %}
|
||||||
|
<button class="unselected" onclick="location.href = '/login';">login</button>
|
||||||
|
{% else %}
|
||||||
|
<iframe src="/grafana" width="100%" height="100%"></iframe>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%endblock %}
|
@ -328,7 +328,7 @@ root_url = %(protocol)s://localhost:3000/grafana/
|
|||||||
;cookie_samesite = lax
|
;cookie_samesite = lax
|
||||||
|
|
||||||
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
|
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
|
||||||
;allow_embedding = false
|
allow_embedding = true
|
||||||
|
|
||||||
# Set to true if you want to enable http strict transport security (HSTS) response header.
|
# Set to true if you want to enable http strict transport security (HSTS) response header.
|
||||||
# HSTS tells browsers that the site should only be accessed using HTTPS.
|
# HSTS tells browsers that the site should only be accessed using HTTPS.
|
||||||
|
Loading…
Reference in New Issue
Block a user