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"] }}