From 31a1af58142c355c0f666f757fdc6e522de80351 Mon Sep 17 00:00:00 2001 From: Sergey Tarnavskiy Date: Fri, 19 Nov 2021 15:18:42 +0200 Subject: [PATCH] Fixed bug with missing required credential-config for LwM2M device-profiles. --- .../components/wizard/device-wizard-dialog.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts index fdbc25107f..b40130719a 100644 --- a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts @@ -252,6 +252,14 @@ export class DeviceWizardDialogComponent extends private deviceProfileTransportTypeChanged(deviceTransportType: DeviceTransportType): void { this.transportConfigFormGroup.patchValue( {transportConfiguration: createDeviceProfileTransportConfiguration(deviceTransportType)}); + const setCredentialBox = this.credentialsFormGroup.get('setCredential'); + if (deviceTransportType === DeviceTransportType.LWM2M) { + setCredentialBox.patchValue(true); + setCredentialBox.disable(); + } else { + setCredentialBox.patchValue(false); + setCredentialBox.enable(); + } } add(): void {