From 6760bc5c2e98ebdc89b74b84e8f8e93e4881e2dd Mon Sep 17 00:00:00 2001 From: jwansek Date: Tue, 8 Apr 2025 23:08:19 +0100 Subject: Re-added the services page --- templates/services.html.j2 | 106 ++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 74 deletions(-) (limited to 'templates') diff --git a/templates/services.html.j2 b/templates/services.html.j2 index ebf8ebd..9c9e5ec 100755 --- a/templates/services.html.j2 +++ b/templates/services.html.j2 @@ -3,96 +3,54 @@

docker

- {% if docker == None %} -

Couldn't access the docker API. Is sherpa running?

- {% else %} - - {% for name, status in docker.items() %} - - - {% if status == "running" %} - - {% else %} - - {% endif %} - - {% endfor %} -
{{name}}{{status}}{{status}}
- {% endif %} +
    + {% for host, containers in docker.items() %} +

    {{ "%s - %s" % (host[0], host[1]) }}

    + + {% for name, status, image in containers %} + + + {% if "Up" in status %} + + {% else %} + + {% endif %} + + + {% endfor %} +
    {{ name }}{{ status }}{{ status }}{{ image }}
    + {% endfor %} +
+

transmission

{% if trans == None %}

Couldn't access the transmission API. Is docker container running?

{% else %} - - - - - - - - - - - - - - - - - - - - + {% for k, v in trans.items() %} + + + + + {% endfor %}
downloaded{{trans["bytes_dl"]}}
uploaded{{trans["bytes_up"]}}
torrents{{trans["num"]}}
ratio{{trans["ratio"]}}
active for{{trans["active_for"]}}
{{ k }}{{ v }}
{% endif %} -
- statistics of some old torrent clients which were shut down recently ;_; -
- - -
+

pihole

{% if pihole == None %}

Couldn't access the pihole API. Is docker container running?

{% else %} - - - {% if pihole["status"] == "enabled" %} - - {% else %} - - {% endif %} - - - - - - - - - - - - - - - - - - - - - - - - - + {% for k, v in pihole.items() %} + + + + + {% endfor %}
status{{pihole["status"]}}{{pihole["status"]}}
queries{{pihole["queries"]}}
clients{{pihole["clients"]}}
percentage blocked{{pihole["percentage"]}}%
blocked requests{{pihole["blocked"]}}
domains in blocklist{{pihole["domains"]}}
last updated{{pihole["last_updated"]}}
{{ k }}{{ v }}
{% endif %}
-- cgit v1.2.3