diff --git a/var/www/blueprints/chats_explorer.py b/var/www/blueprints/chats_explorer.py index fc0d539a..e24abe82 100644 --- a/var/www/blueprints/chats_explorer.py +++ b/var/www/blueprints/chats_explorer.py @@ -58,7 +58,7 @@ def chats_explorer_networks(): networks = chats_viewer.get_chat_service_instances_by_protocol(protocol) if len(networks) == 1: instance_uuid = list(networks.values())[0] - return redirect(url_for('chats_explorer.chats_explorer_instance', uuid=instance_uuid)) + return redirect(url_for('chats_explorer.chats_explorer_instance', subtype=instance_uuid)) else: return render_template('chats_networks.html', protocol=protocol, networks=networks) @@ -67,7 +67,7 @@ def chats_explorer_networks(): @login_required @login_read_only def chats_explorer_instance(): - intance_uuid = request.args.get('uuid') + intance_uuid = request.args.get('subtype') chat_instance = chats_viewer.api_get_chat_service_instance(intance_uuid) if chat_instance[1] != 200: return create_json_response(chat_instance[0], chat_instance[1]) @@ -80,7 +80,7 @@ def chats_explorer_instance(): @login_read_only def chats_explorer_chat(): chat_id = request.args.get('id') - instance_uuid = request.args.get('uuid') + instance_uuid = request.args.get('subtype') target = request.args.get('target') if target == "Don't Translate": target = None @@ -125,7 +125,7 @@ def chats_explorer_messages_stats_week_all(): @login_read_only def objects_subchannel_messages(): subchannel_id = request.args.get('id') - instance_uuid = request.args.get('uuid') + instance_uuid = request.args.get('subtype') target = request.args.get('target') if target == "Don't Translate": target = None @@ -144,7 +144,7 @@ def objects_subchannel_messages(): @login_read_only def objects_thread_messages(): thread_id = request.args.get('id') - instance_uuid = request.args.get('uuid') + instance_uuid = request.args.get('subtype') target = request.args.get('target') if target == "Don't Translate": target = None @@ -178,7 +178,7 @@ def chats_explorer_chat_participants(): @login_read_only def chats_explorer_chat_download(): chat_id = request.args.get('id') - chat_subtype = request.args.get('uuid') + chat_subtype = request.args.get('subtype') chat = chats_viewer.api_chat_messages(chat_subtype, chat_id) if chat[1] != 200: if chat[1] == 404: @@ -193,7 +193,7 @@ def chats_explorer_chat_download(): @login_read_only def objects_subchannel_messages_download(): subchannel_id = request.args.get('id') - instance_uuid = request.args.get('uuid') + instance_uuid = request.args.get('subtype') subchannel = chats_viewer.api_subchannel_messages(instance_uuid, subchannel_id) if subchannel[1] != 200: return create_json_response(subchannel[0], subchannel[1]) @@ -206,7 +206,7 @@ def objects_subchannel_messages_download(): @login_read_only def objects_thread_messages_download(): thread_id = request.args.get('id') - instance_uuid = request.args.get('uuid') + instance_uuid = request.args.get('subtype') thread = chats_viewer.api_thread_messages(instance_uuid, thread_id) if thread[1] != 200: return create_json_response(thread[0], thread[1]) diff --git a/var/www/templates/chats_explorer/SubChannelMessages.html b/var/www/templates/chats_explorer/SubChannelMessages.html index 4f5a98da..17390a0c 100644 --- a/var/www/templates/chats_explorer/SubChannelMessages.html +++ b/var/www/templates/chats_explorer/SubChannelMessages.html @@ -157,7 +157,7 @@ {% for thread in subchannel['threads'] %} - {{ thread['name'] }} {{ thread['nb_messages'] }} Messages + {{ thread['name'] }} {{ thread['nb_messages'] }} Messages {{ thread["created_at"] }} @@ -198,7 +198,7 @@ {% include 'objects/image/block_blur_img_slider.html' %} - {% with translate_url=url_for('chats_explorer.objects_subchannel_messages', uuid=subchannel['subtype']), obj_id=subchannel['id'], pagination=subchannel['pagination'] %} + {% with translate_url=url_for('chats_explorer.objects_subchannel_messages', subtype=subchannel['subtype']), obj_id=subchannel['id'], pagination=subchannel['pagination'] %} {% include 'chats_explorer/block_translation.html' %} {% endwith %} {% with obj_subtype=subchannel['subtype'], obj_id=subchannel['id'], url_endpoint=url_for("chats_explorer.objects_subchannel_messages"), nb=subchannel['pagination']['nb'] %} @@ -206,7 +206,7 @@ {% set date_to=subchannel['last_seen'] %} {% include 'block_obj_time_search.html' %} {% endwith %} - {% with endpoint_url=url_for('chats_explorer.objects_subchannel_messages', uuid=subchannel['subtype']), pagination=subchannel['pagination'] %} + {% with endpoint_url=url_for('chats_explorer.objects_subchannel_messages', subtype=subchannel['subtype']), pagination=subchannel['pagination'] %} {% set endpoint_url = endpoint_url + "&id=" + subchannel['id'] + "&nb=" + subchannel['pagination']['nb'] | string %} {% if translation_target %} {% set endpoint_url = endpoint_url + "&target=" + translation_target %} @@ -238,7 +238,7 @@ - {% with endpoint_url=url_for('chats_explorer.objects_subchannel_messages', uuid=subchannel['subtype']), pagination=subchannel['pagination'] %} + {% with endpoint_url=url_for('chats_explorer.objects_subchannel_messages', subtype=subchannel['subtype']), pagination=subchannel['pagination'] %} {% set endpoint_url = endpoint_url + "&id=" + subchannel['id'] + "&nb=" + subchannel['pagination']['nb'] | string %} {% if translation_target %} {% set endpoint_url = endpoint_url + "&target=" + translation_target %} diff --git a/var/www/templates/chats_explorer/ThreadMessages.html b/var/www/templates/chats_explorer/ThreadMessages.html index 8fdd27f6..70995962 100644 --- a/var/www/templates/chats_explorer/ThreadMessages.html +++ b/var/www/templates/chats_explorer/ThreadMessages.html @@ -138,7 +138,7 @@ {% include 'objects/image/block_blur_img_slider.html' %} - {% with translate_url=url_for('chats_explorer.objects_thread_messages', uuid=meta['subtype']), obj_id=meta['id'], pagination=meta['pagination'] %} + {% with translate_url=url_for('chats_explorer.objects_thread_messages', subtype=meta['subtype']), obj_id=meta['id'], pagination=meta['pagination'] %} {% include 'chats_explorer/block_translation.html' %} {% endwith %} {% with obj_subtype=meta['subtype'], obj_id=meta['id'], url_endpoint=url_for("chats_explorer.objects_thread_messages"), nb=meta['pagination']['nb'] %} @@ -146,7 +146,7 @@ {% set date_to=meta['last_seen'] %} {% include 'block_obj_time_search.html' %} {% endwith %} - {% with endpoint_url=url_for('chats_explorer.objects_thread_messages', uuid=meta['subtype']), pagination=meta['pagination'] %} + {% with endpoint_url=url_for('chats_explorer.objects_thread_messages', subtype=meta['subtype']), pagination=meta['pagination'] %} {% set endpoint_url = endpoint_url + "&id=" + meta['id'] + "&nb=" + meta['pagination']['nb'] | string %} {% if translation_target %} {% set endpoint_url = endpoint_url + "&target=" + translation_target %} @@ -178,7 +178,7 @@ - {% with endpoint_url=url_for('chats_explorer.objects_thread_messages', uuid=meta['subtype']), pagination=meta['pagination'] %} + {% with endpoint_url=url_for('chats_explorer.objects_thread_messages', subtype=meta['subtype']), pagination=meta['pagination'] %} {% set endpoint_url = endpoint_url + "&id=" + meta['id'] + "&nb=" + meta['pagination']['nb'] | string %} {% if translation_target %} {% set endpoint_url = endpoint_url + "&target=" + translation_target %} diff --git a/var/www/templates/chats_explorer/block_message.html b/var/www/templates/chats_explorer/block_message.html index 811a642e..059e973d 100644 --- a/var/www/templates/chats_explorer/block_message.html +++ b/var/www/templates/chats_explorer/block_message.html @@ -106,7 +106,7 @@ {% if message['thread'] %}
- {{ message['thread']['nb'] }} Messages + {{ message['thread']['nb'] }} Messages
{% endif %} {% for tag in message['tags'] %} diff --git a/var/www/templates/chats_explorer/block_obj_time_search.html b/var/www/templates/chats_explorer/block_obj_time_search.html index 60401d42..1db204dd 100644 --- a/var/www/templates/chats_explorer/block_obj_time_search.html +++ b/var/www/templates/chats_explorer/block_obj_time_search.html @@ -45,7 +45,7 @@