Browse Source

UI: lwm2m observe strategies minor updates.

pull/13279/head
deaflynx 1 year ago
committed by nickAS21
parent
commit
8ebf996565
  1. 10
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.html
  2. 2
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts

10
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.html

@ -20,6 +20,11 @@
<mat-tab label="{{ 'device-profile.lwm2m.model-tab' | translate }}">
<ng-template matTabContent>
<section [formGroup]="lwm2mDeviceProfileFormGroup">
<tb-profile-lwm2m-object-list
(addList)="addObjectsList($event)"
(removeList)="removeObjectsList($event)"
formControlName="objectIds">
</tb-profile-lwm2m-object-list>
<mat-form-field class="mat-block">
<mat-label translate>device-profile.lwm2m.observe-strategy.observe-strategy</mat-label>
<mat-select formControlName="observeStrategy">
@ -34,11 +39,6 @@
</mat-option>
</mat-select>
</mat-form-field>
<tb-profile-lwm2m-object-list
(addList)="addObjectsList($event)"
(removeList)="removeObjectsList($event)"
formControlName="objectIds">
</tb-profile-lwm2m-object-list>
<tb-profile-lwm2m-observe-attr-telemetry
formControlName="observeAttrTelemetry">
</tb-profile-lwm2m-observe-attr-telemetry>

2
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts

@ -439,7 +439,7 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
const telemetryArray: Array<string> = [];
const attributes: any = {};
const keyNameNew = {};
const observeStrategyValue = val.length ? this.lwm2mDeviceProfileFormGroup.get('observeStrategy')?.value : ObserveStrategy.SINGLE;
const observeStrategyValue = this.lwm2mDeviceProfileFormGroup.get('observeStrategy').value;
const observeJson: ObjectLwM2M[] = JSON.parse(JSON.stringify(val));
observeJson.forEach(obj => {
if (isDefinedAndNotNull(obj.attributes) && !isEmpty(obj.attributes)) {

Loading…
Cancel
Save