Browse Source

Lwm2m: front: fix bug2 updateObserve...ToJson

pull/4021/head
nickAS21 6 years ago
parent
commit
4382c0c4b8
  1. 16
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts

16
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 => { obj.instances.forEach(instance => {
if (instance.hasOwnProperty(RESOURCES) && Array.isArray(instance.resources)) { if (instance.hasOwnProperty(RESOURCES) && Array.isArray(instance.resources)) {
instance.resources.forEach(resource => { 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) { if (resource.attribute || resource.telemetry) {
keyNameNew[pathRes] = resource.keyName; let pathRes = `/${obj.id}/${instance.id}/${resource.id}`;
if (resource.observe) { if (resource.observe) {
observeArray.push(pathRes); observeArray.push(pathRes);
} }
if (resource.attribute) {
attributeArray.push(pathRes);
}
if (resource.telemetry) {
telemetryArray.push(pathRes);
}
keyNameNew[pathRes] = resource.keyName;
} }
}) })
} }

Loading…
Cancel
Save