From fa45d97576159d2536e120bb8c48244a6d61438e Mon Sep 17 00:00:00 2001 From: piair Date: Tue, 29 Aug 2023 18:53:06 +0200 Subject: [PATCH] should be embeded now --- Flask/app.py | 6 ++++- Flask/templates/override.html | 2 +- Flask/templates/stats.html | 51 +++++++++++++++++++++++++++++++++++ config/grafana.ini | 2 +- 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 Flask/templates/stats.html diff --git a/Flask/app.py b/Flask/app.py index ce924be..88bd960 100644 --- a/Flask/app.py +++ b/Flask/app.py @@ -159,7 +159,7 @@ def change_password(): # handle login failed @app.errorhandler(401) def unauthorized(e): - return(render_template("login.html")) + return(redirect("login")) # callback to reload the user object @@ -363,6 +363,10 @@ def logs(): print(configs) return(render_template("logs.html", data=configs)) +@app.route("/stats/", methods=["GET", "POST"]) +def logs(): + return(render_template("stats.html")) + @app.route('/download/', methods=['GET', 'POST']) diff --git a/Flask/templates/override.html b/Flask/templates/override.html index 107558e..436f6b6 100644 --- a/Flask/templates/override.html +++ b/Flask/templates/override.html @@ -29,7 +29,7 @@ - + diff --git a/Flask/templates/stats.html b/Flask/templates/stats.html new file mode 100644 index 0000000..816f265 --- /dev/null +++ b/Flask/templates/stats.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} +{% block left_pannel %} + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+{% endblock %} + +{% block content %} + +{%if not current_user.is_authenticated %} + +{% else %} + +{% endif %} + +{%endblock %} \ No newline at end of file diff --git a/config/grafana.ini b/config/grafana.ini index 755e01a..ea72204 100755 --- a/config/grafana.ini +++ b/config/grafana.ini @@ -328,7 +328,7 @@ root_url = %(protocol)s://localhost:3000/grafana/ ;cookie_samesite = lax # set to true if you want to allow browsers to render Grafana in a ,