diff --git a/bin/lib/objects/ail_objects.py b/bin/lib/objects/ail_objects.py index 2ff619ce..6f4f750d 100755 --- a/bin/lib/objects/ail_objects.py +++ b/bin/lib/objects/ail_objects.py @@ -254,7 +254,7 @@ def get_objects_meta(objs, options=set(), flask_context=False): def get_object_card_meta(obj_type, subtype, id, related_btc=False): obj = get_object(obj_type, subtype, id) - meta = obj.get_meta(options={'chat', 'created_at', 'icon', 'info', 'nb_messages', 'nb_participants', 'threads'}) + meta = obj.get_meta(options={'chat', 'chats', 'created_at', 'icon', 'info', 'nb_messages', 'nb_participants', 'threads', 'username'}) # meta['icon'] = obj.get_svg_icon() meta['svg_icon'] = obj.get_svg_icon() if subtype or obj_type == 'cookie-name' or obj_type == 'cve' or obj_type == 'etag' or obj_type == 'title' or obj_type == 'favicon' or obj_type == 'hhhash': diff --git a/var/www/blueprints/chats_explorer.py b/var/www/blueprints/chats_explorer.py index 5c543665..49544dbb 100644 --- a/var/www/blueprints/chats_explorer.py +++ b/var/www/blueprints/chats_explorer.py @@ -270,4 +270,5 @@ def objects_user_account(): user_account = user_account[0] languages = Language.get_translation_languages() return render_template('user_account.html', meta=user_account, bootstrap_label=bootstrap_label, + ail_tags=Tag.get_modal_add_tags(user_account['id'], user_account['type'], user_account['subtype']), translation_languages=languages, translation_target=target) diff --git a/var/www/templates/chats_explorer/card_user_account.html b/var/www/templates/chats_explorer/card_user_account.html new file mode 100644 index 00000000..f5514967 --- /dev/null +++ b/var/www/templates/chats_explorer/card_user_account.html @@ -0,0 +1,97 @@ + + + +{% with modal_add_tags=ail_tags %} + {% include 'modals/add_tags.html' %} +{% endwith %} + +{% include 'modals/edit_tag.html' %} + + +
+
+

{% if meta['username'] %}{{ meta["username"]["id"] }} {% else %} {{ meta['id'] }}{% endif %}

+ {% if meta['icon'] %} +
{{ meta['id'] }}
+ {% endif %} + + + {% with obj_type=meta['type'], obj_id=meta['id'], obj_subtype=meta['subtype'] %} + {% include 'modals/investigations_register_obj.html' %} + {% endwith %} + + + + {% if is_correlation %} + + + + {% else %} + + + + {% endif %} + + +
+
\ No newline at end of file diff --git a/var/www/templates/chats_explorer/user_account.html b/var/www/templates/chats_explorer/user_account.html index 7d869733..308f5959 100644 --- a/var/www/templates/chats_explorer/user_account.html +++ b/var/www/templates/chats_explorer/user_account.html @@ -32,75 +32,7 @@
-
- -
-

{% if meta['username'] %}{{ meta["username"]["id"] }} {% else %} {{ meta['id'] }}{% endif %}

- {% if meta['icon'] %} -
{{ meta['id'] }}
- {% endif %} -
    -
  • - - - - - - - - - - - - - - - - - - - -
    usernameIDFirst SeenLast SeenNB Chats
    {{ meta['username']['id'] }}{{ meta['id'] }} - {% if meta['first_seen'] %} - {{ meta['first_seen'][0:4] }}-{{ meta['first_seen'][4:6] }}-{{ meta['first_seen'][6:8] }} - {% endif %} - - {% if meta['last_seen'] %} - {{ meta['last_seen'][0:4] }}-{{ meta['last_seen'][4:6] }}-{{ meta['last_seen'][6:8] }} - {% endif %} - {{ meta['chats'] | length }}
    - {% if meta['info'] %} -
  • -
    {{ meta['info'] }}
    - {% if meta['translation_info'] %} -
    -
    {{ meta['translation_info'] }}
    - {% endif %} -
  • - {% endif %} - -
- -
-
- - - -
-{#
#} -{# {% with obj_type=meta['type'], obj_id=meta['id'], obj_subtype=''%}#} -{# {% include 'modals/investigations_register_obj.html' %}#} -{# {% endwith %}#} -{#
#} -{# #} -{#
#} -{#
#} -
- -
-
+ {% include 'chats_explorer/card_user_account.html' %} {% with translate_url=url_for('chats_explorer.objects_user_account', subtype=meta['subtype']), obj_id=meta['id'] %} {% include 'chats_explorer/block_translation.html' %} diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index 4a023967..cdd0bc64 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -106,6 +106,8 @@ {% include 'chats_explorer/card_chat.html' %} {% elif dict_object["object_type"] == "chat-subchannel" %} {% include 'chats_explorer/card_chat_subchannel.html' %} + {% elif dict_object["object_type"] == "user-account" %} + {% include 'chats_explorer/card_user_account.html' %} {% elif dict_object["object_type"] == "cryptocurrency" %} {% include 'correlation/metadata_card_cryptocurrency.html' %} {% elif dict_object["object_type"] == "username" %}