Browse Source
Merge pull request #5588 from Terny22/develop/3.3.3
[3.3.3] UI: Bugs fixing for LwM2M transport
pull/5611/head
Andrew Shvayka
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
-
ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts
|
|
|
@ -14,7 +14,7 @@ |
|
|
|
/// limitations under the License.
|
|
|
|
///
|
|
|
|
|
|
|
|
import { Component, forwardRef, Input, OnDestroy } from '@angular/core'; |
|
|
|
import { ChangeDetectorRef, Component, forwardRef, Input, OnDestroy } from '@angular/core'; |
|
|
|
import { |
|
|
|
ControlValueAccessor, |
|
|
|
FormBuilder, |
|
|
|
@ -95,6 +95,7 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro |
|
|
|
} |
|
|
|
|
|
|
|
constructor(private fb: FormBuilder, |
|
|
|
private cd: ChangeDetectorRef, |
|
|
|
private deviceProfileService: DeviceProfileService) { |
|
|
|
this.lwm2mDeviceProfileFormGroup = this.fb.group({ |
|
|
|
objectIds: [null], |
|
|
|
@ -236,6 +237,7 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro |
|
|
|
this.lwm2mDeviceProfileFormGroup.get('clientLwM2mSettings.fwUpdateStrategy').updateValueAndValidity({onlySelf: true}); |
|
|
|
this.lwm2mDeviceProfileFormGroup.get('clientLwM2mSettings.swUpdateStrategy').updateValueAndValidity({onlySelf: true}); |
|
|
|
} |
|
|
|
this.cd.markForCheck(); |
|
|
|
} |
|
|
|
|
|
|
|
private updateModel = (): void => { |
|
|
|
|
|
|
|
@ -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 { |
|
|
|
|