From bb58609601ef63c5470606b97077e4bcb83b290b Mon Sep 17 00:00:00 2001 From: Serhii Titenko Date: Fri, 27 Nov 2026 17:16:19 +0200 Subject: [PATCH] Fixed downlink fields staying required in the Add integration wizard after choosing Skip (#16795) * Showed Azure Event Hub IoT Hub name only with a downlink converter The IoT Hub name field is used only to send cloud-to-device messages, so the form shows it only when the integration has a downlink converter. The add-integration wizard counted a converter chosen under "Select existing" even after switching to "Skip", and did not count "Library"; it now uses only the current choice, which also fixes the downlink fields of UDP, TCP, KPN, ChirpStack and Azure Service Bus. Required-field messages on the form now read as full sentences. * Moved downlink converter check in the wizard to a getter The add-integration wizard now decides whether a downlink converter is set in isDownlinkConverterSet, next to createDownlinkConverter(). --- ...-event-hub-integration-form.component.html | 20 ++++++++++--------- .../integration-wizard-dialog.component.html | 2 +- .../integration-wizard-dialog.component.ts | 11 ++++++++++ .../assets/locale/locale.constant-en_US.json | 10 +++++----- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/integration/configuration/azure-event-hub-integration-form/azure-event-hub-integration-form.component.html b/ui-ngx/src/app/modules/home/components/integration/configuration/azure-event-hub-integration-form/azure-event-hub-integration-form.component.html index 1bcad7d9c1..bd66080687 100644 --- a/ui-ngx/src/app/modules/home/components/integration/configuration/azure-event-hub-integration-form/azure-event-hub-integration-form.component.html +++ b/ui-ngx/src/app/modules/home/components/integration/configuration/azure-event-hub-integration-form/azure-event-hub-integration-form.component.html @@ -12,15 +12,17 @@ label="{{ 'integration.connection-string' | translate }}" requiredText="{{ 'integration.connection-string-required' | translate }}"> - - integration.iot-hub-name - - @if (azureEventHubIntegrationConfigForm.get('iotHubName').hasError('required')) { - - integration.event-iot-hub-name-required - - } - + @if (isSetDownLink) { + + integration.iot-hub-name + + @if (azureEventHubIntegrationConfigForm.get('iotHubName').hasError('required')) { + + integration.event-iot-hub-name-required + + } + + } diff --git a/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.html b/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.html index c3047766af..c210b855ff 100644 --- a/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.html @@ -163,7 +163,7 @@ [genericAdditionalInfoTemplate]="genericAdditionalInfo" [executeRemotelyTemplate]="executeRemotely" [integrationType]="integrationWizardForm.get('type').value" - [isSetDownlink]="!!downlinkConverterForm.get('downlinkConverterId').value || downlinkConverterForm.get('converterType').value === 'new'" + [isSetDownlink]="isDownlinkConverterSet" [isEdgeTemplate]="isEdgeTemplate" > diff --git a/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.ts b/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.ts index fc73da1626..bd1e829cdf 100644 --- a/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/wizard/integration-wizard-dialog.component.ts @@ -283,6 +283,17 @@ export class IntegrationWizardDialogComponent extends } } + get isDownlinkConverterSet(): boolean { + switch (this.downlinkConverterForm.get('converterType').value) { + case ConverterSourceType.EXISTING: + return !!this.downlinkConverterForm.get('downlinkConverterId').value; + case ConverterSourceType.SKIP: + return false; + default: + return true; + } + } + private createDownlinkConverter(): Observable { const converterType = this.downlinkConverterForm.get('converterType').value; if (converterType === ConverterSourceType.SKIP) { diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 03f4ec89ad..514adbfc90 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -5683,21 +5683,21 @@ "service-bus-namespace-name-required": "Service Bus Namespace Name is required.", "connection-string": "Connection string", "consumer-group": "Consumer group", - "connection-string-required": "Connection string required!", + "connection-string-required": "Connection string is required.", "event-hub-name": "Event Hub Name", "event-hub-name-required": "Event Hub Name is required.", - "event-iot-hub-name-required": "Iot Hub Name is required for downlink", + "event-iot-hub-name-required": "IoT Hub name is required.", "enable-persistent-checkpoints": "Enable persistent checkpoints", "enable-persistent-checkpoints-hint": "Enable Azure Blob Storage to resume processing from the last checkpoint after a restart. Disable to always start from the latest event.", "storage-connection-string": "Storage connection string", - "storage-connection-string-required": "Storage connection string is required!", + "storage-connection-string-required": "Storage connection string is required.", "container-name": "Container name", - "container-name-required": "Container name is required", + "container-name-required": "Container name is required.", "sas-key-name": "SAS Key Name", "sas-key-name-required": "SAS Key Name is required.", "sas-key": "SAS Key", "sas-key-required": "SAS Key is required.", - "iot-hub-name": "IoT Hub Name", + "iot-hub-name": "IoT Hub name", "hostname": "Hostname", "hostname-required": "Hostname is required", "integration-clazz": "Integration class",