Browse Source

loglevel

pull/8337/head
Maksym Dudnik 3 years ago
parent
commit
286ea1686b
  1. 4
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts
  2. 2
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html
  3. 6
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts
  4. 2
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-logs.component.ts
  5. 2
      ui-ngx/src/assets/locale/locale.constant-en_US.json

4
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);

2
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html

@ -142,7 +142,7 @@
</mat-form-field>
<mat-form-field class="mat-block tb-value-type">
<mat-label translate>gateway.remote-logging-level</mat-label>
<mat-select formControlName="log_level">
<mat-select formControlName="logLevel">
<mat-option *ngFor="let logLevel of gatewayLogLevel" [value]="logLevel">{{logLevel}}</mat-option>
</mat-select>
</mat-form-field>

6
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: '',

2
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;
}

2
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",

Loading…
Cancel
Save