From 5094f9fcdeb5c9f4a7b8466141b1899751f60d6b Mon Sep 17 00:00:00 2001 From: terrtia Date: Fri, 10 Jan 2025 10:33:28 +0100 Subject: [PATCH] chg: [chat explorer] show chats tags --- bin/lib/chats_viewer.py | 1 + var/www/blueprints/chats_explorer.py | 3 ++- var/www/templates/chats_explorer/chat_instance.html | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/lib/chats_viewer.py b/bin/lib/chats_viewer.py index 06131661..34e1468b 100755 --- a/bin/lib/chats_viewer.py +++ b/bin/lib/chats_viewer.py @@ -770,6 +770,7 @@ def enrich_chat_relationships_labels(relationships): else: meta[row['target']] = row['target'] return meta + def api_get_chat_service_instance(chat_instance_uuid): chat_instance = ChatServiceInstance(chat_instance_uuid) if not chat_instance.exists(): diff --git a/var/www/blueprints/chats_explorer.py b/var/www/blueprints/chats_explorer.py index 16a9d291..eaae835e 100644 --- a/var/www/blueprints/chats_explorer.py +++ b/var/www/blueprints/chats_explorer.py @@ -74,7 +74,8 @@ def chats_explorer_instance(): return create_json_response(chat_instance[0], chat_instance[1]) else: chat_instance = chat_instance[0] - return render_template('chat_instance.html', chat_instance=chat_instance) + return render_template('chat_instance.html', chat_instance=chat_instance, + bootstrap_label=bootstrap_label) @chats_explorer.route("chats/explorer/chats/selector", methods=['GET']) @login_required diff --git a/var/www/templates/chats_explorer/chat_instance.html b/var/www/templates/chats_explorer/chat_instance.html index 747dc98b..b592ffe5 100644 --- a/var/www/templates/chats_explorer/chat_instance.html +++ b/var/www/templates/chats_explorer/chat_instance.html @@ -83,7 +83,14 @@ class="rounded-circle mr-1" alt="{{ chat['id'] }}" width="40" height="40"> {{ chat['id'] }} - {{ chat['name'] }} + + {{ chat['name'] }} +
+ {% for tag in chat['tags'] %} + {{ tag }} + {% endfor %} +
+ {% if chat['username'] %} {{ chat['username'] }}