diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.html index 1101565275..efa8e11019 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.html @@ -27,91 +27,97 @@
- {{ keyControl.get('tag').value }} + {{ keyControl.get('tag').value }}{{ '-' }}{{ keyControl.get('value').value }}
-
-
- gateway.key -
-
- - - +
gateway.platform-side
+
+
+ gateway.key +
+
+ + + - warning - - + class="tb-error"> + warning + + +
-
-
- gateway.type -
-
- - - {{ type }} - - +
+
gateway.connector-side
+
+
+ gateway.type +
+
+ + + {{ type }} + + +
-
-
-
gateway.function-code
-
- - - {{ ModbusFunctionCodeTranslationsMap.get(code) | translate }} - - +
+
gateway.function-code
+
+ + + {{ ModbusFunctionCodeTranslationsMap.get(code) | translate }} + + +
-
-
-
gateway.objects-count
-
- - - +
+
gateway.objects-count
+
+ + + +
-
-
-
gateway.address
-
- - - +
+
gateway.address
+
+ + + +
-
-
-
gateway.value
-
- - - +
gateway.value
+
+ + + - warning - - + class="tb-error"> + warning + + +
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.ts index a63b2e488e..81e275b07c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-data-keys-panel/modbus-data-keys-panel.component.ts @@ -18,6 +18,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { AbstractControl, FormGroup, UntypedFormArray, UntypedFormBuilder, Validators } from '@angular/forms'; import { TbPopoverComponent } from '@shared/components/popover.component'; import { + MappingKeysType, ModbusDataType, ModbusFunctionCodeTranslationsMap, ModbusObjectCountByDataType, @@ -71,7 +72,7 @@ export class ModbusDataKeysPanelComponent implements OnInit { ngOnInit(): void { this.keysListFormArray = this.prepareKeysFormArray(this.values); - this.withFunctionCode = !this.isMaster || (this.keysType !== ModbusValueKey.ATTRIBUTES && this.keysType !== ModbusValueKey.TELEMENTRY); + this.withFunctionCode = !this.isMaster || (this.keysType !== ModbusValueKey.ATTRIBUTES && this.keysType !== ModbusValueKey.TIMESERIES); this.defaultFunctionCodes = this.getDefaultFunctionCodes(); } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.html index bfc45325e4..5587cd09ee 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.html @@ -109,18 +109,36 @@
-
gateway.device-name
+
gateway.device-name
+ + warning +
-
gateway.device-profile
+
gateway.device-profile
+ + warning +
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.ts index 903e449d86..4211b2b09c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-config/modbus-slave-config.component.ts @@ -106,8 +106,8 @@ export class ModbusSlaveConfigComponent implements ControlValueAccessor, Validat method: [ModbusMethodType.SOCKET, []], unitId: [null, []], baudrate: [null, []], - deviceName: ['', [Validators.pattern(noLeadTrailSpacesRegex)]], - deviceType: ['', [Validators.pattern(noLeadTrailSpacesRegex)]], + deviceName: ['', [Validators.required, Validators.pattern(noLeadTrailSpacesRegex)]], + deviceType: ['', [Validators.required, Validators.pattern(noLeadTrailSpacesRegex)]], pollPeriod: [null, []], sendDataToThingsBoard: [false, []], byteOrder:[ModbusOrderType.BIG, []], diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.html index 80d5d6115b..95e7700886 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.html @@ -180,18 +180,36 @@
-
gateway.device-name
+
gateway.device-name
+ + warning +
-
gateway.device-profile
+
gateway.device-profile
+ + warning +
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts index 3f12692dcb..991c71c16b 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts @@ -114,7 +114,7 @@ export class ModbusSlaveDialogComponent extends DialogComponent
-
gateway.telementry
+
gateway.timeseries
- - + + {{ telemetry.tag }} @@ -68,7 +68,7 @@ mat-icon-button color="primary" #telemetryButton - (click)="manageKeys($event, telemetryButton, ModbusValueKey.TELEMENTRY, register)"> + (click)="manageKeys($event, telemetryButton, ModbusValueKey.TIMESERIES, register)"> edit
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 865f819315..42a58b784e 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 @@ -844,7 +844,7 @@ export const ModbusFieldsTranslationsMap = new Map( export enum ModbusValueKey { ATTRIBUTES = 'attributes', - TELEMENTRY = 'timeseries', + TIMESERIES = 'timeseries', ATTRIBUTES_UPDATES = 'attributeUpdates', RPC_REQUESTS = 'rpc', } @@ -852,7 +852,7 @@ export enum ModbusValueKey { export const ModbusKeysPanelTitleTranslationsMap = new Map( [ [ModbusValueKey.ATTRIBUTES, 'gateway.attributes'], - [ModbusValueKey.TELEMENTRY, 'gateway.telementry'], + [ModbusValueKey.TIMESERIES, 'gateway.timeseries'], [ModbusValueKey.ATTRIBUTES_UPDATES, 'gateway.attribute-updates'], [ModbusValueKey.RPC_REQUESTS, 'gateway.rpc-requests'] ] @@ -861,7 +861,7 @@ export const ModbusKeysPanelTitleTranslationsMap = new Map( [ [ModbusValueKey.ATTRIBUTES, 'gateway.add-attribute'], - [ModbusValueKey.TELEMENTRY, 'gateway.add-telementry'], + [ModbusValueKey.TIMESERIES, 'gateway.add-timeseries'], [ModbusValueKey.ATTRIBUTES_UPDATES, 'gateway.add-attribute-update'], [ModbusValueKey.RPC_REQUESTS, 'gateway.add-rpc-request'] ] @@ -870,7 +870,7 @@ export const ModbusKeysAddKeyTranslationsMap = new Map( export const ModbusKeysDeleteKeyTranslationsMap = new Map( [ [ModbusValueKey.ATTRIBUTES, 'gateway.delete-attribute'], - [ModbusValueKey.TELEMENTRY, 'gateway.delete-telementry'], + [ModbusValueKey.TIMESERIES, 'gateway.delete-timeseries'], [ModbusValueKey.ATTRIBUTES_UPDATES, 'gateway.delete-attribute-update'], [ModbusValueKey.RPC_REQUESTS, 'gateway.delete-rpc-requests'] ] @@ -879,7 +879,7 @@ export const ModbusKeysDeleteKeyTranslationsMap = new Map( [ [ModbusValueKey.ATTRIBUTES, 'gateway.no-attributes'], - [ModbusValueKey.TELEMENTRY, 'gateway.no-telementry'], + [ModbusValueKey.TIMESERIES, 'gateway.no-timeseries'], [ModbusValueKey.ATTRIBUTES_UPDATES, 'gateway.no-attribute-updates'], [ModbusValueKey.RPC_REQUESTS, 'gateway.no-rpc-requests'] ] 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 2b89fd45ee..0475c771e6 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -2761,7 +2761,6 @@ "add-attribute-update": "Add attribute update", "add-key": "Add key", "add-timeseries": "Add time series", - "add-telementry": "Add telementry", "add-mapping": "Add mapping", "add-slave": "Add Slave", "arguments": "Arguments", @@ -2892,13 +2891,14 @@ "delete-attribute": "Delete attribute", "delete-key": "Delete key", "delete-timeseries": "Delete time series", - "delete-telementry": "Delete telementry", "default": "Default", "device-node": "Device node", "device-node-required": "Device node required.", "device-node-hint": "Path or identifier for device node on OPC UA server. Relative paths from it for attributes and time series can be used.", "device-name": "Device name", "device-profile": "Device profile", + "device-name-required": "Device name required", + "device-profile-required": "Device profile required", "download-tip": "Download configuration file", "drop-file": "Drop file here or", "enable-subscription": "Enable subscription", @@ -3008,7 +3008,6 @@ "no-gateway-found": "No gateway found.", "no-gateway-matching": " '{{item}}' not found.", "no-timeseries": "No time series", - "no-telementry": "No telementry", "no-keys": "No keys", "no-value": "No arguments", "no-rpc-methods": "No RPC methods", @@ -3265,7 +3264,6 @@ "thingsboard": "ThingsBoard", "general": "General", "timeseries": "Time series", - "telementry": "Telementry", "key": "Key", "keys": "Keys", "key-required": "Key is required.",