summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/client_list.html
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-30 13:10:29 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-08-05 10:03:12 +0200
commit3e35997131f51e892b93157c6d18a3a0ba759318 (patch)
treec722d8601b7b4f36af12db95a905ca6212abdda0 /ogcp/templates/client_list.html
parent695b83d4730e624a7cffa7e6ee14a64ece226eb8 (diff)
ogcp: add connected clients list view
Add view to show the connected clients with access to the client details of each one. The view is accessible through the main dashboard.
Diffstat (limited to 'ogcp/templates/client_list.html')
-rw-r--r--ogcp/templates/client_list.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/ogcp/templates/client_list.html b/ogcp/templates/client_list.html
new file mode 100644
index 0000000..188cc2a
--- /dev/null
+++ b/ogcp/templates/client_list.html
@@ -0,0 +1,55 @@
+{% extends 'commands.html' %}
+
+{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
+
+{% block content %}
+
+<h2 class="mx-5 subhead-heading">{{_('Connected clients')}}</h2>
+
+<div class="container mx-5">
+
+{% for server_id, server_data in servers_data.items() %}
+<div class="accordion card" id="shellAccordion">
+ <div class="card-header" id="heading_1">
+ <h2 class="mb-0">
+ <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapse_{{ loop.index }}" aria-expanded="true" aria-controls="collapse_{{ loop.index }}">
+ <h4>{{ server_data.name}}</h4>
+ </button>
+ </h2>
+ </div>
+ <div id="collapse_{{ loop.index }}" class="collapse show" aria-labelledby="heading_{{ loop.index }}">
+ <div class="card-body">
+ <table class="table table-hover">
+ <thead class="thead-light">
+ <tr>
+ <th>{{ _('IP') }}</th>
+ <th>{{ _('Link speed') }}</th>
+ <th>{{ _('Details') }}</th>
+ </tr>
+ </thead>
+
+ <tbody data-target="cache-fieldset" id="cacheTable" class="text-left">
+ {% for client_data in server_data.clients %}
+ <tr data-toggle="fieldset-entry">
+ <td>{{ client_data.addr }}</td>
+ <td>
+ {% if client_data.speed >= 1000 %}
+ {{ (client_data.speed / 1000) | int }} Gb/s
+ {% else %}
+ {{ client_data.speed }} Mb/s
+ {% endif %}
+ </td>
+ <td><a href="{{ url_for('action_client_info', client_ip = client_data.addr) }}">{{ _('View details') }}</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+</div>
+{% endfor %}
+
+</div>
+
+{% endblock %}