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.
master
Alejandro Sirgo Rica 2024-07-17 10:42:18 +02:00
parent cae11fb04e
commit 78fd46ad4f
2 changed files with 4 additions and 5 deletions

View File

@ -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>

View File

@ -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'])