diff --git a/bin/lib/objects/UsersAccount.py b/bin/lib/objects/UsersAccount.py index 5777bd17..73ae7525 100755 --- a/bin/lib/objects/UsersAccount.py +++ b/bin/lib/objects/UsersAccount.py @@ -49,9 +49,9 @@ def delete(self): def get_link(self, flask_context=False): if flask_context: - url = url_for('correlation.show_correlation', type=self.type, subtype=self.subtype, id=self.id) + url = url_for('chats_explorer.objects_user_account', type=self.type, subtype=self.subtype, id=self.id) else: - url = f'{baseurl}/correlation/show?type={self.type}&subtype={self.subtype}&id={self.id}' + url = f'{baseurl}/objects/user-account?&subtype={self.subtype}&id={self.id}' return url def get_svg_icon(self): # TODO change icon/color @@ -127,6 +127,13 @@ def get_usernames(self): def update_username_timeline(self, username_global_id, timestamp): self._get_timeline_username().add_timestamp(timestamp, username_global_id) + def get_messages(self): + messages = [] + for mess in self.get_correlation('message'): + messages.append(f'message:{mess}') + return messages + + def get_messages_by_chat_obj(self, chat_obj): messages = [] for mess in self.get_correlation_iter_obj(chat_obj, 'message'): diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index a5edf49e..1222755d 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -190,8 +190,11 @@ def show_correlation(): else: dict_object["subtype"] = '' dict_object["metadata_card"] = ail_objects.get_object_card_meta(obj_type, subtype, obj_id, related_btc=related_btc) + dict_object["metadata_card"]['tags_safe'] = True return render_template("show_correlation.html", dict_object=dict_object, bootstrap_label=bootstrap_label, - tags_selector_data=Tag.get_tags_selector_data()) + tags_selector_data=Tag.get_tags_selector_data(), + meta=dict_object["metadata_card"], + ail_tags=dict_object["metadata_card"]["add_tags_modal"]) @correlation.route('/correlation/get/description') @login_required diff --git a/var/www/templates/chats_explorer/basic_card_image.html b/var/www/templates/chats_explorer/basic_card_image.html new file mode 100644 index 00000000..307dbddb --- /dev/null +++ b/var/www/templates/chats_explorer/basic_card_image.html @@ -0,0 +1,57 @@ + + +
+ | First Seen | +Last Seen | +NB | +
---|---|---|---|
+ + {{ meta['type'] }} + | ++ {{ meta['first_seen'][0:4] }}-{{ meta['first_seen'][4:6] }}-{{ meta['first_seen'][6:8] }} + | ++ {{ meta['last_seen'][0:4] }}-{{ meta['last_seen'][4:6] }}-{{ meta['last_seen'][6:8] }} + | +{{ meta['nb_seen'] }} | +