From 53ed328867107cc8fc21eb2946b95b631eccdacb Mon Sep 17 00:00:00 2001 From: Alexandr Bogomyakov Date: Sun, 5 Nov 2023 21:07:13 +0200 Subject: [PATCH] Fix help --- templates/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/index.html b/templates/index.html index dc44b00..a72e4ee 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,12 +7,19 @@

Servers

{% for server in SERVERS %} + {% set list_ns = namespace(total_bytes=0) %} + {% for key in server.data["keys"] %} + {% if key.used_bytes %} + {% set list_ns.total_bytes = list_ns.total_bytes + key.used_bytes %} + {% endif %} + {% endfor %}
{{ server.info()["name"] }}

{{ '/'.join(server.info()["url"].split('/')[0:-1]) }}

Port {{ server.info()["port_for_new_access_keys"] }}

Hostname {{ server.info()["hostname_for_access_keys"] }}

+

Traffic: {{ list_ns.total_bytes | filesizeformat }}

v.{{ server.info()["version"] }}

{{ server.info()["comment"] }}