mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-01-18 16:36:13 +00:00
chg: [chat explorer] show chats tags
This commit is contained in:
parent
c82ffdb815
commit
5094f9fcde
3 changed files with 11 additions and 2 deletions
|
@ -770,6 +770,7 @@ def enrich_chat_relationships_labels(relationships):
|
||||||
else:
|
else:
|
||||||
meta[row['target']] = row['target']
|
meta[row['target']] = row['target']
|
||||||
return meta
|
return meta
|
||||||
|
|
||||||
def api_get_chat_service_instance(chat_instance_uuid):
|
def api_get_chat_service_instance(chat_instance_uuid):
|
||||||
chat_instance = ChatServiceInstance(chat_instance_uuid)
|
chat_instance = ChatServiceInstance(chat_instance_uuid)
|
||||||
if not chat_instance.exists():
|
if not chat_instance.exists():
|
||||||
|
|
|
@ -74,7 +74,8 @@ def chats_explorer_instance():
|
||||||
return create_json_response(chat_instance[0], chat_instance[1])
|
return create_json_response(chat_instance[0], chat_instance[1])
|
||||||
else:
|
else:
|
||||||
chat_instance = chat_instance[0]
|
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'])
|
@chats_explorer.route("chats/explorer/chats/selector", methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
|
|
|
@ -83,7 +83,14 @@
|
||||||
class="rounded-circle mr-1" alt="{{ chat['id'] }}" width="40" height="40">
|
class="rounded-circle mr-1" alt="{{ chat['id'] }}" width="40" height="40">
|
||||||
</td>
|
</td>
|
||||||
<td><a href="{{ url_for('chats_explorer.chats_explorer_chat') }}?subtype={{ chat_instance['uuid'] }}&id={{ chat['id'] }}">{{ chat['id'] }}</a></td>
|
<td><a href="{{ url_for('chats_explorer.chats_explorer_chat') }}?subtype={{ chat_instance['uuid'] }}&id={{ chat['id'] }}">{{ chat['id'] }}</a></td>
|
||||||
<td><b>{{ chat['name'] }}</b></td>
|
<td>
|
||||||
|
<b>{{ chat['name'] }}</b>
|
||||||
|
<div>
|
||||||
|
{% for tag in chat['tags'] %}
|
||||||
|
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }}">{{ tag }}</span>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if chat['username'] %}
|
{% if chat['username'] %}
|
||||||
{{ chat['username'] }}
|
{{ chat['username'] }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue