Browse Source

Merge pull request #9407 from thingsboard/hotfix/3.6

Hotfix/3.6
pull/9318/head
Andrew Shvayka 3 years ago
committed by GitHub
parent
commit
acccbb7e53
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html
  2. 2
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts
  3. 1
      ui-ngx/src/assets/locale/locale.constant-en_US.json

3
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html

@ -586,6 +586,9 @@
<mat-error *ngIf="commandControl.get('command').hasError('required')">
{{ 'gateway.statistics.command-required' | translate }}
</mat-error>
<mat-error *ngIf="commandControl.get('command').hasError('pattern')">
{{ 'gateway.statistics.command-pattern' | translate }}
</mat-error>
<mat-icon matIconSuffix style="cursor:pointer;"
matTooltip="{{ 'gateway.hints.command' | translate }}">info_outlined
</mat-icon>

2
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts

@ -409,7 +409,7 @@ export class GatewayConfigurationComponent implements OnInit {
const commandsFormArray = this.commandFormArray();
const commandFormGroup = this.fb.group({
attributeOnGateway: [command.attributeOnGateway || null, [Validators.required, Validators.pattern(/^[^.\s]+$/)]],
command: [command.command || null, [Validators.required, Validators.pattern(/^[^.\s]+$/)]],
command: [command.command || null, [Validators.required, Validators.pattern(/^(?=\S).*\S$/)]],
timeout: [command.timeout || null, [Validators.required, Validators.min(1), Validators.pattern(/^-?[0-9]+$/), Validators.pattern(/^[^.\s]+$/)]],
});
commandsFormArray.push(commandFormGroup);

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

@ -2783,6 +2783,7 @@
"attribute-name-required": "Attribute name is required",
"command": "Command",
"command-required": "Command is required",
"command-pattern": "Command is not valid",
"remove": "Remove command"
},
"storage": "Storage",

Loading…
Cancel
Save