UI: lwm2m observe strategies minor updates.

This commit is contained in:
deaflynx 2025-04-30 17:38:21 +03:00
parent 64bd969bee
commit be323e3c20
2 changed files with 6 additions and 6 deletions

View File

@ -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>

View File

@ -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)) {