chg: [retro hunt] show object match last seen date

This commit is contained in:
terrtia 2025-01-24 10:03:41 +01:00
parent 3194fb0daa
commit 1cb4142718
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
3 changed files with 12 additions and 7 deletions

View file

@ -88,8 +88,8 @@ class AbstractDaterangeObject(AbstractObject, ABC):
meta_dict['nb_seen'] = self.get_nb_seen() meta_dict['nb_seen'] = self.get_nb_seen()
if 'sparkline' in options: if 'sparkline' in options:
meta_dict['sparkline'] = self.get_sparkline() meta_dict['sparkline'] = self.get_sparkline()
if 'last_full_date'in options: if 'last_full_date' in options:
meta_dict['last_full_date'] = self.get_last_full_date() meta_dict['last_full_date'] = meta_dict['last_seen']
return meta_dict return meta_dict
def set_first_seen(self, first_seen): def set_first_seen(self, first_seen):

View file

@ -549,7 +549,7 @@ def retro_hunt_show_task():
dict_task['filters'] = json.dumps(dict_task['filters'], indent=4) dict_task['filters'] = json.dumps(dict_task['filters'], indent=4)
if objs: if objs:
dict_task['objs'] = ail_objects.get_objects_meta(retro_hunt.get_objs(), flask_context=True) dict_task['objs'] = ail_objects.get_objects_meta(retro_hunt.get_objs(), options={'last_full_date'}, flask_context=True)
else: else:
dict_task['objs'] = [] dict_task['objs'] = []

View file

@ -204,7 +204,7 @@
<th>Type</th> <th>Type</th>
<th></th> <th></th>
<th>Id</th> <th>Id</th>
<th>Tags</th> <th>Last Date</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
@ -226,11 +226,16 @@
<a href="{{ object['link'] }}"> <a href="{{ object['link'] }}">
{{ object['id']}} {{ object['id']}}
</a> </a>
<div>
{% for tag in object['tags'] %}
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }} pull-left">{{ tag }}</span>
{% endfor %}
</div>
</td> </td>
<td> <td>
{% for tag in object['tags'] %} {% if object['last_full_date'] %}
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }} pull-left">{{ tag }}</span> {{ object['last_full_date']}}
{% endfor %} {% endif %}
</td> </td>
<td class="text-right"> <td class="text-right">
{# <a href="{{ url_for('investigations_b.unregister_investigation') }}?uuid={{ tracker_metadata['uuid']}}&type={{ object['type'] }}&subtype={{ object['subtype']}}&id={{ object['id']}}">#} {# <a href="{{ url_for('investigations_b.unregister_investigation') }}?uuid={{ tracker_metadata['uuid']}}&type={{ object['type'] }}&subtype={{ object['subtype']}}&id={{ object['id']}}">#}