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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html
-
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts
-
ui-ngx/src/assets/locale/locale.constant-en_US.json
|
|
|
@ -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> |
|
|
|
|
|
|
|
@ -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); |
|
|
|
|
|
|
|
@ -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", |
|
|
|
|