diff --git a/dashboard/templates/unassigned_devices.html b/dashboard/templates/unassigned_devices.html
index 6a22bb8..5477693 100644
--- a/dashboard/templates/unassigned_devices.html
+++ b/dashboard/templates/unassigned_devices.html
@@ -46,6 +46,12 @@
{% trans "Model" %}
|
+
+ {% trans "Current State" %}
+ |
+
+ {% trans "Evidence last updated" %}
+ |
@@ -64,16 +70,23 @@
{{ dev.manufacturer }}
- |
-
- {% if dev.version %}
- {{dev.version}} {{ dev.model }}
- {% else %}
- {{ dev.model }}
- {% endif %}
- |
-
-
+
+
+ {% if dev.version %}
+ {{dev.version}} {{ dev.model }}
+ {% else %}
+ {{ dev.model }}
+ {% endif %}
+ |
+
+ {{ dev.get_current_state.state|default:"N/A" }}
+ |
+
+ | {{ log.date|date:"M j, Y, H:i" }} |
+ {{ dev.get_last_evidence.created }}
+
+
+
{% endfor %}
diff --git a/device/models.py b/device/models.py
index a385895..8ae521a 100644
--- a/device/models.py
+++ b/device/models.py
@@ -125,10 +125,14 @@ class Device:
def last_uuid(self):
if self.uuid:
return self.uuid
+
+ if not self.uuids:
+ self.get_uuids()
+
return self.uuids[0]
def get_current_state(self):
- uuid = self.last_uuid
+ uuid = self.last_uuid()
return State.objects.filter(snapshot_uuid=uuid).order_by('-date').first()