aboutsummaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2021-02-02 15:58:31 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2021-02-02 15:58:31 +0000
commitc4b59d34db126a4d3471162ff34a04661ff41c99 (patch)
tree5c5182eb6e370c51995c737a84a3285e3241db48 /app.py
parent1dac1ee189bdcf70a5dd933d5f6a69a15d5a8d7e (diff)
downloadboymoder.blog-c4b59d34db126a4d3471162ff34a04661ff41c99.tar.gz
boymoder.blog-c4b59d34db126a4d3471162ff34a04661ff41c99.zip
added status page with timeouts
Diffstat (limited to 'app.py')
-rw-r--r--app.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/app.py b/app.py
index b52cd0b..935ef12 100644
--- a/app.py
+++ b/app.py
@@ -1,5 +1,6 @@
import configparser
import database
+import services
import flask
app = flask.Flask(__name__)
@@ -27,9 +28,21 @@ def discord():
with database.Database() as db:
return flask.render_template(
"discord.html",
- **get_template_items("Discord", db),
+ **get_template_items("discord", db),
discord = CONFIG["discord"]["username"]
)
+@app.route("/services")
+def serve_services():
+ with database.Database() as db:
+ return flask.render_template(
+ "services.html",
+ **get_template_items("services", db),
+ docker = services.get_docker_stats(),
+ qbit = services.get_qbit_stats(),
+ trans = services.get_trans_stats(),
+ pihole = services.get_pihole_stats()
+ )
+
if __name__ == "__main__":
app.run(host = "0.0.0.0", debug = True)