From bbda9098700565208f92fc6eb9abd45a977693a2 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 15 Apr 2025 12:38:07 +0300 Subject: [PATCH 01/11] updated properties to exclude tags --- application/src/main/resources/thingsboard.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml index abafd81e7c..d1910399f0 100644 --- a/application/src/main/resources/thingsboard.yml +++ b/application/src/main/resources/thingsboard.yml @@ -1600,13 +1600,13 @@ queue: # These notifications include RPC calls, lifecycle events, and new queue messages, # requiring minimal latency and swift processing. - key: max.poll.records - # Define the maximum number of records that can be polled from tb_edge.notifications. topics. + # Define the maximum number of records that can be polled from tb_edge.notifications.SERVICE_ID topics. value: "${TB_QUEUE_KAFKA_EDGE_HP_EVENTS_MAX_POLL_RECORDS:10}" tb_edge_event.notifications: # Properties for consumers targeting downlinks meant for specific edge topics. # Topic names are dynamically constructed using tenant and edge identifiers. - key: max.poll.records - # Define the maximum number of records that can be polled from tb_edge_event.notifications.. topics. + # Define the maximum number of records that can be polled from tb_edge_event.notifications.TENANT_ID.EDGE_ID topics. value: "${TB_QUEUE_KAFKA_EDGE_NOTIFICATIONS_MAX_POLL_RECORDS:10}" tb_housekeeper: # Consumer properties for Housekeeper tasks topic @@ -1861,10 +1861,10 @@ queue: # Topic name to notify edge service on entity updates, assignment, etc. topic: "${TB_QUEUE_EDGE_TOPIC:tb_edge}" # Topic prefix for high-priority edge notifications (rpc, lifecycle, new messages in queue) that require minimum latency and processing time. - # Each tb-core has its own topic: . + # Each tb-core has its own topic: PREFIX.SERVICE_ID notifications_topic: "${TB_QUEUE_EDGE_NOTIFICATIONS_TOPIC:tb_edge.notifications}" # Topic prefix for downlinks to be pushed to specific edge. - # Every edge has its own unique topic: .. + # Every edge has its own unique topic: PREFIX.TENANT_ID.EDGE_ID event_notifications_topic: "${TB_QUEUE_EDGE_EVENT_NOTIFICATIONS_TOPIC:tb_edge_event.notifications}" # Amount of partitions used by Edge services partitions: "${TB_QUEUE_EDGE_PARTITIONS:10}" From 4a9f2d87f34b4025ee0e8eeeddba755ed919f6be Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 15 Apr 2025 17:46:08 +0300 Subject: [PATCH 02/11] UI: Fixed saving issue in dynamic form array item of type 'fieldset' --- ui-ngx/src/app/shared/models/dynamic-form.models.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui-ngx/src/app/shared/models/dynamic-form.models.ts b/ui-ngx/src/app/shared/models/dynamic-form.models.ts index d807e7b13b..4132eeff94 100644 --- a/ui-ngx/src/app/shared/models/dynamic-form.models.ts +++ b/ui-ngx/src/app/shared/models/dynamic-form.models.ts @@ -181,15 +181,15 @@ export const cleanupFormProperty = (property: FormProperty): FormProperty => { if (property.type !== FormPropertyType.textarea) { delete property.rows; } - if (property.type !== FormPropertyType.fieldset) { - delete property.properties; - } else if (property.properties?.length) { - property.properties = cleanupFormProperties(property.properties); - } if (property.type !== FormPropertyType.array) { delete property.arrayItemName; delete property.arrayItemType; } + if (property.type !== FormPropertyType.fieldset && property.arrayItemType !== FormPropertyType.fieldset) { + delete property.properties; + } else if (property.properties?.length) { + property.properties = cleanupFormProperties(property.properties); + } if (property.type !== FormPropertyType.select) { delete property.multiple; delete property.allowEmptyOption; From 0add09eb512bd7368ba48dbb684399404f26ec5a Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 15 Apr 2025 18:19:07 +0300 Subject: [PATCH 03/11] UI: Fix Date and Array type checking in iframes and Web Workers --- ui-ngx/src/app/core/utils.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ui-ngx/src/app/core/utils.ts b/ui-ngx/src/app/core/utils.ts index c37cae599e..353727e006 100644 --- a/ui-ngx/src/app/core/utils.ts +++ b/ui-ngx/src/app/core/utils.ts @@ -137,6 +137,14 @@ export function isLiteralObject(value: any) { return (!!value) && (value.constructor === Object); } +export const isDate = (obj: any): boolean => { + return Object.prototype.toString.call(obj) === "[object Date]"; +} + +export const isFile = (obj: any): boolean => { + return Object.prototype.toString.call(obj) === "[object File]"; +} + export const formatValue = (value: any, dec?: number, units?: string, showZeroDecimals?: boolean): string | undefined => { if (isDefinedAndNotNull(value) && isNumeric(value) && (isDefinedAndNotNull(dec) || isNotEmptyStr(units) || Number(value).toString() === value)) { @@ -180,7 +188,7 @@ export function deleteNullProperties(obj: any) { delete obj[propName]; } else if (isObject(obj[propName])) { deleteNullProperties(obj[propName]); - } else if (obj[propName] instanceof Array) { + } else if (Array.isArray(obj[propName])) { (obj[propName] as any[]).forEach((elem) => { deleteNullProperties(elem); }); @@ -335,13 +343,11 @@ export function deepClone(target: T, ignoreFields?: string[]): T { if (isObservable(target)) { return target; } - if (target instanceof Date) { - return new Date(target.getTime()) as any; + if (isDate(target)) { + return new Date((target as Date).getTime()) as T; } - if (target instanceof Array) { - const cp = [] as any[]; - (target as any[]).forEach((v) => { cp.push(v); }); - return cp.map((n: any) => deepClone(n)) as any; + if (Array.isArray(target)) { + return (target as any[]).map((item) => deepClone(item)) as any; } if (typeof target === 'object') { const cp = {...(target as { [key: string]: any })} as { [key: string]: any }; @@ -752,7 +758,7 @@ export function sortObjectKeys(obj: T): T { } export function deepTrim(obj: T): T { - if (isNumber(obj) || isUndefined(obj) || isString(obj) || obj === null || obj instanceof File) { + if (isNumber(obj) || isUndefined(obj) || isString(obj) || obj === null || isFile(obj)) { return obj; } return Object.keys(obj).reduce((acc, curr) => { From fbc3ff9c240913e9e8b87794567761fcd9c1be30 Mon Sep 17 00:00:00 2001 From: IrynaMatveieva Date: Wed, 16 Apr 2025 08:33:50 +0300 Subject: [PATCH 04/11] updated links for the rule nodes --- ui-ngx/src/app/shared/models/constants.ts | 8 +++++--- ui-ngx/src/app/shared/models/rule-node.models.ts | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/shared/models/constants.ts b/ui-ngx/src/app/shared/models/constants.ts index 4dcb1f193b..e1306e577c 100644 --- a/ui-ngx/src/app/shared/models/constants.ts +++ b/ui-ngx/src/app/shared/models/constants.ts @@ -113,6 +113,7 @@ export const HelpLinks = { ruleNodeOriginatorTelemetry: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/enrichment-nodes/#originator-telemetry`, ruleNodeCustomerAttributes: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/enrichment-nodes/#customer-attributes`, ruleNodeCustomerDetails: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/enrichment-nodes/#customer-details`, + ruleNodeFetchDeviceCredentials: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/enrichment-nodes/#fetch-device-credentials`, ruleNodeDeviceAttributes: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/enrichment-nodes/#device-attributes`, ruleNodeRelatedAttributes: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/enrichment-nodes/#related-attributes`, ruleNodeTenantAttributes: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/enrichment-nodes/#tenant-attributes`, @@ -120,13 +121,14 @@ export const HelpLinks = { ruleNodeChangeOriginator: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/transformation-nodes/#change-originator`, ruleNodeTransformMsg: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/transformation-nodes/#script-transformation-node`, ruleNodeMsgToEmail: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/transformation-nodes/#to-email-node`, - ruleNodeAssignToCustomer: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/transformation-nodes/#assign-to-customer-node`, - ruleNodeUnassignFromCustomer: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/transformation-nodes/#unassign-from-customer-node`, + ruleNodeAssignToCustomer: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#assign-to-customer-node`, + ruleNodeUnassignFromCustomer: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#unassign-from-customer-node`, + ruleNodeCalculatedFields: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#calculated-fields-node`, ruleNodeClearAlarm: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#clear-alarm-node`, ruleNodeCreateAlarm: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#create-alarm-node`, ruleNodeCreateRelation: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#create-relation-node`, ruleNodeDeleteRelation: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#delete-relation-node`, - ruleNodeMsgDelay: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#delay-node`, + ruleNodeMsgDelay: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#delay-node-deprecated`, ruleNodeMsgGenerator: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#generator-node`, ruleNodeGpsGeofencingEvents: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#gps-geofencing-events-node`, ruleNodeLog: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/rule-engine-2-0/action-nodes/#log-node`, diff --git a/ui-ngx/src/app/shared/models/rule-node.models.ts b/ui-ngx/src/app/shared/models/rule-node.models.ts index 32422a87e0..dff6e53654 100644 --- a/ui-ngx/src/app/shared/models/rule-node.models.ts +++ b/ui-ngx/src/app/shared/models/rule-node.models.ts @@ -469,6 +469,7 @@ const ruleNodeClazzHelpLinkMap = { 'org.thingsboard.rule.engine.metadata.TbGetTelemetryNode': 'ruleNodeOriginatorTelemetry', 'org.thingsboard.rule.engine.metadata.TbGetCustomerAttributeNode': 'ruleNodeCustomerAttributes', 'org.thingsboard.rule.engine.metadata.TbGetCustomerDetailsNode': 'ruleNodeCustomerDetails', + 'org.thingsboard.rule.engine.metadata.TbFetchDeviceCredentialsNode': 'ruleNodeFetchDeviceCredentials', 'org.thingsboard.rule.engine.metadata.TbGetDeviceAttrNode': 'ruleNodeDeviceAttributes', 'org.thingsboard.rule.engine.metadata.TbGetRelatedAttributeNode': 'ruleNodeRelatedAttributes', 'org.thingsboard.rule.engine.metadata.TbGetTenantAttributeNode': 'ruleNodeTenantAttributes', @@ -479,6 +480,7 @@ const ruleNodeClazzHelpLinkMap = { 'org.thingsboard.rule.engine.mail.TbMsgToEmailNode': 'ruleNodeMsgToEmail', 'org.thingsboard.rule.engine.action.TbAssignToCustomerNode': 'ruleNodeAssignToCustomer', 'org.thingsboard.rule.engine.action.TbUnassignFromCustomerNode': 'ruleNodeUnassignFromCustomer', + 'org.thingsboard.rule.engine.telemetry.TbCalculatedFieldsNode': 'ruleNodeCalculatedFields', 'org.thingsboard.rule.engine.action.TbClearAlarmNode': 'ruleNodeClearAlarm', 'org.thingsboard.rule.engine.action.TbCreateAlarmNode': 'ruleNodeCreateAlarm', 'org.thingsboard.rule.engine.action.TbCreateRelationNode': 'ruleNodeCreateRelation', From f4b769e42a1d4c6d65f6d0fd4be1a2baf7c70f2f Mon Sep 17 00:00:00 2001 From: mpetrov Date: Wed, 16 Apr 2025 13:06:01 +0300 Subject: [PATCH 05/11] Fixed a crash when using tb-help-popup inside matSuffix Fixed a crash when using tb-help-popup inside matSuffix Moved styles assignment after positioning Moved styles assignment after positioning Changed approach to condition in setter Changed approach to condition in setter @nickAS21 fix_bug_lwm2m: add resource "tbfw" and "tbsw" to root coap fix_bug_lwm2m: refactoring fix_bug_lwm2m: add block2 condition Merge with RC Remove link to Google Groups fix_bug_lwm2m: add authorizer to lh server update dashboard title to include TBEL metrics Use create coap profile in tests Renamed profile data variables Version 4.1.0-SNAPSHOT Cleanup upgrade scripts Revert "Cleanup upgrade scripts" This reverts commit e008792acf6cf3559653363675d82dab5bd843ec. Revert "Version 4.1.0-SNAPSHOT" This reverts commit da0ec62692c75f543b583e64714d60fa2f41b9d3. Revert "Renamed profile data variables" This reverts commit 12b1de4d2e6e3ffdc5ccb8becf5c9d9ace523c9c. Revert "Use create coap profile in tests" This reverts commit c07ff658ad07f5d2c8a6472b490feb1b83590659. Revert "update dashboard title to include TBEL metrics" This reverts commit 06df627aec29c3bd4141c36814b4f8443890f87f. Revert "fix_bug_lwm2m: add authorizer to lh server" This reverts commit b1f3a743da4de46746e85f0453434aedf457bc6e. Revert "Remove link to Google Groups" This reverts commit ba8f536b626c772c84c7cf17dea4057727edc816. Revert "Merge with RC" This reverts commit 02a09ac4f16954f9fd25dabde41a277ff19cdf9e. Revert "fix_bug_lwm2m: add block2 condition" This reverts commit bd09ed8202c397f98472a8838a73b4ffc2aa0124. Revert "fix_bug_lwm2m: refactoring" This reverts commit eefa6caee40768e33c010287694147302451befb. Revert "@nickAS21" This reverts commit cecfa18fc8e71dc8c4cf736855f51cff65ee4828. --- ui-ngx/src/app/shared/components/popover.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/popover.component.ts b/ui-ngx/src/app/shared/components/popover.component.ts index 6dc4dab12a..0627617241 100644 --- a/ui-ngx/src/app/shared/components/popover.component.ts +++ b/ui-ngx/src/app/shared/components/popover.component.ts @@ -472,7 +472,9 @@ export class TbPopoverComponent implements OnDestroy, OnInit { set tbOverlayStyle(value: { [klass: string]: any }) { this._tbOverlayStyle = value; - this.cdr.detectChanges(); + if (this.popover) { + this.cdr.detectChanges(); + } } get tbOverlayStyle(): { [klass: string]: any } { From 506c0927f6ddffdf6f63e66d9a06231673ac8e3d Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Thu, 17 Apr 2025 11:59:23 +0300 Subject: [PATCH 06/11] UI: Fixed mutation default widget settings in advanced mode --- .../alarm/alarm-count-widget-settings.component.ts | 2 +- .../action-button-widget-settings.component.ts | 2 +- .../command-button-widget-settings.component.ts | 2 +- .../button/power-button-widget-settings.component.ts | 2 +- .../segmented-button-widget-settings.component.ts | 2 +- .../toggle-button-widget-settings.component.ts | 2 +- .../aggregated-value-card-key-settings.component.ts | 3 +-- ...ggregated-value-card-widget-settings.component.ts | 2 +- .../cards/label-card-widget-settings.component.ts | 2 +- .../label-value-card-widget-settings.component.ts | 2 +- .../mobile-app-qr-code-widget-settings.component.ts | 4 ++-- .../cards/progress-bar-widget-settings.component.ts | 2 +- .../unread-notification-widget-settings.component.ts | 2 +- .../value-chart-card-widget-settings.component.ts | 2 +- ...ar-chart-with-labels-widget-settings.component.ts | 6 +++--- .../chart/latest-chart-widget-settings.component.ts | 10 ++++++---- .../chart/range-chart-widget-settings.component.ts | 9 +++------ .../time-series-chart-key-settings.component.ts | 10 ++++++---- .../time-series-chart-widget-settings.component.ts | 7 +++---- .../single-switch-widget-settings.component.ts | 2 +- .../control/slider-widget-settings.component.ts | 2 +- .../value-stepper-widget-settings.component.ts | 2 +- .../entity/entity-count-widget-settings.component.ts | 2 +- .../battery-level-widget-settings.component.ts | 5 +++-- .../signal-strength-widget-settings.component.ts | 2 +- .../indicator/status-widget-settings.component.ts | 2 +- .../legacy/map-widget-settings-legacy.component.ts | 4 +--- .../legacy/route-map-widget-settings.component.ts | 4 +--- .../trip-animation-widget-settings.component.ts | 4 +--- .../settings/map/map-widget-settings.component.ts | 6 +++--- .../scada/scada-symbol-widget-settings.component.ts | 2 +- ...wind-speed-direction-widget-settings.component.ts | 2 +- ui-ngx/src/app/shared/models/widget.models.ts | 12 +++++++----- 33 files changed, 60 insertions(+), 64 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/alarm/alarm-count-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/alarm/alarm-count-widget-settings.component.ts index 377909d122..f45fb7b12b 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/alarm/alarm-count-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/alarm/alarm-count-widget-settings.component.ts @@ -40,7 +40,7 @@ export class AlarmCountWidgetSettingsComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return {...countDefaultSettings(true)}; + return countDefaultSettings(true); } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/action-button-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/action-button-widget-settings.component.ts index 53190b43c2..c4d64c0247 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/action-button-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/action-button-widget-settings.component.ts @@ -56,7 +56,7 @@ export class ActionButtonWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...actionButtonDefaultSettings}; + return actionButtonDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/command-button-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/command-button-widget-settings.component.ts index a0844787f5..070b044b9e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/command-button-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/command-button-widget-settings.component.ts @@ -54,7 +54,7 @@ export class CommandButtonWidgetSettingsComponent extends WidgetSettingsComponen } protected defaultSettings(): WidgetSettings { - return {...commandButtonDefaultSettings}; + return commandButtonDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/power-button-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/power-button-widget-settings.component.ts index 865eabcb81..16a513a033 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/power-button-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/power-button-widget-settings.component.ts @@ -61,7 +61,7 @@ export class PowerButtonWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...powerButtonDefaultSettings}; + return powerButtonDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts index 7825bcb636..7696e5d8f3 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts @@ -77,7 +77,7 @@ export class SegmentedButtonWidgetSettingsComponent extends WidgetSettingsCompon } protected defaultSettings(): WidgetSettings { - return {...segmentedButtonDefaultSettings}; + return segmentedButtonDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/toggle-button-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/toggle-button-widget-settings.component.ts index e2d1e78356..80812179e3 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/toggle-button-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/toggle-button-widget-settings.component.ts @@ -55,7 +55,7 @@ export class ToggleButtonWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...toggleButtonDefaultSettings}; + return toggleButtonDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-key-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-key-settings.component.ts index 9e8f81ba98..69ec02e381 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-key-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-key-settings.component.ts @@ -24,7 +24,6 @@ import { AggregatedValueCardKeyPosition, aggregatedValueCardKeyPositionTranslations } from '@home/components/widget/lib/cards/aggregated-value-card.models'; -import { constantColor } from '@shared/models/widget-settings.models'; @Component({ selector: 'tb-aggregated-value-card-key-settings', @@ -50,7 +49,7 @@ export class AggregatedValueCardKeySettingsComponent extends WidgetSettingsCompo } protected defaultSettings(): WidgetSettings { - return {...aggregatedValueCardDefaultKeySettings}; + return aggregatedValueCardDefaultKeySettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-widget-settings.component.ts index 40fc2ceab1..b143697384 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/aggregated-value-card-widget-settings.component.ts @@ -44,7 +44,7 @@ export class AggregatedValueCardWidgetSettingsComponent extends WidgetSettingsCo } protected defaultSettings(): WidgetSettings { - return {...aggregatedValueCardDefaultSettings}; + return aggregatedValueCardDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-card-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-card-widget-settings.component.ts index 7f1fc5a694..4fe2449283 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-card-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-card-widget-settings.component.ts @@ -40,7 +40,7 @@ export class LabelCardWidgetSettingsComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return {...labelCardWidgetDefaultSettings}; + return labelCardWidgetDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-value-card-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-value-card-widget-settings.component.ts index 1e68fafab4..60082c98b6 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-value-card-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/label-value-card-widget-settings.component.ts @@ -43,7 +43,7 @@ export class LabelValueCardWidgetSettingsComponent extends WidgetSettingsCompone } protected defaultSettings(): WidgetSettings { - return {...labelValueCardWidgetDefaultSettings}; + return labelValueCardWidgetDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/mobile-app-qr-code-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/mobile-app-qr-code-widget-settings.component.ts index 731a07d9e4..a6f431336d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/mobile-app-qr-code-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/mobile-app-qr-code-widget-settings.component.ts @@ -15,7 +15,7 @@ /// import { Component } from "@angular/core"; -import { UntypedFormBuilder, UntypedFormGroup, Validators } from "@angular/forms"; +import { UntypedFormBuilder, UntypedFormGroup } from "@angular/forms"; import { WidgetSettings, WidgetSettingsComponent } from "@shared/models/widget.models"; import { AppState } from '@core/core.state'; import { Store } from "@ngrx/store"; @@ -43,7 +43,7 @@ export class MobileAppQrCodeWidgetSettingsComponent extends WidgetSettingsCompon } protected defaultSettings(): WidgetSettings { - return {...mobileAppQrCodeWidgetDefaultSettings}; + return mobileAppQrCodeWidgetDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/progress-bar-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/progress-bar-widget-settings.component.ts index 32c1989a2c..a92a8454d3 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/progress-bar-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/progress-bar-widget-settings.component.ts @@ -57,7 +57,7 @@ export class ProgressBarWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...progressBarDefaultSettings}; + return progressBarDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/unread-notification-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/unread-notification-widget-settings.component.ts index d9a84619d2..b5499495e1 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/unread-notification-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/unread-notification-widget-settings.component.ts @@ -42,7 +42,7 @@ export class UnreadNotificationWidgetSettingsComponent extends WidgetSettingsCom } protected defaultSettings(): WidgetSettings { - return {...unreadNotificationDefaultSettings}; + return unreadNotificationDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-chart-card-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-chart-card-widget-settings.component.ts index 4d99271a3b..e7fa0e3a2c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-chart-card-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/value-chart-card-widget-settings.component.ts @@ -54,7 +54,7 @@ export class ValueChartCardWidgetSettingsComponent extends WidgetSettingsCompone } protected defaultSettings(): WidgetSettings { - return {...valueChartCardDefaultSettings}; + return valueChartCardDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.ts index 1c877d37ab..87eaf593e6 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.ts @@ -25,10 +25,10 @@ import { import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { formatValue, mergeDeep } from '@core/utils'; +import { formatValue } from '@core/utils'; import { DateFormatProcessor, DateFormatSettings } from '@shared/models/widget-settings.models'; import { - barChartWithLabelsDefaultSettings, BarChartWithLabelsWidgetSettings + barChartWithLabelsDefaultSettings } from '@home/components/widget/lib/chart/bar-chart-with-labels-widget.models'; @Component({ @@ -68,7 +68,7 @@ export class BarChartWithLabelsWidgetSettingsComponent extends WidgetSettingsCom } protected defaultSettings(): WidgetSettings { - return mergeDeep({} as BarChartWithLabelsWidgetSettings, barChartWithLabelsDefaultSettings); + return barChartWithLabelsDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/latest-chart-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/latest-chart-widget-settings.component.ts index e2fc48f317..1d7baebd33 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/latest-chart-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/latest-chart-widget-settings.component.ts @@ -29,9 +29,11 @@ import { } from '@shared/models/widget.models'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { - DoughnutLayout, doughnutLayoutImages, + DoughnutLayout, + doughnutLayoutImages, doughnutLayouts, - doughnutLayoutTranslations, horizontalDoughnutLayoutImages + doughnutLayoutTranslations, + horizontalDoughnutLayoutImages } from '@home/components/widget/lib/chart/doughnut-widget.models'; import { chartLabelPositions, @@ -44,7 +46,7 @@ import { pieChartLabelPositionTranslations } from '@home/components/widget/lib/chart/chart.models'; import { radarChartShapes, radarChartShapeTranslations } from '@home/components/widget/lib/chart/radar-chart.models'; -import { formatValue, isDefinedAndNotNull, mergeDeep } from '@core/utils'; +import { formatValue, isDefinedAndNotNull } from '@core/utils'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; import { WidgetConfigComponentData } from '@home/models/widget-component.models'; @@ -116,7 +118,7 @@ export abstract class LatestChartWidgetSettingsComponent({} as S, this.defaultLatestChartSettings()); + return this.defaultLatestChartSettings(); } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/range-chart-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/range-chart-widget-settings.component.ts index 03be4b8283..ef9a9bcc71 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/range-chart-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/range-chart-widget-settings.component.ts @@ -25,11 +25,8 @@ import { import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { formatValue, mergeDeepIgnoreArray } from '@core/utils'; -import { - rangeChartDefaultSettings, - RangeChartWidgetSettings -} from '@home/components/widget/lib/chart/range-chart-widget.models'; +import { formatValue } from '@core/utils'; +import { rangeChartDefaultSettings } from '@home/components/widget/lib/chart/range-chart-widget.models'; import { DateFormatProcessor, DateFormatSettings } from '@shared/models/widget-settings.models'; import { lineSeriesStepTypes, @@ -99,7 +96,7 @@ export class RangeChartWidgetSettingsComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return mergeDeepIgnoreArray({} as RangeChartWidgetSettings, rangeChartDefaultSettings); + return rangeChartDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-key-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-key-settings.component.ts index ce3a9be1dc..4a322038c4 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-key-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-key-settings.component.ts @@ -19,13 +19,16 @@ import { WidgetSettings, WidgetSettingsComponent } from '@shared/models/widget.m import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { isDefinedAndNotNull, mergeDeep } from '@core/utils'; +import { isDefinedAndNotNull } from '@core/utils'; import { timeSeriesChartKeyDefaultSettings, TimeSeriesChartKeySettings, TimeSeriesChartSeriesType, timeSeriesChartSeriesTypes, - timeSeriesChartSeriesTypeTranslations, TimeSeriesChartType, timeSeriesChartTypeTranslations, TimeSeriesChartYAxisId + timeSeriesChartSeriesTypeTranslations, + TimeSeriesChartType, + timeSeriesChartTypeTranslations, + TimeSeriesChartYAxisId } from '@home/components/widget/lib/chart/time-series-chart.models'; import { WidgetConfigComponentData } from '@home/models/widget-component.models'; import { TimeSeriesChartWidgetSettings } from '@home/components/widget/lib/chart/time-series-chart-widget.models'; @@ -79,8 +82,7 @@ export class TimeSeriesChartKeySettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return mergeDeep({} as TimeSeriesChartKeySettings, - timeSeriesChartKeyDefaultSettings); + return timeSeriesChartKeyDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-widget-settings.component.ts index 68d849fd0c..f56fb6260d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/time-series-chart-widget-settings.component.ts @@ -26,11 +26,10 @@ import { import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { formatValue, isDefinedAndNotNull, mergeDeep } from '@core/utils'; +import { formatValue, isDefinedAndNotNull } from '@core/utils'; import { DateFormatProcessor, DateFormatSettings } from '@shared/models/widget-settings.models'; import { - timeSeriesChartWidgetDefaultSettings, - TimeSeriesChartWidgetSettings + timeSeriesChartWidgetDefaultSettings } from '@home/components/widget/lib/chart/time-series-chart-widget.models'; import { TimeSeriesChartKeySettings, @@ -120,7 +119,7 @@ export class TimeSeriesChartWidgetSettingsComponent extends WidgetSettingsCompon } protected defaultSettings(): WidgetSettings { - return mergeDeep({} as TimeSeriesChartWidgetSettings, timeSeriesChartWidgetDefaultSettings); + return timeSeriesChartWidgetDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/single-switch-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/single-switch-widget-settings.component.ts index e32670761d..4bd5140e25 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/single-switch-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/single-switch-widget-settings.component.ts @@ -61,7 +61,7 @@ export class SingleSwitchWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...singleSwitchDefaultSettings}; + return singleSwitchDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/slider-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/slider-widget-settings.component.ts index 520c538961..40caf7a729 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/slider-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/slider-widget-settings.component.ts @@ -67,7 +67,7 @@ export class SliderWidgetSettingsComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return {...sliderWidgetDefaultSettings}; + return sliderWidgetDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/value-stepper-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/value-stepper-widget-settings.component.ts index b0e3dc4bf6..c5bb26a2ec 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/value-stepper-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/value-stepper-widget-settings.component.ts @@ -72,7 +72,7 @@ export class ValueStepperWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...valueStepperDefaultSettings}; + return valueStepperDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entity-count-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entity-count-widget-settings.component.ts index 1a0b2c0c28..2db8e3b0af 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entity-count-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entity-count-widget-settings.component.ts @@ -40,7 +40,7 @@ export class EntityCountWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...countDefaultSettings(false)}; + return countDefaultSettings(false); } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/battery-level-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/battery-level-widget-settings.component.ts index c3aff122ab..a654d2270c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/battery-level-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/battery-level-widget-settings.component.ts @@ -21,7 +21,8 @@ import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; import { formatValue } from '@core/utils'; import { - batteryLevelDefaultSettings, BatteryLevelLayout, + batteryLevelDefaultSettings, + BatteryLevelLayout, batteryLevelLayoutImages, batteryLevelLayouts, batteryLevelLayoutTranslations @@ -68,7 +69,7 @@ export class BatteryLevelWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...batteryLevelDefaultSettings}; + return batteryLevelDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/signal-strength-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/signal-strength-widget-settings.component.ts index dc27cca4c4..74def6f08d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/signal-strength-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/signal-strength-widget-settings.component.ts @@ -57,7 +57,7 @@ export class SignalStrengthWidgetSettingsComponent extends WidgetSettingsCompone } protected defaultSettings(): WidgetSettings { - return {...signalStrengthDefaultSettings}; + return signalStrengthDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/status-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/status-widget-settings.component.ts index ee66309c3c..ce0841bc4a 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/status-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/indicator/status-widget-settings.component.ts @@ -64,7 +64,7 @@ export class StatusWidgetSettingsComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return {...statusWidgetDefaultSettings}; + return statusWidgetDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/map-widget-settings-legacy.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/map-widget-settings-legacy.component.ts index 8089313f18..879d4501b7 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/map-widget-settings-legacy.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/map-widget-settings-legacy.component.ts @@ -40,9 +40,7 @@ export class MapWidgetSettingsLegacyComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return { - ...defaultMapSettings - }; + return defaultMapSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/route-map-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/route-map-widget-settings.component.ts index 0819253feb..efa29fcc32 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/route-map-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/route-map-widget-settings.component.ts @@ -40,9 +40,7 @@ export class RouteMapWidgetSettingsComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return { - ...defaultMapSettings - }; + return defaultMapSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/trip-animation-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/trip-animation-widget-settings.component.ts index 85be370ada..e48143f859 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/trip-animation-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/legacy/trip-animation-widget-settings.component.ts @@ -57,9 +57,7 @@ export class TripAnimationWidgetSettingsComponent extends WidgetSettingsComponen } protected defaultSettings(): WidgetSettings { - return { - ...defaultTripAnimationSettings - }; + return defaultTripAnimationSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/map-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/map-widget-settings.component.ts index f301219045..89fb975f1f 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/map-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/map/map-widget-settings.component.ts @@ -19,8 +19,8 @@ import { WidgetSettings, WidgetSettingsComponent } from '@shared/models/widget.m import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; -import { isDefinedAndNotNull, mergeDeepIgnoreArray } from '@core/utils'; -import { mapWidgetDefaultSettings, MapWidgetSettings } from '@home/components/widget/lib/maps/map-widget.models'; +import { isDefinedAndNotNull } from '@core/utils'; +import { mapWidgetDefaultSettings } from '@home/components/widget/lib/maps/map-widget.models'; import { WidgetConfigComponentData } from '@home/models/widget-component.models'; @Component({ @@ -53,7 +53,7 @@ export class MapWidgetSettingsComponent extends WidgetSettingsComponent { } protected defaultSettings(): WidgetSettings { - return mergeDeepIgnoreArray({} as MapWidgetSettings, mapWidgetDefaultSettings); + return mapWidgetDefaultSettings; } protected prepareInputSettings(settings: WidgetSettings): WidgetSettings { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/scada/scada-symbol-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/scada/scada-symbol-widget-settings.component.ts index 5859935bf5..612effb7f5 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/scada/scada-symbol-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/scada/scada-symbol-widget-settings.component.ts @@ -48,7 +48,7 @@ export class ScadaSymbolWidgetSettingsComponent extends WidgetSettingsComponent } protected defaultSettings(): WidgetSettings { - return {...scadaSymbolWidgetDefaultSettings}; + return scadaSymbolWidgetDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/weather/wind-speed-direction-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/weather/wind-speed-direction-widget-settings.component.ts index 41a794a47f..1b48bfd7c2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/weather/wind-speed-direction-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/weather/wind-speed-direction-widget-settings.component.ts @@ -70,7 +70,7 @@ export class WindSpeedDirectionWidgetSettingsComponent extends WidgetSettingsCom } protected defaultSettings(): WidgetSettings { - return {...windSpeedDirectionDefaultSettings}; + return windSpeedDirectionDefaultSettings; } protected onSettingsSet(settings: WidgetSettings) { diff --git a/ui-ngx/src/app/shared/models/widget.models.ts b/ui-ngx/src/app/shared/models/widget.models.ts index c55dcdee37..21d7927d16 100644 --- a/ui-ngx/src/app/shared/models/widget.models.ts +++ b/ui-ngx/src/app/shared/models/widget.models.ts @@ -37,17 +37,19 @@ import { AbstractControl, UntypedFormGroup } from '@angular/forms'; import { Observable } from 'rxjs'; import { Dashboard } from '@shared/models/dashboard.models'; import { IAliasController } from '@core/api/widget-api.models'; -import { isNotEmptyStr, mergeDeepIgnoreArray } from '@core/utils'; +import { isNotEmptyStr, mergeDeep, mergeDeepIgnoreArray } from '@core/utils'; import { WidgetConfigComponentData } from '@home/models/widget-component.models'; import { ComponentStyle, Font, TimewindowStyle } from '@shared/models/widget-settings.models'; import { NULL_UUID } from '@shared/models/id/has-uuid'; import { EntityInfoData, HasTenantId, HasVersion } from '@shared/models/entity.models'; -import { DataKeysCallbacks, DataKeySettingsFunction } from '@home/components/widget/lib/settings/common/key/data-keys.component.models'; +import { + DataKeysCallbacks, + DataKeySettingsFunction +} from '@home/components/widget/lib/settings/common/key/data-keys.component.models'; import { WidgetConfigCallbacks } from '@home/components/widget/config/widget-config.component.models'; import { TbFunction } from '@shared/models/js-function.models'; import { FormProperty, jsonFormSchemaToFormProperties } from '@shared/models/dynamic-form.models'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; -import { Device } from '@shared/models/device.models'; export enum widgetType { timeseries = 'timeseries', @@ -1000,9 +1002,9 @@ export abstract class WidgetSettingsComponent extends PageComponent implements set settings(value: WidgetSettings) { if (!value) { - this.settingsValue = this.defaultSettings(); + this.settingsValue = mergeDeep({}, this.defaultSettings()); } else { - this.settingsValue = mergeDeepIgnoreArray(this.defaultSettings(), value); + this.settingsValue = mergeDeepIgnoreArray({}, this.defaultSettings(), value); } if (!this.settingsSet) { this.settingsSet = true; From 5de4efb7b371649f233e6c2c0ea634805b93ba6e Mon Sep 17 00:00:00 2001 From: Sergey Matvienko Date: Thu, 17 Apr 2025 14:03:53 +0200 Subject: [PATCH 07/11] DefaultNotificationCenter log level debug --- .../service/notification/DefaultNotificationCenter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/service/notification/DefaultNotificationCenter.java b/application/src/main/java/org/thingsboard/server/service/notification/DefaultNotificationCenter.java index 1b410e2607..48f2fdc620 100644 --- a/application/src/main/java/org/thingsboard/server/service/notification/DefaultNotificationCenter.java +++ b/application/src/main/java/org/thingsboard/server/service/notification/DefaultNotificationCenter.java @@ -259,9 +259,9 @@ public class DefaultNotificationCenter extends AbstractSubscriptionService imple int sent = stats.getTotalSent().get(); int errors = stats.getTotalErrors().get(); if (errors > 0) { - log.info("[{}][{}] Notification request processing finished in {} ms (sent: {}, errors: {})", ctx.getTenantId(), requestId, time, sent, errors); + log.debug("[{}][{}] Notification request processing finished in {} ms (sent: {}, errors: {})", ctx.getTenantId(), requestId, time, sent, errors); } else { - log.info("[{}][{}] Notification request processing finished in {} ms (sent: {})", ctx.getTenantId(), requestId, time, sent); + log.debug("[{}][{}] Notification request processing finished in {} ms (sent: {})", ctx.getTenantId(), requestId, time, sent); } updateRequestStats(ctx, requestId, stats); if (callback != null) { From 925b73a7a0b15e536a68b5df9d28d5098bbe2c5b Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 17 Apr 2025 17:51:50 +0300 Subject: [PATCH 08/11] UI: Fixed bottom right connector --- .../system/scada_symbols/bottom-right-elbow-connector-hp.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/data/json/system/scada_symbols/bottom-right-elbow-connector-hp.svg b/application/src/main/data/json/system/scada_symbols/bottom-right-elbow-connector-hp.svg index 37b3a199c6..fa273dc8ec 100644 --- a/application/src/main/data/json/system/scada_symbols/bottom-right-elbow-connector-hp.svg +++ b/application/src/main/data/json/system/scada_symbols/bottom-right-elbow-connector-hp.svg @@ -250,5 +250,5 @@ } ] }]]> - + \ No newline at end of file From 5fbb3194a795cedf55bed183ca09ccf220b8dab8 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 22 Apr 2025 10:46:16 +0300 Subject: [PATCH 09/11] Version 4.0.1-RC --- application/pom.xml | 2 +- .../main/data/upgrade/basic/schema_update.sql | 79 ------------------- .../DefaultDatabaseSchemaSettingsService.java | 2 +- common/actor/pom.xml | 2 +- common/cache/pom.xml | 2 +- common/cluster-api/pom.xml | 2 +- common/coap-server/pom.xml | 2 +- common/dao-api/pom.xml | 2 +- common/data/pom.xml | 2 +- common/edge-api/pom.xml | 2 +- common/edqs/pom.xml | 2 +- common/message/pom.xml | 2 +- common/pom.xml | 2 +- common/proto/pom.xml | 2 +- common/queue/pom.xml | 2 +- common/script/pom.xml | 2 +- common/script/remote-js-client/pom.xml | 2 +- common/script/script-api/pom.xml | 2 +- common/stats/pom.xml | 2 +- common/transport/coap/pom.xml | 2 +- common/transport/http/pom.xml | 2 +- common/transport/lwm2m/pom.xml | 2 +- common/transport/mqtt/pom.xml | 2 +- common/transport/pom.xml | 2 +- common/transport/snmp/pom.xml | 2 +- common/transport/transport-api/pom.xml | 2 +- common/util/pom.xml | 2 +- common/version-control/pom.xml | 2 +- dao/pom.xml | 2 +- edqs/pom.xml | 2 +- monitoring/pom.xml | 2 +- msa/black-box-tests/pom.xml | 2 +- msa/edqs/pom.xml | 2 +- msa/js-executor/package.json | 2 +- msa/js-executor/pom.xml | 2 +- msa/monitoring/pom.xml | 2 +- msa/pom.xml | 2 +- msa/tb-node/pom.xml | 2 +- msa/tb/pom.xml | 2 +- msa/transport/coap/pom.xml | 2 +- msa/transport/http/pom.xml | 2 +- msa/transport/lwm2m/pom.xml | 2 +- msa/transport/mqtt/pom.xml | 2 +- msa/transport/pom.xml | 2 +- msa/transport/snmp/pom.xml | 2 +- msa/vc-executor-docker/pom.xml | 2 +- msa/vc-executor/pom.xml | 2 +- msa/web-ui/package.json | 2 +- msa/web-ui/pom.xml | 2 +- netty-mqtt/pom.xml | 4 +- pom.xml | 2 +- rest-client/pom.xml | 2 +- rule-engine/pom.xml | 2 +- rule-engine/rule-engine-api/pom.xml | 2 +- rule-engine/rule-engine-components/pom.xml | 2 +- tools/pom.xml | 2 +- transport/coap/pom.xml | 2 +- transport/http/pom.xml | 2 +- transport/lwm2m/pom.xml | 2 +- transport/mqtt/pom.xml | 2 +- transport/pom.xml | 2 +- transport/snmp/pom.xml | 2 +- ui-ngx/package.json | 2 +- ui-ngx/pom.xml | 2 +- 64 files changed, 64 insertions(+), 143 deletions(-) diff --git a/application/pom.xml b/application/pom.xml index 7960db3374..2ad4f3a9a6 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard application diff --git a/application/src/main/data/upgrade/basic/schema_update.sql b/application/src/main/data/upgrade/basic/schema_update.sql index e91fbb823c..016e786776 100644 --- a/application/src/main/data/upgrade/basic/schema_update.sql +++ b/application/src/main/data/upgrade/basic/schema_update.sql @@ -14,82 +14,3 @@ -- limitations under the License. -- --- UPDATE SAVE TIME SERIES NODES START - -UPDATE rule_node -SET configuration = ( - (configuration::jsonb - 'skipLatestPersistence') - || jsonb_build_object( - 'processingSettings', jsonb_build_object( - 'type', 'ADVANCED', - 'timeseries', jsonb_build_object('type', 'ON_EVERY_MESSAGE'), - 'latest', jsonb_build_object('type', 'SKIP'), - 'webSockets', jsonb_build_object('type', 'ON_EVERY_MESSAGE'), - 'calculatedFields', jsonb_build_object('type', 'ON_EVERY_MESSAGE') - ) - ) - )::text, - configuration_version = 1 -WHERE type = 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode' - AND configuration_version = 0 - AND configuration::jsonb ->> 'skipLatestPersistence' = 'true'; - -UPDATE rule_node -SET configuration = ( - (configuration::jsonb - 'skipLatestPersistence') - || jsonb_build_object( - 'processingSettings', jsonb_build_object( - 'type', 'ON_EVERY_MESSAGE' - ) - ) - )::text, - configuration_version = 1 -WHERE type = 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode' - AND configuration_version = 0 - AND (configuration::jsonb ->> 'skipLatestPersistence' != 'true' OR configuration::jsonb ->> 'skipLatestPersistence' IS NULL); - --- UPDATE SAVE TIME SERIES NODES END - --- UPDATE SAVE ATTRIBUTES NODES START - -UPDATE rule_node -SET configuration = ( - configuration::jsonb - || jsonb_build_object( - 'processingSettings', jsonb_build_object('type', 'ON_EVERY_MESSAGE') - ) - )::text, - configuration_version = 3 -WHERE type = 'org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode' - AND configuration_version = 2; - --- UPDATE SAVE ATTRIBUTES NODES END - -ALTER TABLE api_usage_state ADD COLUMN IF NOT EXISTS version BIGINT DEFAULT 1; - --- UPDATE TENANT PROFILE CALCULATED FIELD LIMITS START - -UPDATE tenant_profile -SET profile_data = profile_data - || jsonb_build_object( - 'configuration', profile_data->'configuration' || jsonb_build_object( - 'maxCalculatedFieldsPerEntity', COALESCE(profile_data->'configuration'->>'maxCalculatedFieldsPerEntity', '5')::bigint, - 'maxArgumentsPerCF', COALESCE(profile_data->'configuration'->>'maxArgumentsPerCF', '10')::bigint, - 'maxDataPointsPerRollingArg', COALESCE(profile_data->'configuration'->>'maxDataPointsPerRollingArg', '1000')::bigint, - 'maxStateSizeInKBytes', COALESCE(profile_data->'configuration'->>'maxStateSizeInKBytes', '32')::bigint, - 'maxSingleValueArgumentSizeInKBytes', COALESCE(profile_data->'configuration'->>'maxSingleValueArgumentSizeInKBytes', '2')::bigint - ) - ) -WHERE profile_data->'configuration'->>'maxCalculatedFieldsPerEntity' IS NULL; - --- UPDATE TENANT PROFILE CALCULATED FIELD LIMITS END - --- UPDATE TENANT PROFILE DEBUG DURATION START - -UPDATE tenant_profile -SET profile_data = jsonb_set(profile_data, '{configuration,maxDebugModeDurationMinutes}', '15', true) -WHERE - profile_data->'configuration' ? 'maxDebugModeDurationMinutes' = false - OR (profile_data->'configuration'->>'maxDebugModeDurationMinutes')::int = 0; - --- UPDATE TENANT PROFILE DEBUG DURATION END diff --git a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java index a0012a6fb3..328bcf0e66 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java @@ -32,7 +32,7 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti // This list should include all versions which are compatible for the upgrade. // The compatibility cycle usually breaks when we have some scripts written in Java that may not work after new release. - private static final List SUPPORTED_VERSIONS_FOR_UPGRADE = List.of("3.9.0", "3.9.1"); + private static final List SUPPORTED_VERSIONS_FOR_UPGRADE = List.of("3.9.0", "3.9.1", "4.0.0"); private final ProjectInfo projectInfo; private final JdbcTemplate jdbcTemplate; diff --git a/common/actor/pom.xml b/common/actor/pom.xml index 76d000724b..954c44bb41 100644 --- a/common/actor/pom.xml +++ b/common/actor/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/cache/pom.xml b/common/cache/pom.xml index 3d549da8e6..61a1b29b11 100644 --- a/common/cache/pom.xml +++ b/common/cache/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/cluster-api/pom.xml b/common/cluster-api/pom.xml index 722645a0da..ee9c1eae75 100644 --- a/common/cluster-api/pom.xml +++ b/common/cluster-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/coap-server/pom.xml b/common/coap-server/pom.xml index ffe1811b62..2d1a54456f 100644 --- a/common/coap-server/pom.xml +++ b/common/coap-server/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/dao-api/pom.xml b/common/dao-api/pom.xml index 4a11a8a574..d7142e723d 100644 --- a/common/dao-api/pom.xml +++ b/common/dao-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/data/pom.xml b/common/data/pom.xml index 2ece9779b5..21cb05cacd 100644 --- a/common/data/pom.xml +++ b/common/data/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/edge-api/pom.xml b/common/edge-api/pom.xml index 096dd911be..c110d4ac88 100644 --- a/common/edge-api/pom.xml +++ b/common/edge-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/edqs/pom.xml b/common/edqs/pom.xml index 4667b5cbe6..e4aae6d62a 100644 --- a/common/edqs/pom.xml +++ b/common/edqs/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/message/pom.xml b/common/message/pom.xml index d8127f6327..0f1ee39302 100644 --- a/common/message/pom.xml +++ b/common/message/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/pom.xml b/common/pom.xml index aecd6ba841..e205f2d8e2 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard common diff --git a/common/proto/pom.xml b/common/proto/pom.xml index 712807dddb..60443c3b00 100644 --- a/common/proto/pom.xml +++ b/common/proto/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/queue/pom.xml b/common/queue/pom.xml index 0275d71b86..67e325de33 100644 --- a/common/queue/pom.xml +++ b/common/queue/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/script/pom.xml b/common/script/pom.xml index 681750024d..e5bd44f374 100644 --- a/common/script/pom.xml +++ b/common/script/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/script/remote-js-client/pom.xml b/common/script/remote-js-client/pom.xml index c398444fa6..728095e298 100644 --- a/common/script/remote-js-client/pom.xml +++ b/common/script/remote-js-client/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 4.0.0-RC + 4.0.1-RC script org.thingsboard.common.script diff --git a/common/script/script-api/pom.xml b/common/script/script-api/pom.xml index 3655692217..e3ac9d0b8e 100644 --- a/common/script/script-api/pom.xml +++ b/common/script/script-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 4.0.0-RC + 4.0.1-RC script org.thingsboard.common.script diff --git a/common/stats/pom.xml b/common/stats/pom.xml index 5319a40ac1..d89891822d 100644 --- a/common/stats/pom.xml +++ b/common/stats/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/transport/coap/pom.xml b/common/transport/coap/pom.xml index dbfe72c515..4f5c282404 100644 --- a/common/transport/coap/pom.xml +++ b/common/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.common.transport diff --git a/common/transport/http/pom.xml b/common/transport/http/pom.xml index 358ecb72e2..ed1d99600f 100644 --- a/common/transport/http/pom.xml +++ b/common/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.common.transport diff --git a/common/transport/lwm2m/pom.xml b/common/transport/lwm2m/pom.xml index 2100d5db22..f94a53f84f 100644 --- a/common/transport/lwm2m/pom.xml +++ b/common/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.common.transport diff --git a/common/transport/mqtt/pom.xml b/common/transport/mqtt/pom.xml index 735fe9a2d2..65a2d7d35f 100644 --- a/common/transport/mqtt/pom.xml +++ b/common/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.common.transport diff --git a/common/transport/pom.xml b/common/transport/pom.xml index 2ee0f4f3c8..0f49cd471d 100644 --- a/common/transport/pom.xml +++ b/common/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/transport/snmp/pom.xml b/common/transport/snmp/pom.xml index 48a23b4e91..b428548b3f 100644 --- a/common/transport/snmp/pom.xml +++ b/common/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard.common - 4.0.0-RC + 4.0.1-RC transport diff --git a/common/transport/transport-api/pom.xml b/common/transport/transport-api/pom.xml index a671358581..217b2edfb7 100644 --- a/common/transport/transport-api/pom.xml +++ b/common/transport/transport-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.common.transport diff --git a/common/util/pom.xml b/common/util/pom.xml index 7fdd3036ae..4865eeb131 100644 --- a/common/util/pom.xml +++ b/common/util/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/common/version-control/pom.xml b/common/version-control/pom.xml index 8fc4cb2566..9552ad511c 100644 --- a/common/version-control/pom.xml +++ b/common/version-control/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC common org.thingsboard.common diff --git a/dao/pom.xml b/dao/pom.xml index 0bc6541ac1..f203343c89 100644 --- a/dao/pom.xml +++ b/dao/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard dao diff --git a/edqs/pom.xml b/edqs/pom.xml index 5a70f8d0b0..08928983f5 100644 --- a/edqs/pom.xml +++ b/edqs/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard edqs diff --git a/monitoring/pom.xml b/monitoring/pom.xml index f89a57e477..4f59cbc975 100644 --- a/monitoring/pom.xml +++ b/monitoring/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard diff --git a/msa/black-box-tests/pom.xml b/msa/black-box-tests/pom.xml index 424891328e..0af821a193 100644 --- a/msa/black-box-tests/pom.xml +++ b/msa/black-box-tests/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/edqs/pom.xml b/msa/edqs/pom.xml index b790cc0802..d4a4c5644a 100644 --- a/msa/edqs/pom.xml +++ b/msa/edqs/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/js-executor/package.json b/msa/js-executor/package.json index 350d6029f0..af8379d6c9 100644 --- a/msa/js-executor/package.json +++ b/msa/js-executor/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-js-executor", "private": true, - "version": "4.0.0", + "version": "4.0.1", "description": "ThingsBoard JavaScript Executor Microservice", "main": "server.ts", "bin": "server.js", diff --git a/msa/js-executor/pom.xml b/msa/js-executor/pom.xml index 22e553fbb3..b49058eeb6 100644 --- a/msa/js-executor/pom.xml +++ b/msa/js-executor/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/monitoring/pom.xml b/msa/monitoring/pom.xml index a1208a6258..76f1a9e2b3 100644 --- a/msa/monitoring/pom.xml +++ b/msa/monitoring/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa diff --git a/msa/pom.xml b/msa/pom.xml index ce8b422d05..990679abc6 100644 --- a/msa/pom.xml +++ b/msa/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard msa diff --git a/msa/tb-node/pom.xml b/msa/tb-node/pom.xml index 346776698a..bd85c2d4f5 100644 --- a/msa/tb-node/pom.xml +++ b/msa/tb-node/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/tb/pom.xml b/msa/tb/pom.xml index ad3ec5f7c2..722eb9277e 100644 --- a/msa/tb/pom.xml +++ b/msa/tb/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/transport/coap/pom.xml b/msa/transport/coap/pom.xml index e3f51c2044..91b0aebca2 100644 --- a/msa/transport/coap/pom.xml +++ b/msa/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.msa.transport diff --git a/msa/transport/http/pom.xml b/msa/transport/http/pom.xml index 193d2e28d1..41e0421bc5 100644 --- a/msa/transport/http/pom.xml +++ b/msa/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.msa.transport diff --git a/msa/transport/lwm2m/pom.xml b/msa/transport/lwm2m/pom.xml index 1722cb906e..4fcf3fce88 100644 --- a/msa/transport/lwm2m/pom.xml +++ b/msa/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.msa.transport diff --git a/msa/transport/mqtt/pom.xml b/msa/transport/mqtt/pom.xml index c03c22eef3..8565872262 100644 --- a/msa/transport/mqtt/pom.xml +++ b/msa/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.msa.transport diff --git a/msa/transport/pom.xml b/msa/transport/pom.xml index 4d9e341369..46a21e7693 100644 --- a/msa/transport/pom.xml +++ b/msa/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/transport/snmp/pom.xml b/msa/transport/snmp/pom.xml index 21e1d3c5d0..c2bd11cf96 100644 --- a/msa/transport/snmp/pom.xml +++ b/msa/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard.msa transport - 4.0.0-RC + 4.0.1-RC org.thingsboard.msa.transport diff --git a/msa/vc-executor-docker/pom.xml b/msa/vc-executor-docker/pom.xml index 509807600f..6e112dd98a 100644 --- a/msa/vc-executor-docker/pom.xml +++ b/msa/vc-executor-docker/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/vc-executor/pom.xml b/msa/vc-executor/pom.xml index 8a3d922269..ffdfc00997 100644 --- a/msa/vc-executor/pom.xml +++ b/msa/vc-executor/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/msa/web-ui/package.json b/msa/web-ui/package.json index 3374112096..b356dee826 100644 --- a/msa/web-ui/package.json +++ b/msa/web-ui/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-web-ui", "private": true, - "version": "4.0.0", + "version": "4.0.1", "description": "ThingsBoard Web UI Microservice", "main": "server.ts", "bin": "server.js", diff --git a/msa/web-ui/pom.xml b/msa/web-ui/pom.xml index c7e4e3adf4..963dc710ed 100644 --- a/msa/web-ui/pom.xml +++ b/msa/web-ui/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC msa org.thingsboard.msa diff --git a/netty-mqtt/pom.xml b/netty-mqtt/pom.xml index b5fd83a54f..7e0a00eee6 100644 --- a/netty-mqtt/pom.xml +++ b/netty-mqtt/pom.xml @@ -19,11 +19,11 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard netty-mqtt - 4.0.0-RC + 4.0.1-RC jar Netty MQTT Client diff --git a/pom.xml b/pom.xml index b25c355934..6d7981ccbb 100755 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard thingsboard - 4.0.0-RC + 4.0.1-RC pom Thingsboard diff --git a/rest-client/pom.xml b/rest-client/pom.xml index fd96de9f70..c4e4c94236 100644 --- a/rest-client/pom.xml +++ b/rest-client/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard rest-client diff --git a/rule-engine/pom.xml b/rule-engine/pom.xml index 8a4fbf7601..9f3dc788b6 100644 --- a/rule-engine/pom.xml +++ b/rule-engine/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard rule-engine diff --git a/rule-engine/rule-engine-api/pom.xml b/rule-engine/rule-engine-api/pom.xml index 6993789e0f..2348cdcd34 100644 --- a/rule-engine/rule-engine-api/pom.xml +++ b/rule-engine/rule-engine-api/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC rule-engine org.thingsboard.rule-engine diff --git a/rule-engine/rule-engine-components/pom.xml b/rule-engine/rule-engine-components/pom.xml index 7ee5ab1496..008c422dbf 100644 --- a/rule-engine/rule-engine-components/pom.xml +++ b/rule-engine/rule-engine-components/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC rule-engine org.thingsboard.rule-engine diff --git a/tools/pom.xml b/tools/pom.xml index bc8e748c6e..0286c135e4 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard tools diff --git a/transport/coap/pom.xml b/transport/coap/pom.xml index 0c6de9ea4e..e883486767 100644 --- a/transport/coap/pom.xml +++ b/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.transport diff --git a/transport/http/pom.xml b/transport/http/pom.xml index 226bab23b3..67e5e43b60 100644 --- a/transport/http/pom.xml +++ b/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.transport diff --git a/transport/lwm2m/pom.xml b/transport/lwm2m/pom.xml index 6f24b35684..cc9eb45961 100644 --- a/transport/lwm2m/pom.xml +++ b/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.transport diff --git a/transport/mqtt/pom.xml b/transport/mqtt/pom.xml index 4d92c1f0e6..d31e27486e 100644 --- a/transport/mqtt/pom.xml +++ b/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC transport org.thingsboard.transport diff --git a/transport/pom.xml b/transport/pom.xml index 8be6fff261..ea7b65e918 100644 --- a/transport/pom.xml +++ b/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard transport diff --git a/transport/snmp/pom.xml b/transport/snmp/pom.xml index 62e1f753e5..da9486c4d0 100644 --- a/transport/snmp/pom.xml +++ b/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 4.0.0-RC + 4.0.1-RC transport diff --git a/ui-ngx/package.json b/ui-ngx/package.json index e927abe7b2..cc790a5eb5 100644 --- a/ui-ngx/package.json +++ b/ui-ngx/package.json @@ -1,6 +1,6 @@ { "name": "thingsboard", - "version": "4.0.0", + "version": "4.0.1", "scripts": { "ng": "ng", "start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --configuration development --host 0.0.0.0 --open", diff --git a/ui-ngx/pom.xml b/ui-ngx/pom.xml index c6e5018d46..f595a8572a 100644 --- a/ui-ngx/pom.xml +++ b/ui-ngx/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 4.0.0-RC + 4.0.1-RC thingsboard org.thingsboard From 84b102bb21c28d4b2e8af616944c59c6adb02200 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 22 Apr 2025 10:52:44 +0300 Subject: [PATCH 10/11] Update supported versions for upgrade --- .../service/install/DefaultDatabaseSchemaSettingsService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java index 328bcf0e66..6575c4b766 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java @@ -32,7 +32,7 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti // This list should include all versions which are compatible for the upgrade. // The compatibility cycle usually breaks when we have some scripts written in Java that may not work after new release. - private static final List SUPPORTED_VERSIONS_FOR_UPGRADE = List.of("3.9.0", "3.9.1", "4.0.0"); + private static final List SUPPORTED_VERSIONS_FOR_UPGRADE = List.of("4.0.0"); private final ProjectInfo projectInfo; private final JdbcTemplate jdbcTemplate; From d6fb28ebd7bf37735de6836f857447725f2b5725 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 22 Apr 2025 11:12:44 +0300 Subject: [PATCH 11/11] Revert upgrade scripts --- .../main/data/upgrade/basic/schema_update.sql | 79 +++++++++++++++++++ .../DefaultDatabaseSchemaSettingsService.java | 2 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/application/src/main/data/upgrade/basic/schema_update.sql b/application/src/main/data/upgrade/basic/schema_update.sql index 016e786776..7cac30d9ff 100644 --- a/application/src/main/data/upgrade/basic/schema_update.sql +++ b/application/src/main/data/upgrade/basic/schema_update.sql @@ -14,3 +14,82 @@ -- limitations under the License. -- +-- UPDATE SAVE TIME SERIES NODES START + +UPDATE rule_node +SET configuration = ( + (configuration::jsonb - 'skipLatestPersistence') + || jsonb_build_object( + 'processingSettings', jsonb_build_object( + 'type', 'ADVANCED', + 'timeseries', jsonb_build_object('type', 'ON_EVERY_MESSAGE'), + 'latest', jsonb_build_object('type', 'SKIP'), + 'webSockets', jsonb_build_object('type', 'ON_EVERY_MESSAGE'), + 'calculatedFields', jsonb_build_object('type', 'ON_EVERY_MESSAGE') + ) + ) + )::text, + configuration_version = 1 +WHERE type = 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode' + AND configuration_version = 0 + AND configuration::jsonb ->> 'skipLatestPersistence' = 'true'; + +UPDATE rule_node +SET configuration = ( + (configuration::jsonb - 'skipLatestPersistence') + || jsonb_build_object( + 'processingSettings', jsonb_build_object( + 'type', 'ON_EVERY_MESSAGE' + ) + ) + )::text, + configuration_version = 1 +WHERE type = 'org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode' + AND configuration_version = 0 + AND (configuration::jsonb ->> 'skipLatestPersistence' != 'true' OR configuration::jsonb ->> 'skipLatestPersistence' IS NULL); + +-- UPDATE SAVE TIME SERIES NODES END + +-- UPDATE SAVE ATTRIBUTES NODES START + +UPDATE rule_node +SET configuration = ( + configuration::jsonb + || jsonb_build_object( + 'processingSettings', jsonb_build_object('type', 'ON_EVERY_MESSAGE') + ) + )::text, + configuration_version = 3 +WHERE type = 'org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode' + AND configuration_version = 2; + +-- UPDATE SAVE ATTRIBUTES NODES END + +ALTER TABLE api_usage_state ADD COLUMN IF NOT EXISTS version BIGINT DEFAULT 1; + +-- UPDATE TENANT PROFILE CALCULATED FIELD LIMITS START + +UPDATE tenant_profile +SET profile_data = profile_data + || jsonb_build_object( + 'configuration', profile_data->'configuration' || jsonb_build_object( + 'maxCalculatedFieldsPerEntity', COALESCE(profile_data->'configuration'->>'maxCalculatedFieldsPerEntity', '5')::bigint, + 'maxArgumentsPerCF', COALESCE(profile_data->'configuration'->>'maxArgumentsPerCF', '10')::bigint, + 'maxDataPointsPerRollingArg', COALESCE(profile_data->'configuration'->>'maxDataPointsPerRollingArg', '1000')::bigint, + 'maxStateSizeInKBytes', COALESCE(profile_data->'configuration'->>'maxStateSizeInKBytes', '32')::bigint, + 'maxSingleValueArgumentSizeInKBytes', COALESCE(profile_data->'configuration'->>'maxSingleValueArgumentSizeInKBytes', '2')::bigint + ) + ) +WHERE profile_data->'configuration'->>'maxCalculatedFieldsPerEntity' IS NULL; + +-- UPDATE TENANT PROFILE CALCULATED FIELD LIMITS END + +-- UPDATE TENANT PROFILE DEBUG DURATION START + +UPDATE tenant_profile +SET profile_data = jsonb_set(profile_data, '{configuration,maxDebugModeDurationMinutes}', '15', true) +WHERE + profile_data->'configuration' ? 'maxDebugModeDurationMinutes' = false + OR (profile_data->'configuration'->>'maxDebugModeDurationMinutes')::int = 0; + +-- UPDATE TENANT PROFILE DEBUG DURATION END diff --git a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java index 6575c4b766..328bcf0e66 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java @@ -32,7 +32,7 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti // This list should include all versions which are compatible for the upgrade. // The compatibility cycle usually breaks when we have some scripts written in Java that may not work after new release. - private static final List SUPPORTED_VERSIONS_FOR_UPGRADE = List.of("4.0.0"); + private static final List SUPPORTED_VERSIONS_FOR_UPGRADE = List.of("3.9.0", "3.9.1", "4.0.0"); private final ProjectInfo projectInfo; private final JdbcTemplate jdbcTemplate;