diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2021-02-02 15:58:31 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2021-02-02 15:58:31 +0000 |
commit | c4b59d34db126a4d3471162ff34a04661ff41c99 (patch) | |
tree | 5c5182eb6e370c51995c737a84a3285e3241db48 /templates | |
parent | 1dac1ee189bdcf70a5dd933d5f6a69a15d5a8d7e (diff) | |
download | boymoder.blog-c4b59d34db126a4d3471162ff34a04661ff41c99.tar.gz boymoder.blog-c4b59d34db126a4d3471162ff34a04661ff41c99.zip |
added status page with timeouts
Diffstat (limited to 'templates')
-rw-r--r-- | templates/services.html | 105 | ||||
-rw-r--r-- | templates/template.html | 1 |
2 files changed, 106 insertions, 0 deletions
diff --git a/templates/services.html b/templates/services.html new file mode 100644 index 0000000..321a7a0 --- /dev/null +++ b/templates/services.html @@ -0,0 +1,105 @@ +{% extends "template.html" %} +{% block content %} +<article id=statusTables> + <section id=docker> + <h2>docker</h2> + {% if docker == None %} + <p>Couldn't access the docker API. Is sherpa running?</p> + {% else %} + <table> + {% for name, status in docker.items() %} + <tr> + <td>{{name}}</td> + {% if status == "running" %} + <td class=running>{{status}}</td> + {% else %} + <td class=notRunning>{{status}}</td> + {% endif %} + </tr> + {% endfor %} + </table> + {% endif %} + </section> + <section id="torrents"> + <h2>qbittorrent</h2> + {% if qbit == None %} + <p>Couldn't access the qbittorrent API. Is docker container running?</p> + {% else %} + <table> + <tr> + <td>downloaded</td> + <td>{{qbit["bytes_dl"]}}</td> + </tr> + <tr> + <td>uploaded</td> + <td>{{qbit["bytes_up"]}}</td> + </tr> + <tr> + <td>torrents</td> + <td>{{qbit["num"]}}</td> + </tr> + <tr> + <td>ratio</td> + <td>{{qbit["ratio"]}}</td> + </tr> + </table> + {% endif %} + <h2>transmission</h2> + {% if trans == None %} + <p>Couldn't access the transmission API. Is docker container running?</p> + {% else %} + <table> + <tr> + <td>downloaded</td> + <td>{{trans["bytes_dl"]}}</td> + </tr> + <tr> + <td>uploaded</td> + <td>{{trans["bytes_up"]}}</td> + </tr> + <tr> + <td>torrents</td> + <td>{{trans["num"]}}</td> + </tr> + <tr> + <td>ratio</td> + <td>{{trans["ratio"]}}</td> + </tr> + </table> + {% endif %} + </section> + <section id=pihole> + <h2>pihole</h2> + {% if pihole == None %} + <p>Couldn't access the pihole API. Is docker container running?</p> + {% else %} + <table> + <tr> + <td>status</td> + {% if pihole["status"] == "enabled" %} + <td class=running>{{pihole["status"]}}</td> + {% else %} + <td class=notRunning>{{pihole["status"]}}</td> + {% endif %} + </tr> + <tr> + <td>queries</td> + <td>{{pihole["queries"]}}</td> + </tr> + <tr> + <td>clients</td> + <td>{{pihole["clients"]}}</td> + </tr> + <tr> + <td>percentage blocked</td> + <td>{{pihole["percentage"]}}%</td> + </tr> + <tr> + <td>blocked</td> + <td>{{pihole["blocked"]}}</td> + </tr> + </table> + {% endif %} + </section> +</article> +{% endblock %}
\ No newline at end of file diff --git a/templates/template.html b/templates/template.html index d6c1a0b..6b0d894 100644 --- a/templates/template.html +++ b/templates/template.html @@ -2,6 +2,7 @@ <html> <head> <link rel='stylesheet' href="{{url_for('static', filename='style.css')}}"> + <title>edaweb :: {{title}}</title> </head> <body> <div id=wrapper> |