mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-02-07 09:56:24 +00:00
chg: [retro hunt] show object match last seen date
This commit is contained in:
parent
3194fb0daa
commit
1cb4142718
3 changed files with 12 additions and 7 deletions
|
@ -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):
|
||||||
|
|
|
@ -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'] = []
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
</td>
|
<div>
|
||||||
<td>
|
|
||||||
{% for tag in object['tags'] %}
|
{% for tag in object['tags'] %}
|
||||||
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }} pull-left">{{ tag }}</span>
|
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }} pull-left">{{ tag }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if object['last_full_date'] %}
|
||||||
|
{{ object['last_full_date']}}
|
||||||
|
{% 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']}}">#}
|
||||||
|
|
Loading…
Add table
Reference in a new issue