diff --git a/application/src/main/data/json/demo/dashboards/gateway_list.json b/application/src/main/data/json/demo/dashboards/gateway_list.json index 3d8ba1f118..22ce99e40e 100644 --- a/application/src/main/data/json/demo/dashboards/gateway_list.json +++ b/application/src/main/data/json/demo/dashboards/gateway_list.json @@ -1326,7 +1326,7 @@ "decimals": null, "funcBody": null, "usePostProcessing": true, - "postFuncBody": "if (value.includes(\"RPC\")) {\n let parsedValue = value.match(/\\|(\\w+)\\|/);\n parsedValue = parsedValue ? parsedValue[1] :\n parsedValue;\n return parsedValue || value;\n} else return '';" + "postFuncBody": "if (value.includes(\"RPC\")&&!value.includes(\"GRPC\")) {\n let parsedValue = value.match(/\\|(\\w+)\\|/);\n parsedValue = parsedValue ? parsedValue[1] :\n parsedValue;\n return parsedValue || value;\n} else return '';" }, { "name": "SERVICE_LOGS", @@ -1654,7 +1654,7 @@ "decimals": null, "funcBody": null, "usePostProcessing": true, - "postFuncBody": "if (value.includes(\"RPC\")) {\n let parsedValue = value.match(/\\|(\\w+)\\|/);\n parsedValue = parsedValue ? parsedValue[1] :\n parsedValue;\n return parsedValue || value;\n} else return '';" + "postFuncBody": "if (value.includes(\"RPC\")&&!value.includes(\"GRPC\")) {\n let parsedValue = value.match(/\\|(\\w+)\\|/);\n parsedValue = parsedValue ? parsedValue[1] :\n parsedValue;\n return parsedValue || value;\n} else return '';" }, { "name": "SERVICE_LOGS", diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html index 4fd39528ae..134bb5b5f8 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html @@ -481,10 +481,18 @@ {{ 'gateway.permit-without-calls' | translate }} + info + gateway.server-port + info_outlined + {{'gateway.thingsboard-port-required' | translate }} @@ -501,6 +509,10 @@ gateway.grpc-keep-alive-timeout + info_outlined + {{'gateway.grpc-keep-alive-timeout-required' | translate }} @@ -514,6 +526,10 @@ gateway.grpc-keep-alive + info_outlined + {{'gateway.grpc-keep-alive-required' | translate }} @@ -527,6 +543,10 @@ gateway.grpc-min-time-between-pings + info_outlined + {{'gateway.grpc-min-time-between-pings-required' | translate }} @@ -540,6 +560,10 @@ gateway.grpc-max-pings-without-data + info_outlined + {{'gateway.grpc-max-pings-without-data-required' | translate }} @@ -553,6 +577,10 @@ gateway.grpc-min-ping-interval-without-data + info_outlined + {{'gateway.grpc-min-ping-interval-without-data-required' | translate }} @@ -576,7 +604,7 @@ gateway.statistics.send-period - + {{'gateway.statistics.send-period-required' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts index 6966fa7f52..99e3b07df3 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts @@ -155,7 +155,7 @@ export class GatewayConfigurationComponent implements OnInit { checkConnectorsConfigurationInSeconds: [60, [Validators.required, Validators.min(1), Validators.pattern(/^-?[0-9]+$/)]], statistics: this.fb.group({ enable: [true, []], - statsSendPeriodInSeconds: [3600, [Validators.required, Validators.min(1), Validators.pattern(/^-?[0-9]+$/)]], + statsSendPeriodInSeconds: [3600, [Validators.required, Validators.min(60), Validators.pattern(/^-?[0-9]+$/)]], commands: this.fb.array([], []) }), maxPayloadSizeBytes: [1024, [Validators.required, Validators.min(1), Validators.pattern(/^-?[0-9]+$/)]], @@ -434,6 +434,7 @@ export class GatewayConfigurationComponent implements OnInit { grpcGroup.get('serverPort').enable(); grpcGroup.get('keepAliveTimeMs').enable(); grpcGroup.get('keepAliveTimeoutMs').enable(); + grpcGroup.get('keepalivePermitWithoutCalls').enable(); grpcGroup.get('maxPingsWithoutData').enable(); grpcGroup.get('minTimeBetweenPingsMs').enable(); grpcGroup.get('minPingIntervalWithoutDataMs').enable(); @@ -441,6 +442,7 @@ export class GatewayConfigurationComponent implements OnInit { grpcGroup.get('serverPort').disable(); grpcGroup.get('keepAliveTimeMs').disable(); grpcGroup.get('keepAliveTimeoutMs').disable(); + grpcGroup.get('keepalivePermitWithoutCalls').disable(); grpcGroup.get('maxPingsWithoutData').disable(); grpcGroup.get('minTimeBetweenPingsMs').disable(); grpcGroup.get('minPingIntervalWithoutDataMs').disable(); diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.html index 875b923ef1..267204bd54 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.html @@ -27,7 +27,11 @@ {{'gateway.statistics.timeout-ms' | translate}} - + + + {{'gateway.statistics.timeout-min' | translate }} + {{'widget-config.datasource-parameters' | translate}} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.ts index 8468b483df..dbda5f4db2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.ts @@ -76,7 +76,7 @@ export class GatewayServiceRPCComponent extends PageComponent implements AfterVi super(store); this.commandForm = this.fb.group({ command: [null,[Validators.required]], - time: [60, [Validators.required]], + time: [60, [Validators.required, Validators.min(1)]], params: ["{}", [Validators.required]], result: [null] }) 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 43693043ab..7619c1104c 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -2693,7 +2693,7 @@ }, "min-pack-send-delay": "Min pack send delay (in ms)", "min-pack-send-delay-required": "Min pack send delay is required", - "min-pack-send-delay-min": "Min pack send delay can not be less then 1", + "min-pack-send-delay-min": "Min pack send delay can not be less then 0", "no-connectors": "No connectors", "no-data": "No configurations", "no-gateway-found": "No gateway found.", @@ -2725,7 +2725,7 @@ "commands": "Commands", "send-period": "Statistic send period (in sec)", "send-period-required": "Statistic send period is required", - "send-period-min": "Statistic send period can not be less then 1", + "send-period-min": "Statistic send period can not be less then 60", "send-period-pattern": "Statistic send period is not valid", "check-connectors-configuration": "Check connectors configuration (in ms)", "check-connectors-configuration-required": "Check connectors configuration is required", @@ -2841,7 +2841,14 @@ "inactivity-timeout": "Inactivity device time after whose the gateway will disconnect device", "inactivity-period": "Periodicity of device activity check", "minimal-pack-delay": "Delay between sending packets (Decreasing this setting results in increased CPU usage)", - "qos": "Quality of Service in MQTT messaging (0 - at most once, 1 - at least once)" + "qos": "Quality of Service in MQTT messaging (0 - at most once, 1 - at least once)", + "server-port": "Network port on which GRPC server will listen for incoming connections.", + "grpc-keep-alive-timeout": "Maximum time (in milliseconds) the server should wait for a keepalive ping response before considering the connection dead.", + "grpc-keep-alive": "Duration (in milliseconds) between two successive keepalive ping messages when there is no active RPC call.", + "grpc-min-time-between-pings": "Minimum amount of time (in milliseconds) the server should wait between sending keepalive ping messages", + "grpc-max-pings-without-data": "Maximum number of keepalive ping messages that the server can send without receiving any data before it considers the connection dead.", + "grpc-min-ping-interval-without-data": "Minimum amount of time (in milliseconds) the server should wait between sending keepalive ping messages when there is no data being sent or received.", + "permit-without-calls": "Allow server to keep the GRPC connection alive even when there are no active RPC calls." } }, "grid": {