Browse Source

fix more typos

pull/3740/head
ShvaykaD 6 years ago
parent
commit
0ff8d4e7a4
  1. 7
      ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts

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

@ -87,12 +87,12 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control
configuration: this.fb.group({
deviceAttributesTopic: [null, [Validators.required, this.validationMQTTTopic()]],
deviceTelemetryTopic: [null, [Validators.required, this.validationMQTTTopic()]],
transportPayloadType: [MqttTransportPayloadType.JSON, Validators.required],
transportPayloadType: [MqttTransportPayloadType.JSON, Validators.required]
})
});
let configurationFormGroup = this.mqttDeviceProfileTransportConfigurationFormGroup.controls.configuration as FormGroup;
configurationFormGroup.get('transportPayloadType').valueChanges.subscribe(payloadType => {
this.updateTransportPayloadBasedControls(payloadType, configurationFormGroup)
this.updateTransportPayloadBasedControls(payloadType, configurationFormGroup);
this.mqttDeviceProfileTransportConfigurationFormGroup.updateValueAndValidity();
});
this.mqttDeviceProfileTransportConfigurationFormGroup.valueChanges.subscribe(() => {
@ -117,8 +117,7 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control
writeValue(value: MqttDeviceProfileTransportConfiguration | null): void {
if (isDefinedAndNotNull(value)) {
let configurationFormGroup = this.mqttDeviceProfileTransportConfigurationFormGroup.controls.configuration as FormGroup;
let type = value.transportPayloadType;
this.updateTransportPayloadBasedControls(type, configurationFormGroup);
this.updateTransportPayloadBasedControls(value.transportPayloadType, configurationFormGroup);
this.mqttDeviceProfileTransportConfigurationFormGroup.patchValue({configuration: value}, {emitEvent: false});
}
}

Loading…
Cancel
Save