summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-17 10:42:18 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-17 10:57:44 +0200
commit78fd46ad4ffc573b2f6c3885a7ac0310319c1d4d (patch)
tree738f9700fe65f2875a2e52d9362e0b67cf1cfe18 /ogcp
parentcae11fb04e68a7aaba6212967253517137454d1d (diff)
ogcp: show oglive client groups by ip
Use the same visualization as the other parts of the web in the table that groups clients by ogLive.
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/templates/actions/oglive.html4
-rw-r--r--ogcp/views.py5
2 files changed, 4 insertions, 5 deletions
diff --git a/ogcp/templates/actions/oglive.html b/ogcp/templates/actions/oglive.html
index 9c9d48b..82bd957 100644
--- a/ogcp/templates/actions/oglive.html
+++ b/ogcp/templates/actions/oglive.html
@@ -32,8 +32,8 @@
<tr>
<th>{{oglive}}</th>
<td>
- {% for client in clients %}
- {{client}}
+ {% for ip in clients %}
+ <div class="card d-inline-block" style="padding: 5px;">{{ ip }}</div>
{% endfor %}
</td>
</tr>
diff --git a/ogcp/views.py b/ogcp/views.py
index 456b444..875d0ec 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -2125,11 +2125,10 @@ def get_clients_oglive(ips, server):
raise ServerErrorCode
resp = r.json()
oglive = resp['livedir']
- client_name = resp['name']
if oglive not in oglives:
- oglives[oglive] = [client_name]
+ oglives[oglive] = [ip]
else:
- oglives[oglive].append(client_name)
+ oglives[oglive].append(ip)
return oglives
@app.route('/action/oglive', methods=['GET', 'POST'])