Merge pull request #9407 from thingsboard/hotfix/3.6

Hotfix/3.6
This commit is contained in:
Andrew Shvayka 2023-10-13 13:03:37 +03:00 committed by GitHub
commit acccbb7e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -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>

View File

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

View File

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