From 7a8cbe11a6e79faff46c0dd2825a000734fcbb91 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 1 Feb 2023 17:25:39 +0100 Subject: [PATCH 1/7] fix --- .../resources/device/templates/devices/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/device/templates/devices/layout.html b/ereuse_devicehub/resources/device/templates/devices/layout.html index a9509915..3a31902c 100644 --- a/ereuse_devicehub/resources/device/templates/devices/layout.html +++ b/ereuse_devicehub/resources/device/templates/devices/layout.html @@ -116,8 +116,8 @@ {{ component.created.strftime('%H:%M %d-%m-%Y') }}

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

{% if component.type in ['RamModule', 'HardDrive', 'SolidStateDrive'] %} From 184a9877bc4cebee02e0c34b10cd6e1f37f30da1 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 2 Feb 2023 11:02:36 +0100 Subject: [PATCH 2/7] fix footer --- .../device/templates/devices/layout.html | 81 ++++++++++++++----- .../templates/ereuse_devicehub/base_site.html | 4 +- .../ereuse_devicehub/user_login.html | 4 +- 3 files changed, 64 insertions(+), 25 deletions(-) diff --git a/ereuse_devicehub/resources/device/templates/devices/layout.html b/ereuse_devicehub/resources/device/templates/devices/layout.html index 3a31902c..f71806c0 100644 --- a/ereuse_devicehub/resources/device/templates/devices/layout.html +++ b/ereuse_devicehub/resources/device/templates/devices/layout.html @@ -1,7 +1,44 @@ -{% extends "ereuse_devicehub/base.html" %} -{% block page_title %}Device {{ device.dhid }}{% endblock %} + + + + + + + + Device {{ device_real.dhid }} - Usody + + + + + + + + + + + + + + + + + + + + + + + + + + + -{% block body %}
@@ -159,23 +196,25 @@
-
-
-
-
- -
- Help | - Privacy | - Terms -
-
- DeviceHub -
-
+
+
+
+
+ +
+ Help | + Privacy | + Terms +
+
+ DeviceHub +
+
+
-
-{% endblock body%} + + + diff --git a/ereuse_devicehub/templates/ereuse_devicehub/base_site.html b/ereuse_devicehub/templates/ereuse_devicehub/base_site.html index f3865433..f6dfb1b3 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/base_site.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/base_site.html @@ -309,8 +309,8 @@
Help | - Privacy | - Terms + Privacy | + Terms
DeviceHub {{ version }} diff --git a/ereuse_devicehub/templates/ereuse_devicehub/user_login.html b/ereuse_devicehub/templates/ereuse_devicehub/user_login.html index 78776b16..b8b6cbc0 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/user_login.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/user_login.html @@ -71,8 +71,8 @@
Help | - Privacy | - Terms + Privacy | + Terms
From 5f9abe83d666cf87f371de4152abf118ad5cb3c5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 23 Feb 2023 17:13:16 +0100 Subject: [PATCH 3/7] change version of usody iso to 14.2.0 --- ereuse_devicehub/workbench/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/workbench/__init__.py b/ereuse_devicehub/workbench/__init__.py index 70ac8a85..ea44bae3 100644 --- a/ereuse_devicehub/workbench/__init__.py +++ b/ereuse_devicehub/workbench/__init__.py @@ -8,7 +8,7 @@ isos = { 'url': 'https://releases.usody.com/2022/', }, "erease": { - 'iso': "USODY_14.0.0.iso", + 'iso': "USODY_14.2.0.iso", 'url': 'https://releases.usody.com/v14/', }, } From c9d23d5e6adb00af418ba905cb629672903f904d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 23 Feb 2023 17:14:21 +0100 Subject: [PATCH 4/7] benchamark to False in wbSettings template --- ereuse_devicehub/templates/workbench/wbSettings.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/templates/workbench/wbSettings.ini b/ereuse_devicehub/templates/workbench/wbSettings.ini index 213240c1..53bbc34d 100644 --- a/ereuse_devicehub/templates/workbench/wbSettings.ini +++ b/ereuse_devicehub/templates/workbench/wbSettings.ini @@ -7,7 +7,7 @@ DH_HOST = {{ api_host }} DH_DATABASE = {{ schema }} DEVICEHUB_URL = https://${DB_HOST}/${DB_DATABASE}/ -WB_BENCHMARK = True +WB_BENCHMARK = False WB_STRESS_TEST = 0 WB_SMART_TEST = short @@ -21,7 +21,7 @@ DH_HOST = {{ api_host }} DH_DATABASE = {{ schema }} DEVICEHUB_URL = https://${DB_HOST}/${DB_DATABASE}/ -WB_BENCHMARK = True +WB_BENCHMARK = False WB_STRESS_TEST = 0 WB_SMART_TEST = short From fb413671fcb04629ed8d498e4042d303ff5c66c8 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Sat, 25 Feb 2023 11:29:41 +0100 Subject: [PATCH 5/7] fix size of ram and data storage --- ereuse_devicehub/resources/device/models.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 566d7d85..d406d808 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -1047,16 +1047,18 @@ class Computer(Device): @property def ram_size(self) -> int: """The total of RAM memory the computer has.""" - return sum( - ram.size or 0 for ram in self.components if isinstance(ram, RamModule) - ) + components = self.components + if self.placeholder and self.placeholder.binding: + components = self.placeholder.binding.components + return sum(ram.size or 0 for ram in components if isinstance(ram, RamModule)) @property def data_storage_size(self) -> int: """The total of data storage the computer has.""" - return sum( - ds.size or 0 for ds in self.components if isinstance(ds, DataStorage) - ) + components = self.components + if self.placeholder and self.placeholder.binding: + components = self.placeholder.binding.components + return sum(ds.size or 0 for ds in components if isinstance(ds, DataStorage)) @property def processor_model(self) -> str: From ddcd1697e6adfa5d392dd70bbdf5a145f2ca032c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 14 Mar 2023 17:52:49 +0100 Subject: [PATCH 6/7] fix template --- ereuse_devicehub/templates/inventory/erasure.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/templates/inventory/erasure.html b/ereuse_devicehub/templates/inventory/erasure.html index 06ad6943..024e782e 100644 --- a/ereuse_devicehub/templates/inventory/erasure.html +++ b/ereuse_devicehub/templates/inventory/erasure.html @@ -288,10 +288,10 @@ {% for erasure in erasures %} - {{ erasure.device.serial_number.upper() }} + {{ erasure.device.serial_number and erasure.device.serial_number.upper() or '' }} - {{ erasure.parent.serial_number.upper() }} + {{ erasure.parent.serial_number and erasure.parent.serial_number.upper() or '' }} {{ erasure.get_public_name() }} From a27dc0914c80b0d1148bab8e16f305625305a8e8 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 15 Mar 2023 17:19:31 +0100 Subject: [PATCH 7/7] fix hide hid of erasure certificate --- ereuse_devicehub/static/css/devicehub.css | 10 ++++++++++ ereuse_devicehub/templates/inventory/erasure.html | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/static/css/devicehub.css b/ereuse_devicehub/static/css/devicehub.css index 46fae783..e82af14c 100644 --- a/ereuse_devicehub/static/css/devicehub.css +++ b/ereuse_devicehub/static/css/devicehub.css @@ -23,6 +23,16 @@ padding-top: 0px; padding-bottom: 5px; } +#ApplyDeviceLots { + color: #993365; + font-weight: bold; +} +#ApplyDeviceLots.disabled { + color: #adb5bd; + font-weight: normal; + pointer-events: none; + background-color: #fff; +} .help { color: #993365; } diff --git a/ereuse_devicehub/templates/inventory/erasure.html b/ereuse_devicehub/templates/inventory/erasure.html index 06ad6943..130ca3c1 100644 --- a/ereuse_devicehub/templates/inventory/erasure.html +++ b/ereuse_devicehub/templates/inventory/erasure.html @@ -320,14 +320,14 @@
Computer where was erase:
Title: {{ erasure.parent.__format__('ts') }}
DevicehubID: {{ erasure.parent.dhid }}
-
Hid: {{ erasure.parent.hid }}
+
Hid: {{ erasure.parent.chid }}
Tags: {{ erasure.parent.tags }}
{% if erasure.device.parent %}
Computer where it resides:
Title: {{ erasure.device.parent.__format__('ts') }}
DevicehubID: {{ erasure.device.parent.dhid }}
-
Hid: {{ erasure.device.parent.hid }}
+
Hid: {{ erasure.device.parent.chid }}
Tags: {{ erasure.device.parent.tags }}
{% endif %} {% endif %} @@ -344,6 +344,16 @@ {% endif %} + {% if erasure.device.proofs %} +
DLT Proofs:
+
+
    + {% for proof in erasure.device.proofs %} +
  1. {{ proof.type }}: {{ proof.timestamp }}
  2. + {% endfor %} +
+
+ {% endif %}
{% endfor %}