add system uuid to snapshots list

This commit is contained in:
Cayo Puigdefabregas 2022-06-15 13:39:06 +02:00
parent 77c01ae80a
commit 41196ae445
2 changed files with 10 additions and 0 deletions

View File

@ -594,12 +594,18 @@ class SnapshotListView(GenericMixin):
).order_by(SnapshotsLog.created.desc())
logs = {}
for snap in snapshots_log:
try:
system_uuid = snap.snapshot.device.system_uuid or ''
except AttributeError:
system_uuid = ''
if snap.snapshot_uuid not in logs:
logs[snap.snapshot_uuid] = {
'sid': snap.sid,
'snapshot_uuid': snap.snapshot_uuid,
'version': snap.version,
'device': snap.get_device(),
'system_uuid': system_uuid,
'status': snap.get_status(),
'severity': snap.severity,
'created': snap.created,

View File

@ -29,6 +29,7 @@
<th scope="col">Snapshot id</th>
<th scope="col">Version</th>
<th scope="col">DHID</th>
<th scope="col">System UUID</th>
<th scope="col">Status</th>
<th scope="col" data-type="date" data-format="DD-MM-YYYY">Time</th>
</tr>
@ -60,6 +61,9 @@
</a>
{% endif %}
</td>
<td>
{{ snap.system_uuid }}
</td>
<td>
{{ snap.status }}
</td>