diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts index 99e3b07df3..1a875836f1 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts @@ -393,10 +393,12 @@ export class GatewayConfigurationComponent implements OnInit { checkAndFetchCredentials(security): void { if (security.type !== SecurityTypes.TLS_PRIVATE_KEY) { this.deviceService.getDeviceCredentials(this.device.id).subscribe(credentials => { - if (credentials.credentialsType === DeviceCredentialsType.ACCESS_TOKEN || security.type !== SecurityTypes.TLS_ACCESS_TOKEN) { + if (credentials.credentialsType === DeviceCredentialsType.ACCESS_TOKEN || security.type === SecurityTypes.TLS_ACCESS_TOKEN) { + this.gatewayConfigGroup.get('thingsboard.security.type').setValue(SecurityTypes.ACCESS_TOKEN); this.gatewayConfigGroup.get('thingsboard.security.accessToken').setValue(credentials.credentialsId); } else if (credentials.credentialsType === DeviceCredentialsType.MQTT_BASIC) { const parsedValue = JSON.parse(credentials.credentialsValue); + this.gatewayConfigGroup.get('thingsboard.security.type').setValue(SecurityTypes.USERNAME_PASSWORD); this.gatewayConfigGroup.get('thingsboard.security.clientId').setValue(parsedValue.clientId); this.gatewayConfigGroup.get('thingsboard.security.username').setValue(parsedValue.userName); this.gatewayConfigGroup.get('thingsboard.security.password').setValue(parsedValue.password); diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html index fc34957de6..28538ad5df 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html @@ -142,7 +142,7 @@ gateway.remote-logging-level - + {{logLevel}} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts index 6483535c44..be91184ff0 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts @@ -47,7 +47,7 @@ export interface gatewayConnector { type: string; configuration?: string; configurationJson: string; - log_level: string; + logLevel: string; key?: string; } @@ -138,7 +138,7 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie this.connectorForm = this.fb.group({ name: ['', [Validators.required]], type: ['', [Validators.required]], - log_level: ['', [Validators.required]], + logLevel: ['', [Validators.required]], key: ['auto'], class: [''], configuration: [''], @@ -265,7 +265,7 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie this.connectorForm.setValue({ name: '', type: 'mqtt', - log_level: GatewayLogLevel.info, + logLevel: GatewayLogLevel.info, key: 'auto', class: '', configuration: '', diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-logs.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-logs.component.ts index 5f031bf5c3..df83c11367 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-logs.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-logs.component.ts @@ -41,7 +41,7 @@ export interface GatewayConnector { type: string; configuration?: string; configurationJson: string; - log_level: string; + logLevel: string; key?: string; } 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 b53a6ecd0c..6856f6cb3e 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -2727,7 +2727,7 @@ "send-period-required": "Statistic send period is required", "send-period-min": "Statistic send period can not be less then 60", "send-period-pattern": "Statistic send period is not valid", - "check-connectors-configuration": "Check connectors configuration (in ms)", + "check-connectors-configuration": "Check connectors configuration (in s)", "check-connectors-configuration-required": "Check connectors configuration is required", "check-connectors-configuration-min": "Check connectors configuration can not be less then 1", "check-connectors-configuration-pattern": "Check connectors configuration is not valid",