From 1480b30e8c1e370882c08e65f2109a1954d6bf55 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Wed, 2 Sep 2026 07:53:25 -0400 Subject: [PATCH] Let a person edit the asset fields the pages already display Eight fields across three asset types were shown on the detail page and accepted by the API, but had no input on the form. A wrong value therefore needed database access to correct, which is not a thing anybody should need for a device category or a maintenance date. The shape is the same in each case: a column was added, the detail card was written, the API allowlist was updated, and the form was missed. Nothing was broken - the values arrive by import or collector - so nothing complained. PCs gain azureobjectid and azuredevicecategory. azuredeviceid was already there, which is what made the omission easy to miss: the page showed two ids and the form offered one. The two are not interchangeable and the pairing is counterintuitive - the DEVICE id opens Intune, the OBJECT id opens Entra - so each input says where it goes. Machines gain the three maintenance fields. These matter beyond the immediate fix: they are the columns a measuring instrument's calibration dates map onto when metrology moves to machines, and until now there was no way to enter a calibration date on a machine at all. Printers gain iscolor, isduplex and isnetwork as a capability group. isnetwork defaults to true in the form to match the API's create default; a new printer claiming otherwise would be wrong for nearly all of them. Checked before making any of these editable that nothing writes them automatically - a hand edit silently reverted by the next collector poll would be worse than no input at all. The printers collector reports queues and supplies, not capabilities, and nothing writes machine maintenance dates, which is exactly why they are all empty. The two genuinely collector-owned computer fields, lastreporteddate and lastboottime, are deliberately still not editable. Scope: product --- plugins/computers/frontend/views/PCForm.vue | 37 ++++++++++++++- .../machines/frontend/views/MachineForm.vue | 47 +++++++++++++++++++ .../printers/frontend/views/PrinterForm.vue | 38 ++++++++++++++- 3 files changed, 120 insertions(+), 2 deletions(-) diff --git a/plugins/computers/frontend/views/PCForm.vue b/plugins/computers/frontend/views/PCForm.vue index 2b5e9b7f..0f3a0eb8 100644 --- a/plugins/computers/frontend/views/PCForm.vue +++ b/plugins/computers/frontend/views/PCForm.vue @@ -230,7 +230,36 @@ v-model="form.azuredeviceid" type="text" class="form-control" - placeholder="Entra/Azure deviceId GUID (set by Azure imports)" + placeholder="Entra deviceId GUID (set by the Azure import)" + /> + Opens the device in Intune from the PC page. + + + +
+ + + Opens the device in Entra from the PC page. +
+ +
+ +
@@ -395,6 +424,8 @@ const form = ref({ osid: '', loggedinuser: '', azuredeviceid: '', + azureobjectid: '', + azuredevicecategory: '', accessmethods: [], notes: '', mapx: null, @@ -529,6 +560,8 @@ onMounted(async () => { osid: ext.osid || '', loggedinuser: ext.loggedinuser || '', azuredeviceid: ext.azuredeviceid || '', + azureobjectid: ext.azureobjectid || '', + azuredevicecategory: ext.azuredevicecategory || '', accessmethods: (pc.accessmethods || []).map(a => ({ protocolid: a.protocolid, portoverride: a.portoverride ?? null @@ -605,6 +638,8 @@ async function savePC() { osid: form.value.osid || null, loggedinuser: form.value.loggedinuser || null, azuredeviceid: form.value.azuredeviceid || null, + azureobjectid: form.value.azureobjectid || null, + azuredevicecategory: form.value.azuredevicecategory || null, accessmethods: form.value.accessmethods, notes: form.value.notes || null, ipaddress: form.value.ipaddress || null, diff --git a/plugins/machines/frontend/views/MachineForm.vue b/plugins/machines/frontend/views/MachineForm.vue index 15e603e8..4f159a5c 100644 --- a/plugins/machines/frontend/views/MachineForm.vue +++ b/plugins/machines/frontend/views/MachineForm.vue @@ -336,6 +336,44 @@

Notes

+ +
+ + +
+ +
+ + + Set directly; it is not derived from the interval. +
+ +
+ + +
+