diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.html index 057a4d1882..584679fa2c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.html @@ -69,15 +69,15 @@
- + warning diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.ts index 46e7fd0c9c..083d79ccb7 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/opc-server-config/opc-server-config.component.ts @@ -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, diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts index 0ad4975a4b..2dde0b8f54 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts @@ -150,7 +150,7 @@ export interface ServerConfig { name: string; url: string; timeoutInMillis: number; - scanPeriodInSec: number; + scanPeriodInMillis: number; pollPeriodInMillis: number; enableSubscriptions: boolean; subCheckPeriodInMillis: number; diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index ba4f031d14..6eeaad774e 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -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).", diff --git a/ui-ngx/src/assets/metadata/connector-default-configs/opcua.json b/ui-ngx/src/assets/metadata/connector-default-configs/opcua.json index 97621deda8..e9351b23f6 100644 --- a/ui-ngx/src/assets/metadata/connector-default-configs/opcua.json +++ b/ui-ngx/src/assets/metadata/connector-default-configs/opcua.json @@ -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, diff --git a/ui-ngx/src/assets/metadata/connector-default-configs/opcua_asyncio.json b/ui-ngx/src/assets/metadata/connector-default-configs/opcua_asyncio.json index 453f23735d..65fb6c5145 100644 --- a/ui-ngx/src/assets/metadata/connector-default-configs/opcua_asyncio.json +++ b/ui-ngx/src/assets/metadata/connector-default-configs/opcua_asyncio.json @@ -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,