add system uuid to snapshots list
This commit is contained in:
parent
77c01ae80a
commit
41196ae445
|
@ -594,12 +594,18 @@ class SnapshotListView(GenericMixin):
|
||||||
).order_by(SnapshotsLog.created.desc())
|
).order_by(SnapshotsLog.created.desc())
|
||||||
logs = {}
|
logs = {}
|
||||||
for snap in snapshots_log:
|
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:
|
if snap.snapshot_uuid not in logs:
|
||||||
logs[snap.snapshot_uuid] = {
|
logs[snap.snapshot_uuid] = {
|
||||||
'sid': snap.sid,
|
'sid': snap.sid,
|
||||||
'snapshot_uuid': snap.snapshot_uuid,
|
'snapshot_uuid': snap.snapshot_uuid,
|
||||||
'version': snap.version,
|
'version': snap.version,
|
||||||
'device': snap.get_device(),
|
'device': snap.get_device(),
|
||||||
|
'system_uuid': system_uuid,
|
||||||
'status': snap.get_status(),
|
'status': snap.get_status(),
|
||||||
'severity': snap.severity,
|
'severity': snap.severity,
|
||||||
'created': snap.created,
|
'created': snap.created,
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
<th scope="col">Snapshot id</th>
|
<th scope="col">Snapshot id</th>
|
||||||
<th scope="col">Version</th>
|
<th scope="col">Version</th>
|
||||||
<th scope="col">DHID</th>
|
<th scope="col">DHID</th>
|
||||||
|
<th scope="col">System UUID</th>
|
||||||
<th scope="col">Status</th>
|
<th scope="col">Status</th>
|
||||||
<th scope="col" data-type="date" data-format="DD-MM-YYYY">Time</th>
|
<th scope="col" data-type="date" data-format="DD-MM-YYYY">Time</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -60,6 +61,9 @@
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ snap.system_uuid }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ snap.status }}
|
{{ snap.status }}
|
||||||
</td>
|
</td>
|
||||||
|
|
Reference in a new issue