diff --git a/ereuse_devicehub/config.py b/ereuse_devicehub/config.py index 841e746e..3df4ee25 100644 --- a/ereuse_devicehub/config.py +++ b/ereuse_devicehub/config.py @@ -13,6 +13,7 @@ from ereuse_devicehub.resources import ( user, ) from ereuse_devicehub.resources.device import definitions +from ereuse_devicehub.resources.did import did from ereuse_devicehub.resources.documents import documents from ereuse_devicehub.resources.enums import PriceSoftware from ereuse_devicehub.resources.licences import licences @@ -32,6 +33,7 @@ class DevicehubConfig(Config): import_resource(action), import_resource(user), import_resource(tag), + import_resource(did), import_resource(agent), import_resource(lot), import_resource(deliverynote), diff --git a/ereuse_devicehub/templates/did/layout.html b/ereuse_devicehub/templates/did/layout.html new file mode 100644 index 00000000..cddddb04 --- /dev/null +++ b/ereuse_devicehub/templates/did/layout.html @@ -0,0 +1,303 @@ + + + + + + + + Device {{ device_real.dhid }} - Usody + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
Basic
+
+
+ Usody Identifier (DHID) +
+
+ {{ device_real.dhid }} +
+
+
+
+ Inventory Identifier (PHID) +
+
+ {{ device_real.phid() }} +
+
+
+
+ Type +
+
+ {{ device_real.type or '- not detected -' }} +
+
+
+
+ Manufacturer +
+
+ {{ device_real.manufacturer or '- not detected -' }} +
+
+
+
+ Model +
+
+ {{ device_real.model or '- not detected -' }} +
+
+
+
+ Part Number +
+
+ {{ device_real.part_number or '- not detected -' }} +
+
+
+
+ Serial Number +
+
+ - anonymized - +
+
+
+
+
+
+
Status
+
+
+
Physical
+
{{ device_real.physical_status and device.physical_status.type or '- not status -' }}
+
+
+
+
+
Lifecycle
+
{{ device_real.status and device_real.status.type or '- not status -' }}
+
+
+
+
+
Allocation
+
+ {% if device_real.allocated %} + Allocated + {% else %} + Not allocated + {% endif %} +
+
+
+
+
+
+
+
Components
+
+ {% if placeholder.binding %} +
+ {% for component in placeholder.binding.components|sort(attribute='type') %} +
+
+
{{ component.type }}
+ {{ component.created.strftime('%H:%M %d-%m-%Y') }} +
+

+ {{ component.manufacturer or '- not detected -' }}
+ {{ component.model or '- not detected -' }}
+

+ + {% if component.type in ['RamModule', 'HardDrive', 'SolidStateDrive'] %} + {{ component.size }}MB + {% endif %} + +
+ {% endfor %} +
+ {% else %} +
+
+ - not detected - +
+
+ {% endif %} +
+
+
+
Repair history
+
+
+ {% for action in placeholder.actions %} +
+ {{ action.type }} {{ action.severity }} + {{ action.created.strftime('%H:%M %d-%m-%Y') }} +
+ {% endfor %} +
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+ +
+ Help | + Privacy | + Terms +
+
+ DeviceHub +
+
+
+
+
+ +{% if user.is_anonymous and not rols %} + +{% else %} + +{% endif %} + + + +{% if not user.is_anonymous and not rol %} + +{% endif %} + +