diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2022-08-25 14:19:10 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2022-08-25 14:19:10 +0000 |
commit | 787a9421d1a61229b838dcbf17734c42172800f7 (patch) | |
tree | 014297140526a59232dbc5a23e5d89e374289a59 /templates/services.html.j2 | |
parent | a86a5fa2f075ec455aa5101acff9c3fda290294d (diff) | |
download | eda.gay-787a9421d1a61229b838dcbf17734c42172800f7.tar.gz eda.gay-787a9421d1a61229b838dcbf17734c42172800f7.zip |
Renamed template files, added active for torrents
Diffstat (limited to 'templates/services.html.j2')
-rwxr-xr-x | templates/services.html.j2 | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/templates/services.html.j2 b/templates/services.html.j2 new file mode 100755 index 0000000..35d47ae --- /dev/null +++ b/templates/services.html.j2 @@ -0,0 +1,99 @@ +{% extends "template.html.j2" %} +{% 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>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> + <tr> + <td>active for</td> + <td>{{trans["active_for"]}}</td> + </tr> + </table> + {% endif %} + <br> + <a href="https://nitter.eda.gay/estrogenizedboy/status/1520464127516422144#m">statistics of my two old torrent clients which were shut down recently ;_;</a> + <br> + <img src="https://nitter.eda.gay/pic/media%2FFRnF3kcXwAAHE6v.png%3Fname%3Dorig"> + <img src="https://nitter.eda.gay/pic/media%2FFRnF6I0WUAEq4FD.png%3Fname%3Dorig"> + </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 requests</td> + <td>{{pihole["blocked"]}}</td> + </tr> + <tr> + <td>domains in blocklist</td> + <td>{{pihole["domains"]}}</td> + </tr> + <tr> + <td>last updated</td> + <td>{{pihole["last_updated"]}}</td> + </tr> + </table> + {% endif %} + </section> +</article> +{% endblock %}
\ No newline at end of file |