From 864eae2cd71f981af645feeeb7de150581de97bc Mon Sep 17 00:00:00 2001 From: WHBANG <38547944+WHBANG@users.noreply.github.com> Date: Wed, 16 Nov 2022 12:42:24 +0800 Subject: [PATCH 01/11] update org.springframework.security:spring-security-oauth2-client 5.7.1 to 5.7.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5f5aa3703b..8e09fa474d 100755 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 2.7.0 5.3.20 5.5.12 - 5.7.1 + 5.7.5 2.7.0 3.7.1 0.7.0 From 74ce748059383e9a37e449f356036a266ed88e39 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Mon, 20 Mar 2023 12:10:08 +0200 Subject: [PATCH 02/11] changed default value for ws message queue limit per session from 0 to 1000 --- application/src/main/data/upgrade/3.4.4/schema_update.sql | 7 +++++++ .../dao/service/validator/TenantProfileDataValidator.java | 7 +++++++ ui-ngx/src/app/shared/models/tenant.model.ts | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/application/src/main/data/upgrade/3.4.4/schema_update.sql b/application/src/main/data/upgrade/3.4.4/schema_update.sql index d71fc158ef..9a5ac9b32b 100644 --- a/application/src/main/data/upgrade/3.4.4/schema_update.sql +++ b/application/src/main/data/upgrade/3.4.4/schema_update.sql @@ -347,3 +347,10 @@ END $$; -- ALARM FUNCTIONS END + +-- TENANT PROFILE START + +update tenant_profile SET profile_data = jsonb_set(profile_data, array['configuration','wsMsgQueueLimitPerSession'], to_jsonb(1000)) + WHERE profile_data::json#>>'{configuration,wsMsgQueueLimitPerSession}' = '0'; + +-- TENANT PROFILE END diff --git a/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java b/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java index 0477ccf32f..9a003e235c 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java +++ b/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java @@ -25,6 +25,7 @@ import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.queue.ProcessingStrategy; import org.thingsboard.server.common.data.queue.SubmitStrategy; import org.thingsboard.server.common.data.queue.SubmitStrategyType; +import org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration; import org.thingsboard.server.common.data.tenant.profile.TenantProfileQueueConfiguration; import org.thingsboard.server.dao.exception.DataValidationException; import org.thingsboard.server.dao.service.DataValidator; @@ -57,6 +58,12 @@ public class TenantProfileDataValidator extends DataValidator { if (tenantProfile.getProfileData().getConfiguration() == null) { throw new DataValidationException("Tenant profile data configuration should be specified!"); } + if (tenantProfile.getProfileData().getConfiguration() instanceof DefaultTenantProfileConfiguration) { + DefaultTenantProfileConfiguration configuration = (DefaultTenantProfileConfiguration) tenantProfile.getProfileData().getConfiguration(); + if (configuration.getWsMsgQueueLimitPerSession() == 0) { + throw new DataValidationException("WS message queue limit per session should be greater than 0"); + } + } if (tenantProfile.isDefault()) { TenantProfile defaultTenantProfile = tenantProfileService.findDefaultTenantProfile(tenantId); if (defaultTenantProfile != null && !defaultTenantProfile.getId().equals(tenantProfile.getId())) { diff --git a/ui-ngx/src/app/shared/models/tenant.model.ts b/ui-ngx/src/app/shared/models/tenant.model.ts index 990852ed8c..45843a951c 100644 --- a/ui-ngx/src/app/shared/models/tenant.model.ts +++ b/ui-ngx/src/app/shared/models/tenant.model.ts @@ -110,7 +110,7 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan maxWsSessionsPerCustomer: 0, maxWsSessionsPerRegularUser: 0, maxWsSessionsPerPublicUser: 0, - wsMsgQueueLimitPerSession: 0, + wsMsgQueueLimitPerSession: 1000, maxWsSubscriptionsPerTenant: 0, maxWsSubscriptionsPerCustomer: 0, maxWsSubscriptionsPerRegularUser: 0, From b42d663670029753785e32fcb4a0a3f88a6fc469 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 21 Mar 2023 12:25:42 +0200 Subject: [PATCH 03/11] updated UI to display another default value for wsMessageQueuePerSession (1000 instead of 0) --- application/src/main/data/upgrade/3.4.4/schema_update.sql | 6 ------ .../server/controller/plugin/TbWebSocketHandler.java | 4 +++- application/src/main/resources/thingsboard.yml | 1 + .../dao/service/validator/TenantProfileDataValidator.java | 6 ------ .../default-tenant-profile-configuration.component.html | 3 +++ ui-ngx/src/assets/locale/locale.constant-en_US.json | 1 + 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/application/src/main/data/upgrade/3.4.4/schema_update.sql b/application/src/main/data/upgrade/3.4.4/schema_update.sql index 9a5ac9b32b..88ee90a53f 100644 --- a/application/src/main/data/upgrade/3.4.4/schema_update.sql +++ b/application/src/main/data/upgrade/3.4.4/schema_update.sql @@ -348,9 +348,3 @@ $$; -- ALARM FUNCTIONS END --- TENANT PROFILE START - -update tenant_profile SET profile_data = jsonb_set(profile_data, array['configuration','wsMsgQueueLimitPerSession'], to_jsonb(1000)) - WHERE profile_data::json#>>'{configuration,wsMsgQueueLimitPerSession}' = '0'; - --- TENANT PROFILE END diff --git a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java index f43607b24c..2a4c150e18 100644 --- a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java +++ b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java @@ -81,6 +81,8 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements Telemetr private long sendTimeout; @Value("${server.ws.ping_timeout:30000}") private long pingTimeout; + @Value("${server.ws.max_queue_messages_per_session:1000}") + private int wsQueueMessagesPerSession; private final ConcurrentMap blacklistedSessions = new ConcurrentHashMap<>(); private final ConcurrentMap perSessionUpdateLimits = new ConcurrentHashMap<>(); @@ -142,7 +144,7 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements Telemetr var tenantProfileConfiguration = getTenantProfileConfiguration(sessionRef); internalSessionMap.put(internalSessionId, new SessionMetaData(session, sessionRef, tenantProfileConfiguration != null && tenantProfileConfiguration.getWsMsgQueueLimitPerSession() > 0 ? - tenantProfileConfiguration.getWsMsgQueueLimitPerSession() : 500)); + tenantProfileConfiguration.getWsMsgQueueLimitPerSession() : wsQueueMessagesPerSession)); externalSessionMap.put(externalSessionId, internalSessionId); processInWebSocketService(sessionRef, SessionEvent.onEstablished()); diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml index 10c4c9edac..a689483056 100644 --- a/application/src/main/resources/thingsboard.yml +++ b/application/src/main/resources/thingsboard.yml @@ -65,6 +65,7 @@ server: max_per_user: "${TB_SERVER_WS_DYNAMIC_PAGE_LINK_MAX_PER_USER:10}" max_entities_per_data_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_DATA_SUBSCRIPTION:10000}" max_entities_per_alarm_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_ALARM_SUBSCRIPTION:10000}" + max_queue_messages_per_session: "${TB_SERVER_WS_MAX_QUEUE_MESSAGES_PER_SESSION:1000}" rest: server_side_rpc: # Minimum value of the server side RPC timeout. May override value provided in the REST API call. diff --git a/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java b/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java index 9a003e235c..6f8dfceede 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java +++ b/dao/src/main/java/org/thingsboard/server/dao/service/validator/TenantProfileDataValidator.java @@ -58,12 +58,6 @@ public class TenantProfileDataValidator extends DataValidator { if (tenantProfile.getProfileData().getConfiguration() == null) { throw new DataValidationException("Tenant profile data configuration should be specified!"); } - if (tenantProfile.getProfileData().getConfiguration() instanceof DefaultTenantProfileConfiguration) { - DefaultTenantProfileConfiguration configuration = (DefaultTenantProfileConfiguration) tenantProfile.getProfileData().getConfiguration(); - if (configuration.getWsMsgQueueLimitPerSession() == 0) { - throw new DataValidationException("WS message queue limit per session should be greater than 0"); - } - } if (tenantProfile.isDefault()) { TenantProfile defaultTenantProfile = tenantProfileService.findDefaultTenantProfile(tenantId); if (defaultTenantProfile != null && !defaultTenantProfile.getId().equals(tenantProfile.getId())) { diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html index 35ea628784..90f84eab4a 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html @@ -410,6 +410,9 @@ {{ 'tenant-profile.too-small-value-one' | translate}} + + {{ 'tenant-profile.value-will-be-dropped-to-default' | translate}} +
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 7f0b1badeb..e1f29fadbf 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -3322,6 +3322,7 @@ "incorrect-pattern-for-rate-limits": "The format is comma separated pairs of capacity and period (in seconds) with a colon between, e.g. 100:1,2000:60", "too-small-value-zero": "The value must be bigger than 0", "too-small-value-one": "The value must be bigger than 1", + "value-will-be-dropped-to-default": "0 value will be dropped to default", "cassandra-tenant-limits-configuration": "Cassandra query for tenant", "ws-limit-max-sessions-per-tenant": "Sessions per tenant maximum number", "ws-limit-max-sessions-per-customer": "Sessions per customer maximum number", From fae2427d8ba774d834c49ad7a47ec5fa9c3597c8 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 4 Apr 2023 11:59:33 +0300 Subject: [PATCH 04/11] refactoring --- .../server/controller/plugin/TbWebSocketHandler.java | 2 +- application/src/main/resources/thingsboard.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java index 822a38c3fd..88bdf0f709 100644 --- a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java +++ b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java @@ -84,7 +84,7 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocke private long sendTimeout; @Value("${server.ws.ping_timeout:30000}") private long pingTimeout; - @Value("${server.ws.max_queue_messages_per_session:1000}") + @Value("${server.ws.default_queue_messages_per_session:1000}") private int wsQueueMessagesPerSession; private final ConcurrentMap blacklistedSessions = new ConcurrentHashMap<>(); diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml index e776497717..a4c82aac99 100644 --- a/application/src/main/resources/thingsboard.yml +++ b/application/src/main/resources/thingsboard.yml @@ -65,7 +65,7 @@ server: max_per_user: "${TB_SERVER_WS_DYNAMIC_PAGE_LINK_MAX_PER_USER:10}" max_entities_per_data_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_DATA_SUBSCRIPTION:10000}" max_entities_per_alarm_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_ALARM_SUBSCRIPTION:10000}" - max_queue_messages_per_session: "${TB_SERVER_WS_MAX_QUEUE_MESSAGES_PER_SESSION:1000}" + default_queue_messages_per_session: "${TB_SERVER_WS_DEFAULT_QUEUE_MESSAGES_PER_SESSION:1000}" rest: server_side_rpc: # Minimum value of the server side RPC timeout. May override value provided in the REST API call. From 939c00c2995e46fa71ce13962892962a4b9c4391 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Mon, 10 Apr 2023 16:55:20 +0300 Subject: [PATCH 05/11] added validation for max value of wsQueueMessagesPerSession --- .../server/controller/plugin/TbWebSocketHandler.java | 9 +++++---- application/src/main/resources/thingsboard.yml | 2 +- .../default-tenant-profile-configuration.component.html | 2 +- ui-ngx/src/app/shared/models/tenant.model.ts | 2 +- ui-ngx/src/assets/locale/locale.constant-en_US.json | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java index 88bdf0f709..4eceebd98a 100644 --- a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java +++ b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java @@ -84,8 +84,8 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocke private long sendTimeout; @Value("${server.ws.ping_timeout:30000}") private long pingTimeout; - @Value("${server.ws.default_queue_messages_per_session:1000}") - private int wsQueueMessagesPerSession; + @Value("${server.ws.max_queue_messages_per_session:1000}") + private int wsMaxQueueMessagesPerSession; private final ConcurrentMap blacklistedSessions = new ConcurrentHashMap<>(); private final ConcurrentMap perSessionUpdateLimits = new ConcurrentHashMap<>(); @@ -146,8 +146,9 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocke } var tenantProfileConfiguration = getTenantProfileConfiguration(sessionRef); internalSessionMap.put(internalSessionId, new SessionMetaData(session, sessionRef, - tenantProfileConfiguration != null && tenantProfileConfiguration.getWsMsgQueueLimitPerSession() > 0 ? - tenantProfileConfiguration.getWsMsgQueueLimitPerSession() : wsQueueMessagesPerSession)); + tenantProfileConfiguration != null && tenantProfileConfiguration.getWsMsgQueueLimitPerSession() > 0 && + tenantProfileConfiguration.getWsMsgQueueLimitPerSession() < wsMaxQueueMessagesPerSession ? + tenantProfileConfiguration.getWsMsgQueueLimitPerSession() : wsMaxQueueMessagesPerSession)); externalSessionMap.put(externalSessionId, internalSessionId); processInWebSocketService(sessionRef, SessionEvent.onEstablished()); diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml index a4c82aac99..4c673d27e2 100644 --- a/application/src/main/resources/thingsboard.yml +++ b/application/src/main/resources/thingsboard.yml @@ -65,7 +65,7 @@ server: max_per_user: "${TB_SERVER_WS_DYNAMIC_PAGE_LINK_MAX_PER_USER:10}" max_entities_per_data_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_DATA_SUBSCRIPTION:10000}" max_entities_per_alarm_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_ALARM_SUBSCRIPTION:10000}" - default_queue_messages_per_session: "${TB_SERVER_WS_DEFAULT_QUEUE_MESSAGES_PER_SESSION:1000}" + max_queue_messages_per_session: "${TB_SERVER_WS_DEFAULT_QUEUE_MESSAGES_PER_SESSION:1000}" rest: server_side_rpc: # Minimum value of the server side RPC timeout. May override value provided in the REST API call. diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html index 47b75783ae..efa6ef7e13 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html @@ -411,7 +411,7 @@ {{ 'tenant-profile.too-small-value-one' | translate}} - {{ 'tenant-profile.value-will-be-dropped-to-default' | translate}} + {{ 'tenant-profile.queue-size-is-limited-by-system-configuration' | translate}}
diff --git a/ui-ngx/src/app/shared/models/tenant.model.ts b/ui-ngx/src/app/shared/models/tenant.model.ts index a3bf7ca869..95e0314a52 100644 --- a/ui-ngx/src/app/shared/models/tenant.model.ts +++ b/ui-ngx/src/app/shared/models/tenant.model.ts @@ -111,7 +111,7 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan maxWsSessionsPerCustomer: 0, maxWsSessionsPerRegularUser: 0, maxWsSessionsPerPublicUser: 0, - wsMsgQueueLimitPerSession: 1000, + wsMsgQueueLimitPerSession: 0, maxWsSubscriptionsPerTenant: 0, maxWsSubscriptionsPerCustomer: 0, maxWsSubscriptionsPerRegularUser: 0, 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 8c97a63d13..07924831c3 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -3576,7 +3576,7 @@ "incorrect-pattern-for-rate-limits": "The format is comma separated pairs of capacity and period (in seconds) with a colon between, e.g. 100:1,2000:60", "too-small-value-zero": "The value must be bigger than 0", "too-small-value-one": "The value must be bigger than 1", - "value-will-be-dropped-to-default": "0 value will be dropped to default", + "queue-size-is-limited-by-system-configuration": "The size of the queue is also limited by the system configuration.", "cassandra-tenant-limits-configuration": "Cassandra query for tenant", "ws-limit-max-sessions-per-tenant": "Sessions per tenant maximum number", "ws-limit-max-sessions-per-customer": "Sessions per customer maximum number", From 6b92ed8005c220b411cd09c76b5284a27d1c4e91 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 11 Apr 2023 13:07:48 +0300 Subject: [PATCH 06/11] refactoring --- .../server/controller/plugin/TbWebSocketHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java index 4eceebd98a..7a396ff795 100644 --- a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java +++ b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java @@ -145,10 +145,11 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocke return; } var tenantProfileConfiguration = getTenantProfileConfiguration(sessionRef); + int wsTenantProfileQueueLimit = tenantProfileConfiguration != null ? + tenantProfileConfiguration.getWsMsgQueueLimitPerSession() : wsMaxQueueMessagesPerSession; internalSessionMap.put(internalSessionId, new SessionMetaData(session, sessionRef, - tenantProfileConfiguration != null && tenantProfileConfiguration.getWsMsgQueueLimitPerSession() > 0 && - tenantProfileConfiguration.getWsMsgQueueLimitPerSession() < wsMaxQueueMessagesPerSession ? - tenantProfileConfiguration.getWsMsgQueueLimitPerSession() : wsMaxQueueMessagesPerSession)); + (wsTenantProfileQueueLimit > 0 && wsTenantProfileQueueLimit < wsMaxQueueMessagesPerSession) ? + wsTenantProfileQueueLimit : wsMaxQueueMessagesPerSession)); externalSessionMap.put(externalSessionId, internalSessionId); processInWebSocketService(sessionRef, SessionEvent.onEstablished()); From b1502ee11fc066c644e98e4a0fcf6f797569164f Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Tue, 11 Apr 2023 14:33:40 +0300 Subject: [PATCH 07/11] Added Edge relation type for originator type switch --- .../rule/engine/filter/TbOriginatorTypeSwitchNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java index 3f3b04dd89..8f4bb0ed13 100644 --- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java +++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java @@ -29,7 +29,7 @@ import org.thingsboard.server.common.data.plugin.ComponentType; type = ComponentType.FILTER, name = "entity type switch", configClazz = EmptyNodeConfiguration.class, - relationTypes = {"Device", "Asset", "Alarm", "Entity View", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node"}, + relationTypes = {"Device", "Asset", "Alarm", "Entity View", "Edge", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node"}, nodeDescription = "Route incoming messages by Message Originator Type", nodeDetails = "Routes messages to chain according to the entity type ('Device', 'Asset', etc.).", uiResources = {"static/rulenode/rulenode-core-config.js"}, From 567bfd67ef4e710aec02e3dff3a44c77ecc4e791 Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Tue, 11 Apr 2023 14:35:38 +0300 Subject: [PATCH 08/11] Set Edge as last in the list to avoid issues with compatibility --- .../rule/engine/filter/TbOriginatorTypeSwitchNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java index 8f4bb0ed13..a920af5066 100644 --- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java +++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbOriginatorTypeSwitchNode.java @@ -29,7 +29,7 @@ import org.thingsboard.server.common.data.plugin.ComponentType; type = ComponentType.FILTER, name = "entity type switch", configClazz = EmptyNodeConfiguration.class, - relationTypes = {"Device", "Asset", "Alarm", "Entity View", "Edge", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node"}, + relationTypes = {"Device", "Asset", "Alarm", "Entity View", "Tenant", "Customer", "User", "Dashboard", "Rule chain", "Rule node", "Edge"}, nodeDescription = "Route incoming messages by Message Originator Type", nodeDetails = "Routes messages to chain according to the entity type ('Device', 'Asset', etc.).", uiResources = {"static/rulenode/rulenode-core-config.js"}, From 72ea018efc8c8a2a19f8604b3b6ec742bc78e7f0 Mon Sep 17 00:00:00 2001 From: YevhenBondarenko Date: Tue, 11 Apr 2023 14:05:28 +0200 Subject: [PATCH 09/11] updated spring versions --- .../auth/rest/RestAuthenticationDetails.java | 9 ++------ common/data/pom.xml | 4 ++++ pom.xml | 22 +++++++++---------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/service/security/auth/rest/RestAuthenticationDetails.java b/application/src/main/java/org/thingsboard/server/service/security/auth/rest/RestAuthenticationDetails.java index bc80a22e1b..1eafe66c8f 100644 --- a/application/src/main/java/org/thingsboard/server/service/security/auth/rest/RestAuthenticationDetails.java +++ b/application/src/main/java/org/thingsboard/server/service/security/auth/rest/RestAuthenticationDetails.java @@ -20,7 +20,6 @@ import ua_parser.Client; import ua_parser.Parser; import javax.servlet.http.HttpServletRequest; -import java.io.IOException; import java.io.Serializable; @Data @@ -43,11 +42,7 @@ public class RestAuthenticationDetails implements Serializable { } private static Client getUserAgent(HttpServletRequest request) { - try { - Parser uaParser = new Parser(); - return uaParser.parse(request.getHeader("User-Agent")); - } catch (IOException e) { - return new Client(null, null, null); - } + Parser uaParser = new Parser(); + return uaParser.parse(request.getHeader("User-Agent")); } } diff --git a/common/data/pom.xml b/common/data/pom.xml index e50ccd9dd2..d81203cd4d 100644 --- a/common/data/pom.xml +++ b/common/data/pom.xml @@ -100,6 +100,10 @@ org.apache.commons commons-lang3 + + commons-codec + commons-codec + io.swagger swagger-annotations diff --git a/pom.xml b/pom.xml index c6d56119d0..a554db9586 100755 --- a/pom.xml +++ b/pom.xml @@ -39,12 +39,12 @@ 1.3.2 2.3.2 2.3.2 - 2.7.0 - 2.7.0 - 5.3.20 - 5.5.12 - 5.7.5 - 2.7.0 + 2.7.10 + 2.7.10 + 5.3.26 + 5.5.17 + 5.7.7 + 2.7.10 3.7.1 0.7.0 1.7.32 @@ -75,14 +75,14 @@ 2.3.30 1.6.2 4.2.0 - 3.5.5 + 3.8.1 3.21.9 1.42.1 1.0.6 1.18.18 1.2.4 1.2.5 - 4.1.75.Final + 4.1.91.Final 2.0.51.Final 1.7.0 4.8.0 @@ -107,13 +107,13 @@ 4.1.1 2.57 2.7.7 - 1.27 + 2.0 1.11.747 1.105.0 2.1.0 3.2.0 1.5.0 - 1.4.3 + 1.5.4 1.9.4 3.2.2 1.9.0 @@ -123,7 +123,7 @@ 6.0.20.Final 3.0.0 2.0.1.Final - 1.6.8 + 1.7.2 2.8.5 4.1.0 From abfaeac08767317826bf0b9cb42e0f1d75ceb3d5 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 11 Apr 2023 16:09:54 +0300 Subject: [PATCH 10/11] deleted redundant @NonNull annotation --- .../server/service/script/RemoteJsInvokeService.java | 2 -- .../java/org/thingsboard/server/dao/sql/alarm/JpaAlarmDao.java | 2 -- .../rule/engine/action/TbCopyAttributesToEntityViewNode.java | 2 -- 3 files changed, 6 deletions(-) diff --git a/common/script/remote-js-client/src/main/java/org/thingsboard/server/service/script/RemoteJsInvokeService.java b/common/script/remote-js-client/src/main/java/org/thingsboard/server/service/script/RemoteJsInvokeService.java index 8fff7fc0fe..dc4068edcc 100644 --- a/common/script/remote-js-client/src/main/java/org/thingsboard/server/service/script/RemoteJsInvokeService.java +++ b/common/script/remote-js-client/src/main/java/org/thingsboard/server/service/script/RemoteJsInvokeService.java @@ -20,7 +20,6 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; import lombok.Getter; import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; @@ -191,7 +190,6 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService { }, callbackExecutor); } - @NotNull private JsInvokeProtos.RemoteJsRequest buildJsInvokeRequest(JsScriptInfo jsInfo, Object[] args, boolean includeScriptBody, String scriptBody) { JsInvokeProtos.JsInvokeRequest.Builder jsRequestBuilder = JsInvokeProtos.JsInvokeRequest.newBuilder() .setScriptHash(jsInfo.getHash()) diff --git a/dao/src/main/java/org/thingsboard/server/dao/sql/alarm/JpaAlarmDao.java b/dao/src/main/java/org/thingsboard/server/dao/sql/alarm/JpaAlarmDao.java index e8eb0b150c..4376b4d3c2 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/sql/alarm/JpaAlarmDao.java +++ b/dao/src/main/java/org/thingsboard/server/dao/sql/alarm/JpaAlarmDao.java @@ -18,7 +18,6 @@ package org.thingsboard.server.dao.sql.alarm; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.util.concurrent.ListenableFuture; import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.data.jpa.repository.JpaRepository; @@ -303,7 +302,6 @@ public class JpaAlarmDao extends JpaAbstractDao implements A return alarmQueryRepository.countAlarmsByQuery(tenantId, customerId, query); } - @NotNull private static String getPropagationTypes(AlarmPropagationInfo ap) { String propagateRelationTypes; if (!CollectionUtils.isEmpty(ap.getPropagateRelationTypes())) { diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/action/TbCopyAttributesToEntityViewNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/action/TbCopyAttributesToEntityViewNode.java index 029531494e..65b7800fe3 100644 --- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/action/TbCopyAttributesToEntityViewNode.java +++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/action/TbCopyAttributesToEntityViewNode.java @@ -21,7 +21,6 @@ import com.google.gson.JsonElement; import com.google.gson.JsonParser; import com.google.gson.JsonPrimitive; import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; import org.thingsboard.server.common.data.util.CollectionsUtil; import org.thingsboard.common.util.DonAsynchron; import org.thingsboard.rule.engine.api.EmptyNodeConfiguration; @@ -127,7 +126,6 @@ public class TbCopyAttributesToEntityViewNode implements TbNode { } } - @NotNull private FutureCallback getFutureCallback(TbContext ctx, TbMsg msg, EntityView entityView) { return new FutureCallback() { @Override From 46935d45179426c70a9b351f60afa8b9443acc44 Mon Sep 17 00:00:00 2001 From: YevhenBondarenko Date: Tue, 11 Apr 2023 16:34:56 +0200 Subject: [PATCH 11/11] updated jedis version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a554db9586..d541ac2cb7 100755 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 5.5.17 5.7.7 2.7.10 - 3.7.1 + 3.8.0 0.7.0 1.7.32 2.17.1