chg: [tracker] list of last matchs, show description

dev
terrtia 2024-02-15 12:02:01 +01:00
parent 1a3ffe70c1
commit 1e8f8e9e9c
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 4 additions and 1 deletions

View File

@ -701,7 +701,7 @@ def get_trackers_dashboard():
for raw in r_tracker.lrange('trackers:dashboard', 0, -1): for raw in r_tracker.lrange('trackers:dashboard', 0, -1):
tracker_uuid, timestamp, obj_type, subtype, obj_id = raw.split(':', 4) tracker_uuid, timestamp, obj_type, subtype, obj_id = raw.split(':', 4)
tracker = Tracker(tracker_uuid) tracker = Tracker(tracker_uuid)
meta = tracker.get_meta(options={'tags'}) meta = tracker.get_meta(options={'description', 'tags'})
if not meta.get('type'): if not meta.get('type'):
meta['type'] = 'Tracker DELETED' meta['type'] = 'Tracker DELETED'
timestamp = datetime.datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') timestamp = datetime.datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S')

View File

@ -108,6 +108,9 @@
{{ meta['tracked'] }} {{ meta['tracked'] }}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if meta['description'] %}
<div><i>{{ meta['description'] }}</i></div>
{% endif %}
</a> </a>
</span> </span>
</td> </td>