changed scan period back to milliseconds
This commit is contained in:
parent
840751b3ca
commit
006e12fd09
@ -69,15 +69,15 @@
|
||||
</div>
|
||||
<div class="tb-flex no-gap">
|
||||
<mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
|
||||
<input matInput type="number" min="1" name="value"
|
||||
formControlName="scanPeriodInSec" placeholder="{{ 'gateway.set' | translate }}"/>
|
||||
<input matInput type="number" min="1000" name="value"
|
||||
formControlName="scanPeriodInMillis" placeholder="{{ 'gateway.set' | translate }}"/>
|
||||
<mat-icon matSuffix
|
||||
matTooltipPosition="above"
|
||||
matTooltipClass="tb-error-tooltip"
|
||||
[matTooltip]="'gateway.scan-period-error' | translate: {min: 1}"
|
||||
*ngIf="(serverConfigFormGroup.get('scanPeriodInSec').hasError('required') ||
|
||||
serverConfigFormGroup.get('scanPeriodInSec').hasError('min')) &&
|
||||
serverConfigFormGroup.get('scanPeriodInSec').touched"
|
||||
[matTooltip]="'gateway.scan-period-error' | translate: {min: 1000}"
|
||||
*ngIf="(serverConfigFormGroup.get('scanPeriodInMillis').hasError('required') ||
|
||||
serverConfigFormGroup.get('scanPeriodInMillis').hasError('min')) &&
|
||||
serverConfigFormGroup.get('scanPeriodInMillis').touched"
|
||||
class="tb-error">
|
||||
warning
|
||||
</mat-icon>
|
||||
|
||||
@ -39,6 +39,7 @@ import { TruncateWithTooltipDirective } from '@shared/directives/truncate-with-t
|
||||
import {
|
||||
SecurityConfigComponent
|
||||
} from '@home/components/widget/lib/gateway/connectors-configuration/security-config/security-config.component';
|
||||
import { HOUR } from '@shared/models/time/time.models';
|
||||
|
||||
@Component({
|
||||
selector: 'tb-opc-server-config',
|
||||
@ -80,7 +81,7 @@ export class OpcServerConfigComponent implements ControlValueAccessor, Validator
|
||||
name: ['', []],
|
||||
url: ['', [Validators.required, Validators.pattern(noLeadTrailSpacesRegex)]],
|
||||
timeoutInMillis: [1000, [Validators.required, Validators.min(1000)]],
|
||||
scanPeriodInSec: [3600, [Validators.required, Validators.min(1)]],
|
||||
scanPeriodInMillis: [HOUR, [Validators.required, Validators.min(1000)]],
|
||||
pollPeriodInMillis: [5000, [Validators.required, Validators.min(50)]],
|
||||
enableSubscriptions: [true, []],
|
||||
subCheckPeriodInMillis: [100, [Validators.required, Validators.min(100)]],
|
||||
@ -119,7 +120,7 @@ export class OpcServerConfigComponent implements ControlValueAccessor, Validator
|
||||
writeValue(serverConfig: ServerConfig): void {
|
||||
const {
|
||||
timeoutInMillis = 1000,
|
||||
scanPeriodInSec = 3600,
|
||||
scanPeriodInMillis = HOUR,
|
||||
pollPeriodInMillis = 5000,
|
||||
enableSubscriptions = true,
|
||||
subCheckPeriodInMillis = 100,
|
||||
@ -131,7 +132,7 @@ export class OpcServerConfigComponent implements ControlValueAccessor, Validator
|
||||
this.serverConfigFormGroup.reset({
|
||||
...serverConfig,
|
||||
timeoutInMillis,
|
||||
scanPeriodInSec,
|
||||
scanPeriodInMillis,
|
||||
pollPeriodInMillis,
|
||||
enableSubscriptions,
|
||||
subCheckPeriodInMillis,
|
||||
|
||||
@ -150,7 +150,7 @@ export interface ServerConfig {
|
||||
name: string;
|
||||
url: string;
|
||||
timeoutInMillis: number;
|
||||
scanPeriodInSec: number;
|
||||
scanPeriodInMillis: number;
|
||||
pollPeriodInMillis: number;
|
||||
enableSubscriptions: boolean;
|
||||
subCheckPeriodInMillis: number;
|
||||
|
||||
@ -3178,8 +3178,8 @@
|
||||
"without-response": "Without response",
|
||||
"other": "Other",
|
||||
"save-tip": "Save configuration file",
|
||||
"scan-period": "Scan period (s)",
|
||||
"scan-period-error": "Scan period should be at least {{min}} (s).",
|
||||
"scan-period": "Scan period (ms)",
|
||||
"scan-period-error": "Scan period should be at least {{min}} (ms).",
|
||||
"sub-check-period": "Subscription check period (ms)",
|
||||
"sub-check-period-error": "Subscription check period should be at least {{min}} (ms).",
|
||||
"security": "Security",
|
||||
@ -3389,9 +3389,9 @@
|
||||
"file": "Your data will be stored in separated files and will be saved even after the gateway restart.",
|
||||
"sqlite": "Your data will be stored in file based database. And will be saved even after the gateway restart.",
|
||||
"opc-timeout": "Timeout in milliseconds for connecting to OPC-UA server.",
|
||||
"scan-period": "Period in seconds to rescan the server.",
|
||||
"scan-period": "Period in milliseconds to rescan the server.",
|
||||
"sub-check-period": "Period to check the subscriptions in the OPC-UA server.",
|
||||
"enable-subscription": "If true - the gateway will subscribe to interesting nodes and wait for data update and if false - the gateway will rescan OPC-UA server every scanPeriodInSec.",
|
||||
"enable-subscription": "If true - the gateway will subscribe to interesting nodes and wait for data update and if false - the gateway will rescan OPC-UA server every scanPeriodInMillis.",
|
||||
"show-map": "Show nodes on scanning.",
|
||||
"method-name": "Name of method on OPC-UA server.",
|
||||
"arguments": "Arguments for the method (will be overwritten by arguments from the RPC request).",
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
"name": "OPC-UA Default Server",
|
||||
"url": "localhost:4840/freeopcua/server/",
|
||||
"timeoutInMillis": 5000,
|
||||
"scanPeriodInMillis": 5000,
|
||||
"scanPeriodInMillis": 3600000,
|
||||
"pollPeriodInMillis": 5000,
|
||||
"enableSubscriptions": true,
|
||||
"subCheckPeriodInMillis": 100,
|
||||
"showMap": false,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"name": "OPC-UA Default Server",
|
||||
"url": "localhost:4840/freeopcua/server/",
|
||||
"timeoutInMillis": 5000,
|
||||
"scanPeriodInSec": 3600,
|
||||
"scanPeriodInMillis": 3600000,
|
||||
"pollPeriodInMillis": 5000,
|
||||
"disableSubscriptions": false,
|
||||
"subCheckPeriodInMillis": 100,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user