From 696a81fd1147e301dd69609558da387f17c57228 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 10 Sep 2024 15:21:03 +0200 Subject: templates: add name and status to client list Add a client name column to the client list view accessed through the Dashboard. Add status column to the client list. Move client status leyend into a separate file. Show the client status leyend in client list. Fix the 0 link speed conditional. Reuse the data returned by get_scopes() to reduce the number of requests. --- ogcp/templates/client_list.html | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'ogcp/templates/client_list.html') diff --git a/ogcp/templates/client_list.html b/ogcp/templates/client_list.html index 8a3fd5b..723dce9 100644 --- a/ogcp/templates/client_list.html +++ b/ogcp/templates/client_list.html @@ -8,6 +8,8 @@
+{% include 'client_status_leyend.html' %} + {% for server_id, server_data in servers_data.items() %}
@@ -22,8 +24,10 @@ + + @@ -31,9 +35,10 @@ {% for client_data in server_data.clients %} + + {% endfor %} -- cgit v1.2.3-18-g5258
{{ _('Name') }} {{ _('IP') }} {{ _('Link speed') }}{{ _('Status') }} {{ _('Details') }}
{{ client_data.name }} {{ client_data.addr }} - {% if client_data.speed is not none %} + {% if client_data.speed is not none and client_data.speed > 0 %} {% if client_data.speed >= 1000 %} {{ (client_data.speed / 1000) | int }} Gb/s {% else %} @@ -43,6 +48,31 @@ {{ _('Not available') }} {% endif %} + + {{ _('View details') }}