From 4382c0c4b872986e830257b33cf9040f2fca63b9 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Fri, 29 Jan 2021 09:05:53 +0200 Subject: [PATCH] Lwm2m: front: fix bug2 updateObserve...ToJson --- ...-profile-transport-configuration.component.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts index 5277c791cc..2aa835d6d7 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts @@ -269,18 +269,18 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro obj.instances.forEach(instance => { if (instance.hasOwnProperty(RESOURCES) && Array.isArray(instance.resources)) { instance.resources.forEach(resource => { - let pathRes = `/${obj.id}/${instance.id}/${resource.id}`; - if (resource.attribute) { - attributeArray.push(pathRes); - } - if (resource.telemetry) { - telemetryArray.push(pathRes); - } if (resource.attribute || resource.telemetry) { - keyNameNew[pathRes] = resource.keyName; + let pathRes = `/${obj.id}/${instance.id}/${resource.id}`; if (resource.observe) { observeArray.push(pathRes); } + if (resource.attribute) { + attributeArray.push(pathRes); + } + if (resource.telemetry) { + telemetryArray.push(pathRes); + } + keyNameNew[pathRes] = resource.keyName; } }) }