|
|
|
@ -122,11 +122,10 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control |
|
|
|
takeUntil(this.destroy$) |
|
|
|
).subscribe((value) => { |
|
|
|
if (value) { |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.get('deviceAttributesTopic').disable({emitEvent: false}); |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.get('deviceTelemetryTopic').disable({emitEvent: false}); |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.disable({emitEvent: false}); |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.get('sparkPlug').enable({emitEvent: false}); |
|
|
|
} else { |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.get('deviceAttributesTopic').enable({emitEvent: false}); |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.get('deviceTelemetryTopic').enable({emitEvent: false}); |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.enable({emitEvent: false}); |
|
|
|
} |
|
|
|
}); |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.valueChanges.pipe( |
|
|
|
@ -163,8 +162,10 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control |
|
|
|
writeValue(value: MqttDeviceProfileTransportConfiguration | null): void { |
|
|
|
if (isDefinedAndNotNull(value)) { |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.patchValue(value, {emitEvent: false}); |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.get('sparkPlug').updateValueAndValidity({onlySelf: true}); |
|
|
|
this.updateTransportPayloadBasedControls(value.transportPayloadTypeConfiguration?.transportPayloadType); |
|
|
|
if (!this.disabled) { |
|
|
|
this.mqttDeviceProfileTransportConfigurationFormGroup.get('sparkPlug').updateValueAndValidity({onlySelf: true}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|