chg: [ail sync server] add server controller + list connected clients ail_uuid->sync_modes

This commit is contained in:
Terrtia 2021-11-29 16:18:47 +01:00
parent a1768e50da
commit 57f5afe831
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
4 changed files with 162 additions and 24 deletions

View file

@ -56,8 +56,11 @@ def ail_2_ail_dashboard():
ail_uuid = ail_2_ail.get_ail_uuid()
l_servers = ail_2_ail.get_all_running_sync_servers()
l_servers = ail_2_ail.get_ail_instances_metadata(l_servers)
l_clients = ail_2_ail.get_server_all_connected_clients()
l_clients = ail_2_ail.get_ail_instances_metadata(l_clients, sync_queues=False, client_sync_mode=True)
return render_template("ail_2_ail_dashboard.html", ail_uuid=ail_uuid,
l_servers=l_servers)
l_servers=l_servers,
l_clients=l_clients)
######################
# #

View file

@ -84,6 +84,44 @@
</tbody>
</table>
<h1>Connected Clients:</h3>
<table id="table_servers" class="table table-striped border-primary">
<thead class="bg-dark text-white">
<tr>
<th>uuid</th>
<th>url</th>
<th>description</th>
<th>sync mode</th>
</tr>
</thead>
<tbody style="font-size: 15px;">
{% for dict_server in l_clients %}
<tr class="border-color: blue;">
<td>
<a href="{{ url_for('ail_2_ail_sync.ail_server_view') }}?uuid={{ dict_server['uuid'] }}">
{{ dict_server['uuid']}}
</a>
</td>
<td>{{ dict_server['url']}}</td>
<td>{{ dict_server['description']}}</td>
<td class="text-center">
{% if dict_server['client_sync_mode']['api'] %}
API
{% endif %}
{% if dict_server['client_sync_mode']['pull'] %}
PULL
{% endif %}
{% if dict_server['client_sync_mode']['push'] %}
PUSH
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>