Browse Source

fix(iot-hub): reword the hint of the host set in Device connectivity

"Set by the system administrator in Device connectivity settings." reads as
"ask your administrator" on Cloud, where a tenant has no access to one. The
hint is now "Set by the platform. The device connects to this host." It
names the device, so it moves into HostFieldTransport (configuredHint) like
the other hints, and a gateway entry can say "the gateway".
feature/lts-4.2/iot-hub-devices
dpinkevych 1 month ago
parent
commit
a7e6355c63
  1. 5
      ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts
  2. 2
      ui-ngx/src/assets/locale/locale.constant-en_US.json

5
ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts

@ -100,6 +100,8 @@ interface HostFieldTransport {
loopbackHint: string;
// Review mode: the stored value is shown without its source
reviewHostHint: string;
// Host set in Device connectivity: the fields are read-only
configuredHint: string;
hostError: string;
portError: string;
helpPopupId: string;
@ -124,6 +126,7 @@ const HOST_FIELD_TRANSPORTS = new Map<string, HostFieldTransport>([
},
loopbackHint: 'iot-hub.device-install-mqtt-host-loopback-hint',
reviewHostHint: 'iot-hub.device-install-mqtt-host-hint',
configuredHint: 'iot-hub.device-install-mqtt-host-configured-hint',
hostError: 'iot-hub.device-install-transport-host-error',
portError: 'iot-hub.device-install-transport-port-error',
helpPopupId: 'iot-hub/device-connection-host',
@ -849,7 +852,7 @@ export class TbDeviceInstallDialogComponent extends DialogComponent<TbDeviceInst
}
let hostHint: string;
if (readOnly) {
hostHint = 'iot-hub.device-install-transport-configured-hint';
hostHint = transport.configuredHint;
} else if (this.reviewMode) {
hostHint = transport.reviewHostHint;
} else if (loopback) {

2
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -3929,8 +3929,8 @@
"device-install-mqtt-host-loopback-hint": "The MQTT host resolved to {{host}}, which on the device means the device itself. Enter an address the device can reach.",
"device-install-mqtt-host-base-url-loopback-hint": "Taken from the Base URL in General settings, which points to {{host}}. Enter an address the device can reach.",
"device-install-mqtt-host-opened-via-loopback-hint": "ThingsBoard is opened via {{host}}, so enter an address the device can reach.",
"device-install-mqtt-host-configured-hint": "Set by the platform. The device connects to this host.",
"device-install-mqtt-port": "MQTT port",
"device-install-transport-configured-hint": "Set by the system administrator in Device connectivity settings.",
"device-install-transport-host-error": "Enter a host name or IP address the device can reach (not localhost)",
"device-install-transport-port-error": "Enter a port from 1 to 65535",
"device-install-which-host": "Which host should I use?",

Loading…
Cancel
Save