From 5580b1795371990c985c94623fbdeee3f80e775c Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Mon, 19 Dec 2022 23:22:11 +0200 Subject: [PATCH 01/16] Correctly set root rule chain on initial sync --- .../edge/rpc/fetch/RuleChainsEdgeEventFetcher.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/RuleChainsEdgeEventFetcher.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/RuleChainsEdgeEventFetcher.java index 8d2a8adc51..91f453d3de 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/RuleChainsEdgeEventFetcher.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/RuleChainsEdgeEventFetcher.java @@ -15,8 +15,10 @@ */ package org.thingsboard.server.service.edge.rpc.fetch; +import com.fasterxml.jackson.databind.node.ObjectNode; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.thingsboard.common.util.JacksonUtil; import org.thingsboard.server.common.data.EdgeUtils; import org.thingsboard.server.common.data.edge.Edge; import org.thingsboard.server.common.data.edge.EdgeEvent; @@ -28,6 +30,8 @@ import org.thingsboard.server.common.data.page.PageLink; import org.thingsboard.server.common.data.rule.RuleChain; import org.thingsboard.server.dao.rule.RuleChainService; +import static org.thingsboard.server.service.edge.DefaultEdgeNotificationService.EDGE_IS_ROOT_BODY_KEY; + @Slf4j @AllArgsConstructor public class RuleChainsEdgeEventFetcher extends BasePageableEdgeEventFetcher { @@ -41,7 +45,13 @@ public class RuleChainsEdgeEventFetcher extends BasePageableEdgeEventFetcher Date: Tue, 27 Dec 2022 12:43:07 +0200 Subject: [PATCH 02/16] Remove dashboard-select component from the DOM-structure when it is hedden --- .../components/dashboard-page/dashboard-page.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index ca1bae3de7..692d67e292 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -135,7 +135,7 @@ (click)="openDashboardSettings($event)"> settings - Date: Tue, 27 Dec 2022 15:32:47 +0200 Subject: [PATCH 03/16] Get currentEntity data from stateParams instead doing find-request --- ui-ngx/src/app/core/http/entity.service.ts | 34 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts index b66399de6c..2493b11a64 100644 --- a/ui-ngx/src/app/core/http/entity.service.ts +++ b/ui-ngx/src/app/core/http/entity.service.ts @@ -869,8 +869,38 @@ export class EntityService { }; aliasInfo.currentEntity = null; if (!aliasInfo.resolveMultiple && aliasInfo.entityFilter) { - return this.findSingleEntityInfoByEntityFilter(aliasInfo.entityFilter, - {ignoreLoading: true, ignoreErrors: true}).pipe( + let entityInfoObservable: Observable; + if (result.stateEntity && aliasInfo.entityFilter.type === AliasFilterType.singleEntity) { + let currentEntity: EntityInfo = null; + if (stateParams) { + if (result.entityParamName && result.entityParamName.length) { + const stateEntity = stateParams[result.entityParamName]; + if (stateEntity) { + currentEntity = { + id: stateEntity.entityId.id, + entityType: stateEntity.entityId.entityType, + name: stateEntity.entityName, + label: stateEntity.entityLabel + }; + } + } else { + if (stateParams.entityId) { + currentEntity = { + id: stateParams.entityId.id, + entityType: stateParams.entityId.entityType as EntityType, + name: stateParams.entityName, + label: stateParams.entityLabel + }; + } + } + } + entityInfoObservable = currentEntity ? of(currentEntity) : this.findSingleEntityInfoByEntityFilter(aliasInfo.entityFilter, + {ignoreLoading: true, ignoreErrors: true}); + } else { + entityInfoObservable = this.findSingleEntityInfoByEntityFilter(aliasInfo.entityFilter, + {ignoreLoading: true, ignoreErrors: true}); + } + return entityInfoObservable.pipe( map((entity) => { aliasInfo.currentEntity = entity; return aliasInfo; From bcb1601e59bf912f0742b47e3bf318d83d117990 Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Tue, 27 Dec 2022 18:09:34 +0200 Subject: [PATCH 04/16] Set default edge root rule chain during creation --- .../server/service/entitiy/edge/DefaultTbEdgeService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/src/main/java/org/thingsboard/server/service/entitiy/edge/DefaultTbEdgeService.java b/application/src/main/java/org/thingsboard/server/service/entitiy/edge/DefaultTbEdgeService.java index 697fe35a42..b3b70a174e 100644 --- a/application/src/main/java/org/thingsboard/server/service/entitiy/edge/DefaultTbEdgeService.java +++ b/application/src/main/java/org/thingsboard/server/service/entitiy/edge/DefaultTbEdgeService.java @@ -48,6 +48,9 @@ public class DefaultTbEdgeService extends AbstractTbEntityService implements TbE ActionType actionType = edge.getId() == null ? ActionType.ADDED : ActionType.UPDATED; TenantId tenantId = edge.getTenantId(); try { + if (actionType == ActionType.ADDED && edge.getRootRuleChainId() == null) { + edge.setRootRuleChainId(edgeTemplateRootRuleChain.getId()); + } Edge savedEdge = checkNotNull(edgeService.saveEdge(edge)); EdgeId edgeId = savedEdge.getId(); From 51a3620b11ef6fe6dd1baf5e12f934a686fd4f29 Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Tue, 27 Dec 2022 18:22:28 +0200 Subject: [PATCH 05/16] Edge sync test - add check for rule chain msg is root --- .../server/controller/BaseEdgeControllerTest.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/application/src/test/java/org/thingsboard/server/controller/BaseEdgeControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/BaseEdgeControllerTest.java index fa466ce93f..9106b5d824 100644 --- a/application/src/test/java/org/thingsboard/server/controller/BaseEdgeControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/BaseEdgeControllerTest.java @@ -825,26 +825,30 @@ public abstract class BaseEdgeControllerTest extends AbstractControllerTest { assertThat(edgeImitator.waitForMessages()).as("await for messages on first connect").isTrue(); assertThat(edgeImitator.findAllMessagesByType(QueueUpdateMsg.class)).as("one msg during sync process").hasSize(1); - assertThat(edgeImitator.findAllMessagesByType(RuleChainUpdateMsg.class)).as("one msg during sync process, another from edge creation").hasSize(2); + List ruleChainUpdateMsgs = edgeImitator.findAllMessagesByType(RuleChainUpdateMsg.class); + assertThat(ruleChainUpdateMsgs).as("one msg during sync process, another from edge creation").hasSize(2); assertThat(edgeImitator.findAllMessagesByType(DeviceProfileUpdateMsg.class)).as("one msg during sync process for 'default' device profile").hasSize(3); assertThat(edgeImitator.findAllMessagesByType(DeviceUpdateMsg.class)).as("one msg once device assigned to edge").hasSize(2); assertThat(edgeImitator.findAllMessagesByType(AssetProfileUpdateMsg.class)).as("two msgs during sync process for 'default' and 'test' asset profiles").hasSize(4); assertThat(edgeImitator.findAllMessagesByType(AssetUpdateMsg.class)).as("two msgs - one during sync process, and one more once asset assigned to edge").hasSize(2); assertThat(edgeImitator.findAllMessagesByType(UserUpdateMsg.class)).as("one msg during sync process for tenant admin user").hasSize(1); assertThat(edgeImitator.findAllMessagesByType(AdminSettingsUpdateMsg.class)).as("admin setting update").hasSize(4); + verifyRuleChainMsgsAreRoot(ruleChainUpdateMsgs); edgeImitator.expectMessageAmount(14); doPost("/api/edge/sync/" + edge.getId()); assertThat(edgeImitator.waitForMessages()).as("await for messages after edge sync rest api call").isTrue(); assertThat(edgeImitator.findAllMessagesByType(QueueUpdateMsg.class)).as("queue msg").hasSize(1); - assertThat(edgeImitator.findAllMessagesByType(RuleChainUpdateMsg.class)).as("rule chain msg").hasSize(1); + ruleChainUpdateMsgs = edgeImitator.findAllMessagesByType(RuleChainUpdateMsg.class); + assertThat(ruleChainUpdateMsgs).as("rule chain msg").hasSize(1); assertThat(edgeImitator.findAllMessagesByType(DeviceProfileUpdateMsg.class)).as("device profile msg").hasSize(2); assertThat(edgeImitator.findAllMessagesByType(AssetProfileUpdateMsg.class)).as("asset profile msg").hasSize(3); assertThat(edgeImitator.findAllMessagesByType(AssetUpdateMsg.class)).as("asset update msg").hasSize(1); assertThat(edgeImitator.findAllMessagesByType(UserUpdateMsg.class)).as("user update msg").hasSize(1); assertThat(edgeImitator.findAllMessagesByType(AdminSettingsUpdateMsg.class)).as("admin setting update msg").hasSize(4); assertThat(edgeImitator.findAllMessagesByType(DeviceUpdateMsg.class)).as("asset update msg").hasSize(1); + verifyRuleChainMsgsAreRoot(ruleChainUpdateMsgs); edgeImitator.allowIgnoredTypes(); try { @@ -860,6 +864,12 @@ public abstract class BaseEdgeControllerTest extends AbstractControllerTest { .andExpect(status().isOk()); } + private void verifyRuleChainMsgsAreRoot(List ruleChainUpdateMsgs) { + for (RuleChainUpdateMsg ruleChainUpdateMsg : ruleChainUpdateMsgs) { + Assert.assertTrue(ruleChainUpdateMsg.getRoot()); + } + } + @Test public void testDeleteEdgeWithDeleteRelationsOk() throws Exception { EdgeId edgeId = savedEdge("Edge for Test WithRelationsOk").getId(); From 2b0fa4c47850036abddec2e0e59b7cf74191478a Mon Sep 17 00:00:00 2001 From: Tarnavskiy Date: Tue, 27 Dec 2022 19:16:23 +0200 Subject: [PATCH 06/16] Solved issue of a re-init Widget-Component service and widgets-info Cache. --- .../dashboard-page.component.ts | 6 +++- .../home/components/home-components.module.ts | 2 -- .../widget/widget-component.service.ts | 31 +++++++++++-------- .../components/widget/widget.component.ts | 7 +++-- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index 04cc676d95..b9ce6e977b 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -30,6 +30,7 @@ import { Optional, Renderer2, StaticProvider, + Type, ViewChild, ViewContainerRef, ViewEncapsulation @@ -148,6 +149,7 @@ import { TbPopoverService } from '@shared/components/popover.service'; import { tap } from 'rxjs/operators'; import { LayoutFixedSize, LayoutWidthType } from '@home/components/dashboard-page/layout/layout.models'; import { TbPopoverComponent } from '@shared/components/popover.component'; +import { HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens'; // @dynamic @Component({ @@ -331,6 +333,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC constructor(protected store: Store, @Inject(WINDOW) private window: Window, @Inject(DOCUMENT) private document: Document, + @Inject(HOME_COMPONENTS_MODULE_TOKEN) private homeComponentsModule: Type, private breakpointObserver: BreakpointObserver, private route: ActivatedRoute, private router: Router, @@ -1112,7 +1115,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC addWidgetFromType(widget: WidgetInfo) { this.onAddWidgetClosed(); this.searchBundle = ''; - this.widgetComponentService.getWidgetInfo(widget.bundleAlias, widget.typeAlias, widget.isSystemType).subscribe( + this.widgetComponentService.getWidgetInfo(widget.bundleAlias, widget.typeAlias, widget.isSystemType, + [this.homeComponentsModule]).subscribe( (widgetTypeInfo) => { const config: WidgetConfig = JSON.parse(widgetTypeInfo.defaultConfig); config.title = 'New ' + widgetTypeInfo.widgetName; diff --git a/ui-ngx/src/app/modules/home/components/home-components.module.ts b/ui-ngx/src/app/modules/home/components/home-components.module.ts index 7cfcf269de..669fde14ff 100644 --- a/ui-ngx/src/app/modules/home/components/home-components.module.ts +++ b/ui-ngx/src/app/modules/home/components/home-components.module.ts @@ -35,7 +35,6 @@ import { AddAttributeDialogComponent } from '@home/components/attribute/add-attr import { EditAttributeValuePanelComponent } from '@home/components/attribute/edit-attribute-value-panel.component'; import { DashboardComponent } from '@home/components/dashboard/dashboard.component'; import { WidgetComponent } from '@home/components/widget/widget.component'; -import { WidgetComponentService } from '@home/components/widget/widget-component.service'; import { LegendComponent } from '@home/components/widget/legend.component'; import { AliasesEntitySelectPanelComponent } from '@home/components/alias/aliases-entity-select-panel.component'; import { AliasesEntitySelectComponent } from '@home/components/alias/aliases-entity-select.component'; @@ -456,7 +455,6 @@ import { AssetProfileAutocompleteComponent } from '@home/components/profile/asse RateLimitsDetailsDialogComponent ], providers: [ - WidgetComponentService, CustomDialogService, ImportExportService, {provide: EMBED_DASHBOARD_DIALOG_TOKEN, useValue: EmbedDashboardDialogComponent}, diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts index 38b14fe485..9a4f941211 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts @@ -45,13 +45,13 @@ import { MODULES_MAP } from '@shared/public-api'; import * as tinycolor_ from 'tinycolor2'; import moment from 'moment'; import { IModulesMap } from '@modules/common/modules-map.models'; -import { HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens'; import { widgetSettingsComponentsMap } from '@home/components/widget/lib/settings/widget-settings.module'; const tinycolor = tinycolor_; -// @dynamic -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class WidgetComponentService { private cssParser = new cssjs(); @@ -68,7 +68,6 @@ export class WidgetComponentService { constructor(@Inject(WINDOW) private window: Window, @Optional() @Inject(MODULES_MAP) private modulesMap: IModulesMap, - @Inject(HOME_COMPONENTS_MODULE_TOKEN) private homeComponentsModule: Type, private dynamicComponentFactoryService: DynamicComponentFactoryService, private widgetService: WidgetService, private utils: UtilsService, @@ -185,9 +184,9 @@ export class WidgetComponentService { () => { const loadDefaultWidgetInfoTasks = [ this.loadWidgetResources(this.missingWidgetType, 'global-widget-missing-type', - [SharedModule, WidgetComponentsModule, this.homeComponentsModule]), + [SharedModule, WidgetComponentsModule]), this.loadWidgetResources(this.errorWidgetType, 'global-widget-error-type', - [SharedModule, WidgetComponentsModule, this.homeComponentsModule]), + [SharedModule, WidgetComponentsModule]), ]; forkJoin(loadDefaultWidgetInfoTasks).subscribe( () => { @@ -231,13 +230,14 @@ export class WidgetComponentService { } } - public getWidgetInfo(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): Observable { + public getWidgetInfo(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean, modules?: Type[]): Observable { return this.init().pipe( - mergeMap(() => this.getWidgetInfoInternal(bundleAlias, widgetTypeAlias, isSystem)) + mergeMap(() => this.getWidgetInfoInternal(bundleAlias, widgetTypeAlias, isSystem, modules)) ); } - private getWidgetInfoInternal(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): Observable { + private getWidgetInfoInternal(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean, + modules?: Type[]): Observable { const widgetInfoSubject = new ReplaySubject(); const widgetInfo = this.getWidgetInfoFromCache(bundleAlias, widgetTypeAlias, isSystem); if (widgetInfo) { @@ -245,7 +245,7 @@ export class WidgetComponentService { widgetInfoSubject.complete(); } else { if (this.utils.widgetEditMode) { - this.loadWidget(this.editingWidgetType, bundleAlias, isSystem, widgetInfoSubject); + this.loadWidget(this.editingWidgetType, bundleAlias, isSystem, widgetInfoSubject, modules); } else { const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); let fetchQueue = this.widgetsInfoFetchQueue.get(key); @@ -256,7 +256,7 @@ export class WidgetComponentService { this.widgetsInfoFetchQueue.set(key, fetchQueue); this.widgetService.getWidgetType(bundleAlias, widgetTypeAlias, isSystem, {ignoreErrors: true}).subscribe( (widgetType) => { - this.loadWidget(widgetType, bundleAlias, isSystem, widgetInfoSubject); + this.loadWidget(widgetType, bundleAlias, isSystem, widgetInfoSubject, modules); }, () => { widgetInfoSubject.next(this.missingWidgetType); @@ -270,7 +270,8 @@ export class WidgetComponentService { return widgetInfoSubject.asObservable(); } - private loadWidget(widgetType: WidgetType, bundleAlias: string, isSystem: boolean, widgetInfoSubject: Subject) { + private loadWidget(widgetType: WidgetType, bundleAlias: string, isSystem: boolean, widgetInfoSubject: Subject, + modules?: Type[]) { const widgetInfo = toWidgetInfo(widgetType); const key = this.createWidgetInfoCacheKey(bundleAlias, widgetInfo.alias, isSystem); let widgetControllerDescriptor: WidgetControllerDescriptor = null; @@ -283,7 +284,11 @@ export class WidgetComponentService { } if (widgetControllerDescriptor) { const widgetNamespace = `widget-type-${(isSystem ? 'sys-' : '')}${bundleAlias}-${widgetInfo.alias}`; - this.loadWidgetResources(widgetInfo, widgetNamespace, [SharedModule, WidgetComponentsModule, this.homeComponentsModule]).subscribe( + const widgetModules = [SharedModule, WidgetComponentsModule]; + if (modules) { + widgetModules.push(...modules); + } + this.loadWidgetResources(widgetInfo, widgetNamespace, widgetModules).subscribe( () => { if (widgetControllerDescriptor.settingsSchema) { widgetInfo.typeSettingsSchema = widgetControllerDescriptor.settingsSchema; diff --git a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts index baa0664a31..cfb95ef97a 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts @@ -31,6 +31,7 @@ import { OnInit, Renderer2, SimpleChanges, + Type, ViewChild, ViewContainerRef, ViewEncapsulation @@ -114,7 +115,7 @@ import { MobileService } from '@core/services/mobile.service'; import { DialogService } from '@core/services/dialog.service'; import { PopoverPlacement } from '@shared/components/popover.models'; import { TbPopoverService } from '@shared/components/popover.service'; -import { DASHBOARD_PAGE_COMPONENT_TOKEN } from '@home/components/tokens'; +import { DASHBOARD_PAGE_COMPONENT_TOKEN, HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens'; @Component({ selector: 'tb-widget', @@ -190,6 +191,7 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI private popoverService: TbPopoverService, @Inject(EMBED_DASHBOARD_DIALOG_TOKEN) private embedDashboardDialogComponent: ComponentType, @Inject(DASHBOARD_PAGE_COMPONENT_TOKEN) private dashboardPageComponent: ComponentType, + @Inject(HOME_COMPONENTS_MODULE_TOKEN) private homeComponentsModule: Type, private widgetService: WidgetService, private resources: ResourcesService, private timeService: TimeService, @@ -354,7 +356,8 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI this.subscriptionContext.widgetUtils = this.widgetContext.utils; this.subscriptionContext.getServerTimeDiff = this.dashboardService.getServerTimeDiff.bind(this.dashboardService); - this.widgetComponentService.getWidgetInfo(this.widget.bundleAlias, this.widget.typeAlias, this.widget.isSystemType).subscribe( + this.widgetComponentService.getWidgetInfo(this.widget.bundleAlias, this.widget.typeAlias, this.widget.isSystemType, + [this.homeComponentsModule]).subscribe( (widgetInfo) => { this.widgetInfo = widgetInfo; this.loadFromWidgetInfo(); From 16eb835d46708c97a1a506f3acb9bc8f51bb13c8 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 28 Dec 2022 12:22:04 +0200 Subject: [PATCH 07/16] UI: Fixed incorrect calculate width when used right layout dashboard --- .../dashboard-page.component.html | 10 +-- .../dashboard-page.component.ts | 66 +++++++++++++------ 2 files changed, 50 insertions(+), 26 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index ca1bae3de7..5fcce69f76 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -168,9 +168,9 @@ [ngClass]="{ 'tb-shrinked' : isEditingWidget }"> + [ngStyle]="{width: mainLayoutSize.width, + height: mainLayoutSize.height}"> this.dashboard, @@ -402,6 +409,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC .observe(MediaBreakpoints['gt-sm']) .subscribe((state: BreakpointState) => { this.isMobile = !state.matches; + this.updateLayoutSizes(); } )); if (this.isMobileApp && this.syncStateWithQueryParam) { @@ -414,6 +422,13 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC } } + ngAfterViewInit() { + this.dashboardResize$ = new ResizeObserver(() => { + this.updateLayoutSizes(); + }); + this.dashboardResize$.observe(this.dashboardContainer.nativeElement); + } + private init(data: DashboardPageInitData) { this.reset(); @@ -537,6 +552,9 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC subscription.unsubscribe(); }); this.rxSubscriptions.length = 0; + if (this.dashboardResize$) { + this.dashboardResize$.disconnect(); + } } public runChangeDetection() { @@ -672,34 +690,45 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC public toggleLayouts() { this.isRightLayoutOpened = !this.isRightLayoutOpened; this.mobileService.onDashboardRightLayoutChanged(this.isRightLayoutOpened); + this.updateLayoutSizes(); } public openRightLayout() { this.isRightLayoutOpened = true; this.mobileService.onDashboardRightLayoutChanged(this.isRightLayoutOpened); + this.updateLayoutSizes(); } - public mainLayoutWidth(): string { + private updateLayoutSizes() { + if (this.dashboardCtx.state) { + this.updateMainLayoutSize(); + this.updateRightLayoutSize(); + } + } + + private updateMainLayoutSize() { if (this.isEditingWidget && this.editingLayoutCtx.id === 'main') { - return '100%'; + this.mainLayoutSize.width = '100%'; } else { - return this.layouts.right.show && !this.isMobile ? this.calculateWidth('main') : '100%'; + this.mainLayoutSize.width = this.layouts.right.show && !this.isMobile ? this.calculateWidth('main') : '100%'; } - } - - public mainLayoutHeight(): string { if (!this.isEditingWidget || this.editingLayoutCtx.id === 'main') { - return '100%'; + this.mainLayoutSize.height = '100%'; } else { - return '0px'; + this.mainLayoutSize.height = '0px'; } } - public rightLayoutWidth(): string { + private updateRightLayoutSize() { if (this.isEditingWidget && this.editingLayoutCtx.id === 'right') { - return '100%'; + this.rightLayoutSize.width = '100%'; } else { - return this.isMobile ? '100%' : this.calculateWidth('right'); + this.rightLayoutSize.width = this.isMobile ? '100%' : this.calculateWidth('right'); + } + if (!this.isEditingWidget || this.editingLayoutCtx.id === 'right') { + this.rightLayoutSize.height = '100%'; + } else { + this.rightLayoutSize.height = '0px'; } } @@ -743,14 +772,6 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC } } - public rightLayoutHeight(): string { - if (!this.isEditingWidget || this.editingLayoutCtx.id === 'right') { - return '100%'; - } else { - return '0px'; - } - } - public isPublicUser(): boolean { return this.authUser.isPublic; } @@ -977,6 +998,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC layout.layoutCtx.ctrl.reload(); } layout.layoutCtx.ignoreLoading = true; + this.updateLayoutSizes(); } private setEditMode(isEdit: boolean, revert: boolean) { @@ -1191,6 +1213,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC this.editingLayoutCtx = null; this.editingWidgetSubtitle = null; this.isEditingWidget = false; + this.updateLayoutSizes(); this.resetHighlight(); this.forceDashboardMobileMode = false; } @@ -1216,6 +1239,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC this.editingWidgetSubtitle = this.widgetComponentService.getInstantWidgetInfo(this.editingWidget).widgetName; this.forceDashboardMobileMode = true; this.isEditingWidget = true; + this.updateLayoutSizes(); if (layoutCtx) { const delayOffset = transition ? 350 : 0; const delay = transition ? 400 : 300; From 59df8e7942109af83f2076bc4d727d069d675a25 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 28 Dec 2022 12:38:20 +0200 Subject: [PATCH 08/16] UI: Fixed import --- .../home/components/dashboard-page/dashboard-page.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index a6dd046ade..4db291424b 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -150,6 +150,7 @@ import { TbPopoverService } from '@shared/components/popover.service'; import { tap } from 'rxjs/operators'; import { LayoutFixedSize, LayoutWidthType } from '@home/components/dashboard-page/layout/layout.models'; import { TbPopoverComponent } from '@shared/components/popover.component'; +import { ResizeObserver } from '@juggle/resize-observer'; // @dynamic @Component({ From 85557231a8ed5480fe1cd93a7541ce49084cccdb Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 28 Dec 2022 13:04:49 +0200 Subject: [PATCH 09/16] UI: Optimize call calculate new layout resize --- .../dashboard-page.component.ts | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index 4db291424b..b0984a65fb 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -691,23 +691,28 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC public toggleLayouts() { this.isRightLayoutOpened = !this.isRightLayoutOpened; this.mobileService.onDashboardRightLayoutChanged(this.isRightLayoutOpened); - this.updateLayoutSizes(); } public openRightLayout() { this.isRightLayoutOpened = true; this.mobileService.onDashboardRightLayoutChanged(this.isRightLayoutOpened); - this.updateLayoutSizes(); } private updateLayoutSizes() { + let changeMainLayoutSize = false; + let changeRightLayoutSize = false; if (this.dashboardCtx.state) { - this.updateMainLayoutSize(); - this.updateRightLayoutSize(); + changeMainLayoutSize = this.updateMainLayoutSize(); + changeRightLayoutSize = this.updateRightLayoutSize(); + } + if (changeMainLayoutSize || changeRightLayoutSize) { + this.cd.markForCheck(); } } - private updateMainLayoutSize() { + private updateMainLayoutSize(): boolean { + const prevMainLayoutWidth = this.mainLayoutSize.width; + const prevMainLayoutHeight = this.mainLayoutSize.height; if (this.isEditingWidget && this.editingLayoutCtx.id === 'main') { this.mainLayoutSize.width = '100%'; } else { @@ -718,9 +723,12 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC } else { this.mainLayoutSize.height = '0px'; } + return prevMainLayoutWidth !== this.mainLayoutSize.width || prevMainLayoutHeight !== this.mainLayoutSize.height; } - private updateRightLayoutSize() { + private updateRightLayoutSize(): boolean { + const prevRightLayoutWidth = this.rightLayoutSize.width; + const prevRightLayoutHeight = this.rightLayoutSize.height; if (this.isEditingWidget && this.editingLayoutCtx.id === 'right') { this.rightLayoutSize.width = '100%'; } else { @@ -731,6 +739,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC } else { this.rightLayoutSize.height = '0px'; } + return prevRightLayoutWidth !== this.rightLayoutSize.width || prevRightLayoutHeight !== this.rightLayoutSize.height; } private calculateWidth(layout: DashboardLayoutId): string { From f65397618b4a884fade0143217fffd89f66c2402 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 28 Dec 2022 13:27:32 +0200 Subject: [PATCH 10/16] UI: Improve resolve alias function --- ui-ngx/src/app/core/http/entity.service.ts | 38 ++++++++-------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts index 2493b11a64..035381af69 100644 --- a/ui-ngx/src/app/core/http/entity.service.ts +++ b/ui-ngx/src/app/core/http/entity.service.ts @@ -869,37 +869,25 @@ export class EntityService { }; aliasInfo.currentEntity = null; if (!aliasInfo.resolveMultiple && aliasInfo.entityFilter) { - let entityInfoObservable: Observable; + let currentEntity: EntityInfo = null; if (result.stateEntity && aliasInfo.entityFilter.type === AliasFilterType.singleEntity) { - let currentEntity: EntityInfo = null; if (stateParams) { + let targetParams = stateParams; if (result.entityParamName && result.entityParamName.length) { - const stateEntity = stateParams[result.entityParamName]; - if (stateEntity) { - currentEntity = { - id: stateEntity.entityId.id, - entityType: stateEntity.entityId.entityType, - name: stateEntity.entityName, - label: stateEntity.entityLabel - }; - } - } else { - if (stateParams.entityId) { - currentEntity = { - id: stateParams.entityId.id, - entityType: stateParams.entityId.entityType as EntityType, - name: stateParams.entityName, - label: stateParams.entityLabel - }; - } + targetParams = stateParams[result.entityParamName]; + } + if (targetParams && targetParams.entityId) { + currentEntity = { + id: targetParams.entityId.id, + entityType: targetParams.entityId.entityType as EntityType, + name: targetParams.entityName, + label: targetParams.entityLabel + }; } } - entityInfoObservable = currentEntity ? of(currentEntity) : this.findSingleEntityInfoByEntityFilter(aliasInfo.entityFilter, - {ignoreLoading: true, ignoreErrors: true}); - } else { - entityInfoObservable = this.findSingleEntityInfoByEntityFilter(aliasInfo.entityFilter, - {ignoreLoading: true, ignoreErrors: true}); } + const entityInfoObservable = currentEntity ? of(currentEntity) : this.findSingleEntityInfoByEntityFilter(aliasInfo.entityFilter, + {ignoreLoading: true, ignoreErrors: true}); return entityInfoObservable.pipe( map((entity) => { aliasInfo.currentEntity = entity; From 4c3154da4b53b0f984ec865b8df7b9e0ce54eb38 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 28 Dec 2022 13:33:57 +0200 Subject: [PATCH 11/16] Version set to 3.4.4-SNAPSHOT --- application/pom.xml | 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/message/pom.xml | 2 +- common/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 +- msa/black-box-tests/pom.xml | 2 +- msa/js-executor/package.json | 2 +- msa/js-executor/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 +- 56 files changed, 57 insertions(+), 57 deletions(-) diff --git a/application/pom.xml b/application/pom.xml index 61fa75cf49..4d89099d5b 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard application diff --git a/common/actor/pom.xml b/common/actor/pom.xml index 8f2c1e1b13..baab985d07 100644 --- a/common/actor/pom.xml +++ b/common/actor/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/cache/pom.xml b/common/cache/pom.xml index e48d232b16..8c7b3231c2 100644 --- a/common/cache/pom.xml +++ b/common/cache/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/cluster-api/pom.xml b/common/cluster-api/pom.xml index a8dfc522ce..74a89a4c8b 100644 --- a/common/cluster-api/pom.xml +++ b/common/cluster-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/coap-server/pom.xml b/common/coap-server/pom.xml index 57bb96d2c2..7d82d8344a 100644 --- a/common/coap-server/pom.xml +++ b/common/coap-server/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/dao-api/pom.xml b/common/dao-api/pom.xml index cba811343a..749e704170 100644 --- a/common/dao-api/pom.xml +++ b/common/dao-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/data/pom.xml b/common/data/pom.xml index 9a95c08b65..4d18c99cc6 100644 --- a/common/data/pom.xml +++ b/common/data/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/edge-api/pom.xml b/common/edge-api/pom.xml index e09de1135f..71fc82184f 100644 --- a/common/edge-api/pom.xml +++ b/common/edge-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/message/pom.xml b/common/message/pom.xml index 5176e4af1a..b52053252b 100644 --- a/common/message/pom.xml +++ b/common/message/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/pom.xml b/common/pom.xml index c7b6d86eaf..20847853d7 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard common diff --git a/common/queue/pom.xml b/common/queue/pom.xml index 8485c2d63d..f4a72cc427 100644 --- a/common/queue/pom.xml +++ b/common/queue/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/script/pom.xml b/common/script/pom.xml index a849cf2684..7b22c4e0b0 100644 --- a/common/script/pom.xml +++ b/common/script/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/script/remote-js-client/pom.xml b/common/script/remote-js-client/pom.xml index 651eb153ed..cc2c129c3f 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 - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT script org.thingsboard.common.script diff --git a/common/script/script-api/pom.xml b/common/script/script-api/pom.xml index 01fef3059b..08b6490376 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 - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT script org.thingsboard.common.script diff --git a/common/stats/pom.xml b/common/stats/pom.xml index 2fcac6e059..f20e313725 100644 --- a/common/stats/pom.xml +++ b/common/stats/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/transport/coap/pom.xml b/common/transport/coap/pom.xml index f4089d9a79..20665d1708 100644 --- a/common/transport/coap/pom.xml +++ b/common/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/http/pom.xml b/common/transport/http/pom.xml index c6c8f9869d..4da59fc93f 100644 --- a/common/transport/http/pom.xml +++ b/common/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/lwm2m/pom.xml b/common/transport/lwm2m/pom.xml index 3c6fae874f..724b140d87 100644 --- a/common/transport/lwm2m/pom.xml +++ b/common/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/mqtt/pom.xml b/common/transport/mqtt/pom.xml index 9442a66646..fa01fb61ad 100644 --- a/common/transport/mqtt/pom.xml +++ b/common/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/pom.xml b/common/transport/pom.xml index 47432f47f2..8c017fa757 100644 --- a/common/transport/pom.xml +++ b/common/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/transport/snmp/pom.xml b/common/transport/snmp/pom.xml index 939eecb009..fcba445de8 100644 --- a/common/transport/snmp/pom.xml +++ b/common/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard.common - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport diff --git a/common/transport/transport-api/pom.xml b/common/transport/transport-api/pom.xml index 06fbfc5771..1221d42bcf 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 - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/util/pom.xml b/common/util/pom.xml index 1a178b4c1e..b38f26abd1 100644 --- a/common/util/pom.xml +++ b/common/util/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/common/version-control/pom.xml b/common/version-control/pom.xml index 6ff68da760..0843494c49 100644 --- a/common/version-control/pom.xml +++ b/common/version-control/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT common org.thingsboard.common diff --git a/dao/pom.xml b/dao/pom.xml index 5335492759..563fc6b1e2 100644 --- a/dao/pom.xml +++ b/dao/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard dao diff --git a/msa/black-box-tests/pom.xml b/msa/black-box-tests/pom.xml index eb7872ef7a..665650df89 100644 --- a/msa/black-box-tests/pom.xml +++ b/msa/black-box-tests/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/js-executor/package.json b/msa/js-executor/package.json index e094dcc4e5..f9fde3328d 100644 --- a/msa/js-executor/package.json +++ b/msa/js-executor/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-js-executor", "private": true, - "version": "3.4.3", + "version": "3.4.4", "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 860eb3891a..76edeee65c 100644 --- a/msa/js-executor/pom.xml +++ b/msa/js-executor/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/pom.xml b/msa/pom.xml index 9e628b0f70..2542e0d1d0 100644 --- a/msa/pom.xml +++ b/msa/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard msa diff --git a/msa/tb-node/pom.xml b/msa/tb-node/pom.xml index 7119da74d8..bb53c84a2f 100644 --- a/msa/tb-node/pom.xml +++ b/msa/tb-node/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/tb/pom.xml b/msa/tb/pom.xml index fe79951126..b717881833 100644 --- a/msa/tb/pom.xml +++ b/msa/tb/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/transport/coap/pom.xml b/msa/transport/coap/pom.xml index 82d7e02da6..80f316318a 100644 --- a/msa/transport/coap/pom.xml +++ b/msa/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/http/pom.xml b/msa/transport/http/pom.xml index a596c5000f..a5e2a7d73d 100644 --- a/msa/transport/http/pom.xml +++ b/msa/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/lwm2m/pom.xml b/msa/transport/lwm2m/pom.xml index 0a43e7deb5..01a9fc5628 100644 --- a/msa/transport/lwm2m/pom.xml +++ b/msa/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/mqtt/pom.xml b/msa/transport/mqtt/pom.xml index 2fe358fe5d..82856357f6 100644 --- a/msa/transport/mqtt/pom.xml +++ b/msa/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/pom.xml b/msa/transport/pom.xml index 3339d93577..4df10d1b46 100644 --- a/msa/transport/pom.xml +++ b/msa/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/transport/snmp/pom.xml b/msa/transport/snmp/pom.xml index 1a352f47fb..f6cb54dfd2 100644 --- a/msa/transport/snmp/pom.xml +++ b/msa/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard.msa transport - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT org.thingsboard.msa.transport diff --git a/msa/vc-executor-docker/pom.xml b/msa/vc-executor-docker/pom.xml index 05884931d3..fbded58c33 100644 --- a/msa/vc-executor-docker/pom.xml +++ b/msa/vc-executor-docker/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/vc-executor/pom.xml b/msa/vc-executor/pom.xml index 31c96c583c..9b6050e029 100644 --- a/msa/vc-executor/pom.xml +++ b/msa/vc-executor/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/web-ui/package.json b/msa/web-ui/package.json index 035b8a3072..868215ad08 100644 --- a/msa/web-ui/package.json +++ b/msa/web-ui/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-web-ui", "private": true, - "version": "3.4.3", + "version": "3.4.4", "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 5a0a444687..fe94b5bd40 100644 --- a/msa/web-ui/pom.xml +++ b/msa/web-ui/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT msa org.thingsboard.msa diff --git a/netty-mqtt/pom.xml b/netty-mqtt/pom.xml index 99d05fc583..fdc53f6b36 100644 --- a/netty-mqtt/pom.xml +++ b/netty-mqtt/pom.xml @@ -19,11 +19,11 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard netty-mqtt - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT jar Netty MQTT Client diff --git a/pom.xml b/pom.xml index 929ebf69f1..df1cf68006 100755 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT pom Thingsboard diff --git a/rest-client/pom.xml b/rest-client/pom.xml index 24f8453786..943466a411 100644 --- a/rest-client/pom.xml +++ b/rest-client/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard rest-client diff --git a/rule-engine/pom.xml b/rule-engine/pom.xml index 126885cd22..fc27ede39e 100644 --- a/rule-engine/pom.xml +++ b/rule-engine/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard rule-engine diff --git a/rule-engine/rule-engine-api/pom.xml b/rule-engine/rule-engine-api/pom.xml index 665158a44f..c696866004 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 - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT 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 d32d8163a6..0c92fe9672 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 - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT rule-engine org.thingsboard.rule-engine diff --git a/tools/pom.xml b/tools/pom.xml index d414a7a777..de23ae355d 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard tools diff --git a/transport/coap/pom.xml b/transport/coap/pom.xml index 2640d1d80d..64afdbfd66 100644 --- a/transport/coap/pom.xml +++ b/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/http/pom.xml b/transport/http/pom.xml index 7820c585ec..4f7ad8cd01 100644 --- a/transport/http/pom.xml +++ b/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/lwm2m/pom.xml b/transport/lwm2m/pom.xml index b36c8372ef..e6970f8ac1 100644 --- a/transport/lwm2m/pom.xml +++ b/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/mqtt/pom.xml b/transport/mqtt/pom.xml index 91ce12908b..1dd97ec2ea 100644 --- a/transport/mqtt/pom.xml +++ b/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/pom.xml b/transport/pom.xml index 26af07f6a2..be6eceaec1 100644 --- a/transport/pom.xml +++ b/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard transport diff --git a/transport/snmp/pom.xml b/transport/snmp/pom.xml index 0701f7aa57..6f9acc0d7c 100644 --- a/transport/snmp/pom.xml +++ b/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT transport diff --git a/ui-ngx/package.json b/ui-ngx/package.json index 6b8112adad..3edaefcf35 100644 --- a/ui-ngx/package.json +++ b/ui-ngx/package.json @@ -1,6 +1,6 @@ { "name": "thingsboard", - "version": "3.4.3", + "version": "3.4.4", "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 f78d168144..a2640113e3 100644 --- a/ui-ngx/pom.xml +++ b/ui-ngx/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.3-SNAPSHOT + 3.4.4-SNAPSHOT thingsboard org.thingsboard From 2aec503830587684d130e4fbe36f9f4de984beb6 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 28 Dec 2022 14:35:29 +0200 Subject: [PATCH 12/16] Revert "Solved issue of a re-init Widget-Component service and widgets-info Cache." This reverts commit 2b0fa4c4 --- .../dashboard-page.component.ts | 6 +--- .../home/components/home-components.module.ts | 2 ++ .../widget/widget-component.service.ts | 31 ++++++++----------- .../components/widget/widget.component.ts | 7 ++--- 4 files changed, 18 insertions(+), 28 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index fb91752830..b0984a65fb 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -31,7 +31,6 @@ import { Optional, Renderer2, StaticProvider, - Type, ViewChild, ViewContainerRef, ViewEncapsulation @@ -152,7 +151,6 @@ import { tap } from 'rxjs/operators'; import { LayoutFixedSize, LayoutWidthType } from '@home/components/dashboard-page/layout/layout.models'; import { TbPopoverComponent } from '@shared/components/popover.component'; import { ResizeObserver } from '@juggle/resize-observer'; -import { HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens'; // @dynamic @Component({ @@ -341,7 +339,6 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC constructor(protected store: Store, @Inject(WINDOW) private window: Window, @Inject(DOCUMENT) private document: Document, - @Inject(HOME_COMPONENTS_MODULE_TOKEN) private homeComponentsModule: Type, private breakpointObserver: BreakpointObserver, private route: ActivatedRoute, private router: Router, @@ -1147,8 +1144,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC addWidgetFromType(widget: WidgetInfo) { this.onAddWidgetClosed(); this.searchBundle = ''; - this.widgetComponentService.getWidgetInfo(widget.bundleAlias, widget.typeAlias, widget.isSystemType, - [this.homeComponentsModule]).subscribe( + this.widgetComponentService.getWidgetInfo(widget.bundleAlias, widget.typeAlias, widget.isSystemType).subscribe( (widgetTypeInfo) => { const config: WidgetConfig = JSON.parse(widgetTypeInfo.defaultConfig); config.title = 'New ' + widgetTypeInfo.widgetName; diff --git a/ui-ngx/src/app/modules/home/components/home-components.module.ts b/ui-ngx/src/app/modules/home/components/home-components.module.ts index 669fde14ff..7cfcf269de 100644 --- a/ui-ngx/src/app/modules/home/components/home-components.module.ts +++ b/ui-ngx/src/app/modules/home/components/home-components.module.ts @@ -35,6 +35,7 @@ import { AddAttributeDialogComponent } from '@home/components/attribute/add-attr import { EditAttributeValuePanelComponent } from '@home/components/attribute/edit-attribute-value-panel.component'; import { DashboardComponent } from '@home/components/dashboard/dashboard.component'; import { WidgetComponent } from '@home/components/widget/widget.component'; +import { WidgetComponentService } from '@home/components/widget/widget-component.service'; import { LegendComponent } from '@home/components/widget/legend.component'; import { AliasesEntitySelectPanelComponent } from '@home/components/alias/aliases-entity-select-panel.component'; import { AliasesEntitySelectComponent } from '@home/components/alias/aliases-entity-select.component'; @@ -455,6 +456,7 @@ import { AssetProfileAutocompleteComponent } from '@home/components/profile/asse RateLimitsDetailsDialogComponent ], providers: [ + WidgetComponentService, CustomDialogService, ImportExportService, {provide: EMBED_DASHBOARD_DIALOG_TOKEN, useValue: EmbedDashboardDialogComponent}, diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts index 9a4f941211..38b14fe485 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts @@ -45,13 +45,13 @@ import { MODULES_MAP } from '@shared/public-api'; import * as tinycolor_ from 'tinycolor2'; import moment from 'moment'; import { IModulesMap } from '@modules/common/modules-map.models'; +import { HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens'; import { widgetSettingsComponentsMap } from '@home/components/widget/lib/settings/widget-settings.module'; const tinycolor = tinycolor_; -@Injectable({ - providedIn: 'root' -}) +// @dynamic +@Injectable() export class WidgetComponentService { private cssParser = new cssjs(); @@ -68,6 +68,7 @@ export class WidgetComponentService { constructor(@Inject(WINDOW) private window: Window, @Optional() @Inject(MODULES_MAP) private modulesMap: IModulesMap, + @Inject(HOME_COMPONENTS_MODULE_TOKEN) private homeComponentsModule: Type, private dynamicComponentFactoryService: DynamicComponentFactoryService, private widgetService: WidgetService, private utils: UtilsService, @@ -184,9 +185,9 @@ export class WidgetComponentService { () => { const loadDefaultWidgetInfoTasks = [ this.loadWidgetResources(this.missingWidgetType, 'global-widget-missing-type', - [SharedModule, WidgetComponentsModule]), + [SharedModule, WidgetComponentsModule, this.homeComponentsModule]), this.loadWidgetResources(this.errorWidgetType, 'global-widget-error-type', - [SharedModule, WidgetComponentsModule]), + [SharedModule, WidgetComponentsModule, this.homeComponentsModule]), ]; forkJoin(loadDefaultWidgetInfoTasks).subscribe( () => { @@ -230,14 +231,13 @@ export class WidgetComponentService { } } - public getWidgetInfo(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean, modules?: Type[]): Observable { + public getWidgetInfo(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): Observable { return this.init().pipe( - mergeMap(() => this.getWidgetInfoInternal(bundleAlias, widgetTypeAlias, isSystem, modules)) + mergeMap(() => this.getWidgetInfoInternal(bundleAlias, widgetTypeAlias, isSystem)) ); } - private getWidgetInfoInternal(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean, - modules?: Type[]): Observable { + private getWidgetInfoInternal(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): Observable { const widgetInfoSubject = new ReplaySubject(); const widgetInfo = this.getWidgetInfoFromCache(bundleAlias, widgetTypeAlias, isSystem); if (widgetInfo) { @@ -245,7 +245,7 @@ export class WidgetComponentService { widgetInfoSubject.complete(); } else { if (this.utils.widgetEditMode) { - this.loadWidget(this.editingWidgetType, bundleAlias, isSystem, widgetInfoSubject, modules); + this.loadWidget(this.editingWidgetType, bundleAlias, isSystem, widgetInfoSubject); } else { const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); let fetchQueue = this.widgetsInfoFetchQueue.get(key); @@ -256,7 +256,7 @@ export class WidgetComponentService { this.widgetsInfoFetchQueue.set(key, fetchQueue); this.widgetService.getWidgetType(bundleAlias, widgetTypeAlias, isSystem, {ignoreErrors: true}).subscribe( (widgetType) => { - this.loadWidget(widgetType, bundleAlias, isSystem, widgetInfoSubject, modules); + this.loadWidget(widgetType, bundleAlias, isSystem, widgetInfoSubject); }, () => { widgetInfoSubject.next(this.missingWidgetType); @@ -270,8 +270,7 @@ export class WidgetComponentService { return widgetInfoSubject.asObservable(); } - private loadWidget(widgetType: WidgetType, bundleAlias: string, isSystem: boolean, widgetInfoSubject: Subject, - modules?: Type[]) { + private loadWidget(widgetType: WidgetType, bundleAlias: string, isSystem: boolean, widgetInfoSubject: Subject) { const widgetInfo = toWidgetInfo(widgetType); const key = this.createWidgetInfoCacheKey(bundleAlias, widgetInfo.alias, isSystem); let widgetControllerDescriptor: WidgetControllerDescriptor = null; @@ -284,11 +283,7 @@ export class WidgetComponentService { } if (widgetControllerDescriptor) { const widgetNamespace = `widget-type-${(isSystem ? 'sys-' : '')}${bundleAlias}-${widgetInfo.alias}`; - const widgetModules = [SharedModule, WidgetComponentsModule]; - if (modules) { - widgetModules.push(...modules); - } - this.loadWidgetResources(widgetInfo, widgetNamespace, widgetModules).subscribe( + this.loadWidgetResources(widgetInfo, widgetNamespace, [SharedModule, WidgetComponentsModule, this.homeComponentsModule]).subscribe( () => { if (widgetControllerDescriptor.settingsSchema) { widgetInfo.typeSettingsSchema = widgetControllerDescriptor.settingsSchema; diff --git a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts index cfb95ef97a..baa0664a31 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts @@ -31,7 +31,6 @@ import { OnInit, Renderer2, SimpleChanges, - Type, ViewChild, ViewContainerRef, ViewEncapsulation @@ -115,7 +114,7 @@ import { MobileService } from '@core/services/mobile.service'; import { DialogService } from '@core/services/dialog.service'; import { PopoverPlacement } from '@shared/components/popover.models'; import { TbPopoverService } from '@shared/components/popover.service'; -import { DASHBOARD_PAGE_COMPONENT_TOKEN, HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens'; +import { DASHBOARD_PAGE_COMPONENT_TOKEN } from '@home/components/tokens'; @Component({ selector: 'tb-widget', @@ -191,7 +190,6 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI private popoverService: TbPopoverService, @Inject(EMBED_DASHBOARD_DIALOG_TOKEN) private embedDashboardDialogComponent: ComponentType, @Inject(DASHBOARD_PAGE_COMPONENT_TOKEN) private dashboardPageComponent: ComponentType, - @Inject(HOME_COMPONENTS_MODULE_TOKEN) private homeComponentsModule: Type, private widgetService: WidgetService, private resources: ResourcesService, private timeService: TimeService, @@ -356,8 +354,7 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI this.subscriptionContext.widgetUtils = this.widgetContext.utils; this.subscriptionContext.getServerTimeDiff = this.dashboardService.getServerTimeDiff.bind(this.dashboardService); - this.widgetComponentService.getWidgetInfo(this.widget.bundleAlias, this.widget.typeAlias, this.widget.isSystemType, - [this.homeComponentsModule]).subscribe( + this.widgetComponentService.getWidgetInfo(this.widget.bundleAlias, this.widget.typeAlias, this.widget.isSystemType).subscribe( (widgetInfo) => { this.widgetInfo = widgetInfo; this.loadFromWidgetInfo(); From 572421487ac25ad33d62ad8f61354a46c1468547 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 28 Dec 2022 15:10:09 +0200 Subject: [PATCH 13/16] UI: Move widgets cache to widget service. --- ui-ngx/src/app/core/http/widget.service.ts | 51 +++++++++++++----- .../widget/widget-component.service.ts | 53 +++---------------- 2 files changed, 45 insertions(+), 59 deletions(-) diff --git a/ui-ngx/src/app/core/http/widget.service.ts b/ui-ngx/src/app/core/http/widget.service.ts index 31788122a9..dd9449032e 100644 --- a/ui-ngx/src/app/core/http/widget.service.ts +++ b/ui-ngx/src/app/core/http/widget.service.ts @@ -16,7 +16,7 @@ import { Injectable } from '@angular/core'; import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; -import { Observable, of, ReplaySubject, Subject } from 'rxjs'; +import { Observable, of, ReplaySubject } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { PageLink } from '@shared/models/page/page-link'; import { PageData } from '@shared/models/page/page-data'; @@ -43,15 +43,14 @@ import { ActivationEnd, Router } from '@angular/router'; }) export class WidgetService { - private widgetTypeUpdatedSubject = new Subject(); - private widgetsBundleDeletedSubject = new Subject(); - private allWidgetsBundles: Array; private systemWidgetsBundles: Array; private tenantWidgetsBundles: Array; private widgetTypeInfosCache = new Map>(); + private widgetsInfoInMemoryCache = new Map(); + private loadWidgetsBundleCacheSubject: ReplaySubject; constructor( @@ -117,7 +116,7 @@ export class WidgetService { defaultHttpOptionsFromConfig(config)).pipe( tap(() => { this.invalidateWidgetsBundleCache(); - this.widgetsBundleDeletedSubject.next(widgetsBundle); + this.widgetsBundleDeleted(widgetsBundle); }) ); } @@ -217,7 +216,7 @@ export class WidgetService { return this.http.post('/api/widgetType', widgetTypeDetails, defaultHttpOptionsFromConfig(config)).pipe( tap((savedWidgetType) => { - this.widgetTypeUpdatedSubject.next(savedWidgetType); + this.widgetTypeUpdated(savedWidgetType); })); } @@ -226,7 +225,7 @@ export class WidgetService { return this.http.post('/api/widgetType', widgetTypeDetails, defaultHttpOptionsFromConfig(config)).pipe( tap((savedWidgetType) => { - this.widgetTypeUpdatedSubject.next(savedWidgetType); + this.widgetTypeUpdated(savedWidgetType); })); } @@ -237,7 +236,7 @@ export class WidgetService { return this.http.delete(`/api/widgetType/${widgetTypeInstance.id.id}`, defaultHttpOptionsFromConfig(config)).pipe( tap(() => { - this.widgetTypeUpdatedSubject.next(widgetTypeInstance); + this.widgetTypeUpdated(widgetTypeInstance); }) ); } @@ -263,12 +262,40 @@ export class WidgetService { ); } - public onWidgetTypeUpdated(): Observable { - return this.widgetTypeUpdatedSubject.asObservable(); + public createWidgetInfoCacheKey(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): string { + return `${isSystem ? 'sys_' : ''}${bundleAlias}_${widgetTypeAlias}`; } - public onWidgetBundleDeleted(): Observable { - return this.widgetsBundleDeletedSubject.asObservable(); + public getWidgetInfoFromCache(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): WidgetInfo | undefined { + const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); + return this.widgetsInfoInMemoryCache.get(key); + } + + public putWidgetInfoToCache(widgetInfo: WidgetInfo, bundleAlias: string, widgetTypeAlias: string, isSystem: boolean) { + const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); + this.widgetsInfoInMemoryCache.set(key, widgetInfo); + } + + private widgetTypeUpdated(updatedWidgetType: WidgetType): void { + this.deleteWidgetInfoFromCache(updatedWidgetType.bundleAlias, updatedWidgetType.alias, updatedWidgetType.tenantId.id === NULL_UUID); + } + + private widgetsBundleDeleted(widgetsBundle: WidgetsBundle): void { + this.deleteWidgetsBundleFromCache(widgetsBundle.alias, widgetsBundle.tenantId.id === NULL_UUID); + } + + private deleteWidgetInfoFromCache(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean) { + const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); + this.widgetsInfoInMemoryCache.delete(key); + } + + private deleteWidgetsBundleFromCache(bundleAlias: string, isSystem: boolean) { + const key = (isSystem ? 'sys_' : '') + bundleAlias; + this.widgetsInfoInMemoryCache.forEach((widgetInfo, cacheKey) => { + if (cacheKey.startsWith(key)) { + this.widgetsInfoInMemoryCache.delete(cacheKey); + } + }); } private loadWidgetsBundleCache(config?: RequestConfig): Observable { diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts index 38b14fe485..f8a75239ad 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts @@ -50,14 +50,11 @@ import { widgetSettingsComponentsMap } from '@home/components/widget/lib/setting const tinycolor = tinycolor_; -// @dynamic @Injectable() export class WidgetComponentService { private cssParser = new cssjs(); - private widgetsInfoInMemoryCache = new Map(); - private widgetsInfoFetchQueue = new Map>>(); private init$: Observable; @@ -77,14 +74,6 @@ export class WidgetComponentService { this.cssParser.testMode = false; - this.widgetService.onWidgetTypeUpdated().subscribe((widgetType) => { - this.deleteWidgetInfoFromCache(widgetType.bundleAlias, widgetType.alias, widgetType.tenantId.id === NULL_UUID); - }); - - this.widgetService.onWidgetBundleDeleted().subscribe((widgetsBundle) => { - this.deleteWidgetsBundleFromCache(widgetsBundle.alias, widgetsBundle.tenantId.id === NULL_UUID); - }); - this.init(); } @@ -223,7 +212,7 @@ export class WidgetComponentService { } public getInstantWidgetInfo(widget: Widget): WidgetInfo { - const widgetInfo = this.getWidgetInfoFromCache(widget.bundleAlias, widget.typeAlias, widget.isSystemType); + const widgetInfo = this.widgetService.getWidgetInfoFromCache(widget.bundleAlias, widget.typeAlias, widget.isSystemType); if (widgetInfo) { return widgetInfo; } else { @@ -239,7 +228,7 @@ export class WidgetComponentService { private getWidgetInfoInternal(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): Observable { const widgetInfoSubject = new ReplaySubject(); - const widgetInfo = this.getWidgetInfoFromCache(bundleAlias, widgetTypeAlias, isSystem); + const widgetInfo = this.widgetService.getWidgetInfoFromCache(bundleAlias, widgetTypeAlias, isSystem); if (widgetInfo) { widgetInfoSubject.next(widgetInfo); widgetInfoSubject.complete(); @@ -247,7 +236,7 @@ export class WidgetComponentService { if (this.utils.widgetEditMode) { this.loadWidget(this.editingWidgetType, bundleAlias, isSystem, widgetInfoSubject); } else { - const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); + const key = this.widgetService.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); let fetchQueue = this.widgetsInfoFetchQueue.get(key); if (fetchQueue) { fetchQueue.push(widgetInfoSubject); @@ -272,7 +261,7 @@ export class WidgetComponentService { private loadWidget(widgetType: WidgetType, bundleAlias: string, isSystem: boolean, widgetInfoSubject: Subject) { const widgetInfo = toWidgetInfo(widgetType); - const key = this.createWidgetInfoCacheKey(bundleAlias, widgetInfo.alias, isSystem); + const key = this.widgetService.createWidgetInfoCacheKey(bundleAlias, widgetInfo.alias, isSystem); let widgetControllerDescriptor: WidgetControllerDescriptor = null; try { widgetControllerDescriptor = this.createWidgetControllerDescriptor(widgetInfo, key); @@ -297,7 +286,7 @@ export class WidgetComponentService { widgetInfo.typeParameters = widgetControllerDescriptor.typeParameters; widgetInfo.actionSources = widgetControllerDescriptor.actionSources; widgetInfo.widgetTypeFunction = widgetControllerDescriptor.widgetTypeFunction; - this.putWidgetInfoToCache(widgetInfo, bundleAlias, widgetInfo.alias, isSystem); + this.widgetService.putWidgetInfoToCache(widgetInfo, bundleAlias, widgetInfo.alias, isSystem); if (widgetInfoSubject) { widgetInfoSubject.next(widgetInfo); widgetInfoSubject.complete(); @@ -331,7 +320,7 @@ export class WidgetComponentService { (resource) => { resourceTasks.push( this.resources.loadResource(resource.url).pipe( - catchError(e => of(`Failed to load widget resource: '${resource.url}'`)) + catchError(() => of(`Failed to load widget resource: '${resource.url}'`)) ) ); } @@ -586,34 +575,4 @@ export class WidgetComponentService { this.widgetsInfoFetchQueue.delete(key); } } - - // Cache functions - - private createWidgetInfoCacheKey(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): string { - return `${isSystem ? 'sys_' : ''}${bundleAlias}_${widgetTypeAlias}`; - } - - private getWidgetInfoFromCache(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean): WidgetInfo | undefined { - const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); - return this.widgetsInfoInMemoryCache.get(key); - } - - private putWidgetInfoToCache(widgetInfo: WidgetInfo, bundleAlias: string, widgetTypeAlias: string, isSystem: boolean) { - const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); - this.widgetsInfoInMemoryCache.set(key, widgetInfo); - } - - private deleteWidgetInfoFromCache(bundleAlias: string, widgetTypeAlias: string, isSystem: boolean) { - const key = this.createWidgetInfoCacheKey(bundleAlias, widgetTypeAlias, isSystem); - this.widgetsInfoInMemoryCache.delete(key); - } - - private deleteWidgetsBundleFromCache(bundleAlias: string, isSystem: boolean) { - const key = (isSystem ? 'sys_' : '') + bundleAlias; - this.widgetsInfoInMemoryCache.forEach((widgetInfo, cacheKey) => { - if (cacheKey.startsWith(key)) { - this.widgetsInfoInMemoryCache.delete(cacheKey); - } - }); - } } From 3e65430470cb81ec32c915c7034f293e15fdad8c Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 28 Dec 2022 16:31:26 +0200 Subject: [PATCH 14/16] UI: Fixed switching dashboard layout --- .../layout/manage-dashboard-layouts-dialog.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts index 4d593a7c57..ae0d699af7 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts @@ -297,6 +297,7 @@ export class ManageDashboardLayoutsDialogComponent extends DialogComponent Date: Wed, 28 Dec 2022 17:04:33 +0200 Subject: [PATCH 15/16] UI: Refactoring --- .../layout/manage-dashboard-layouts-dialog.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts index ae0d699af7..801238d602 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts @@ -297,7 +297,7 @@ export class ManageDashboardLayoutsDialogComponent extends DialogComponent Date: Tue, 10 Jan 2023 17:24:26 +0200 Subject: [PATCH 16/16] Version set to 3.5.0-SNAPSHOT --- application/pom.xml | 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/message/pom.xml | 2 +- common/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 +- msa/black-box-tests/pom.xml | 2 +- msa/js-executor/package.json | 2 +- msa/js-executor/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 +- 56 files changed, 57 insertions(+), 57 deletions(-) diff --git a/application/pom.xml b/application/pom.xml index 47d69d34dd..815243f85b 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard application diff --git a/common/actor/pom.xml b/common/actor/pom.xml index baab985d07..2b9b91db6c 100644 --- a/common/actor/pom.xml +++ b/common/actor/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/cache/pom.xml b/common/cache/pom.xml index 8c7b3231c2..d26d4ff937 100644 --- a/common/cache/pom.xml +++ b/common/cache/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/cluster-api/pom.xml b/common/cluster-api/pom.xml index 74a89a4c8b..226a274ba0 100644 --- a/common/cluster-api/pom.xml +++ b/common/cluster-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/coap-server/pom.xml b/common/coap-server/pom.xml index 7d82d8344a..6e22b45768 100644 --- a/common/coap-server/pom.xml +++ b/common/coap-server/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/dao-api/pom.xml b/common/dao-api/pom.xml index 749e704170..acf757439f 100644 --- a/common/dao-api/pom.xml +++ b/common/dao-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/data/pom.xml b/common/data/pom.xml index 4d18c99cc6..6464c80471 100644 --- a/common/data/pom.xml +++ b/common/data/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/edge-api/pom.xml b/common/edge-api/pom.xml index 71fc82184f..daad429299 100644 --- a/common/edge-api/pom.xml +++ b/common/edge-api/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/message/pom.xml b/common/message/pom.xml index b52053252b..72ea8ae0f3 100644 --- a/common/message/pom.xml +++ b/common/message/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/pom.xml b/common/pom.xml index 20847853d7..84ca8fdcb2 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard common diff --git a/common/queue/pom.xml b/common/queue/pom.xml index f4a72cc427..90911569bc 100644 --- a/common/queue/pom.xml +++ b/common/queue/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/script/pom.xml b/common/script/pom.xml index 7b22c4e0b0..0463e2d2e9 100644 --- a/common/script/pom.xml +++ b/common/script/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/script/remote-js-client/pom.xml b/common/script/remote-js-client/pom.xml index cc2c129c3f..8190cb18d0 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 - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT script org.thingsboard.common.script diff --git a/common/script/script-api/pom.xml b/common/script/script-api/pom.xml index 08b6490376..e979207c10 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 - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT script org.thingsboard.common.script diff --git a/common/stats/pom.xml b/common/stats/pom.xml index f20e313725..d72ca8e81c 100644 --- a/common/stats/pom.xml +++ b/common/stats/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/transport/coap/pom.xml b/common/transport/coap/pom.xml index 20665d1708..b1ee7f3774 100644 --- a/common/transport/coap/pom.xml +++ b/common/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/http/pom.xml b/common/transport/http/pom.xml index 4da59fc93f..ee2c13d8b5 100644 --- a/common/transport/http/pom.xml +++ b/common/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/lwm2m/pom.xml b/common/transport/lwm2m/pom.xml index 724b140d87..b6cb46e8cf 100644 --- a/common/transport/lwm2m/pom.xml +++ b/common/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/mqtt/pom.xml b/common/transport/mqtt/pom.xml index fa01fb61ad..4f7384bb82 100644 --- a/common/transport/mqtt/pom.xml +++ b/common/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.common - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/pom.xml b/common/transport/pom.xml index 8c017fa757..11cd48b9f1 100644 --- a/common/transport/pom.xml +++ b/common/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/transport/snmp/pom.xml b/common/transport/snmp/pom.xml index fcba445de8..a15e7feeef 100644 --- a/common/transport/snmp/pom.xml +++ b/common/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard.common - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport diff --git a/common/transport/transport-api/pom.xml b/common/transport/transport-api/pom.xml index 1221d42bcf..fa1e93ea4c 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 - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/util/pom.xml b/common/util/pom.xml index b38f26abd1..13d9c502cf 100644 --- a/common/util/pom.xml +++ b/common/util/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/common/version-control/pom.xml b/common/version-control/pom.xml index 0843494c49..2ab1f45eec 100644 --- a/common/version-control/pom.xml +++ b/common/version-control/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT common org.thingsboard.common diff --git a/dao/pom.xml b/dao/pom.xml index 563fc6b1e2..95a337c9c2 100644 --- a/dao/pom.xml +++ b/dao/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard dao diff --git a/msa/black-box-tests/pom.xml b/msa/black-box-tests/pom.xml index 665650df89..a7889dbe8c 100644 --- a/msa/black-box-tests/pom.xml +++ b/msa/black-box-tests/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/js-executor/package.json b/msa/js-executor/package.json index f9fde3328d..add59eb610 100644 --- a/msa/js-executor/package.json +++ b/msa/js-executor/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-js-executor", "private": true, - "version": "3.4.4", + "version": "3.5.0", "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 76edeee65c..226e48a375 100644 --- a/msa/js-executor/pom.xml +++ b/msa/js-executor/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/pom.xml b/msa/pom.xml index 2542e0d1d0..09e890cf10 100644 --- a/msa/pom.xml +++ b/msa/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard msa diff --git a/msa/tb-node/pom.xml b/msa/tb-node/pom.xml index bb53c84a2f..806374f8ba 100644 --- a/msa/tb-node/pom.xml +++ b/msa/tb-node/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/tb/pom.xml b/msa/tb/pom.xml index b717881833..4c94013482 100644 --- a/msa/tb/pom.xml +++ b/msa/tb/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/transport/coap/pom.xml b/msa/transport/coap/pom.xml index 80f316318a..ceeec9ebce 100644 --- a/msa/transport/coap/pom.xml +++ b/msa/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/http/pom.xml b/msa/transport/http/pom.xml index a5e2a7d73d..de388ba261 100644 --- a/msa/transport/http/pom.xml +++ b/msa/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/lwm2m/pom.xml b/msa/transport/lwm2m/pom.xml index 01a9fc5628..526dc66605 100644 --- a/msa/transport/lwm2m/pom.xml +++ b/msa/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/mqtt/pom.xml b/msa/transport/mqtt/pom.xml index 82856357f6..1e91823e8d 100644 --- a/msa/transport/mqtt/pom.xml +++ b/msa/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard.msa - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/pom.xml b/msa/transport/pom.xml index 4df10d1b46..df2b9943a9 100644 --- a/msa/transport/pom.xml +++ b/msa/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/transport/snmp/pom.xml b/msa/transport/snmp/pom.xml index f6cb54dfd2..3a60f83568 100644 --- a/msa/transport/snmp/pom.xml +++ b/msa/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard.msa transport - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT org.thingsboard.msa.transport diff --git a/msa/vc-executor-docker/pom.xml b/msa/vc-executor-docker/pom.xml index fbded58c33..b1241b330a 100644 --- a/msa/vc-executor-docker/pom.xml +++ b/msa/vc-executor-docker/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/vc-executor/pom.xml b/msa/vc-executor/pom.xml index 9b6050e029..61468af189 100644 --- a/msa/vc-executor/pom.xml +++ b/msa/vc-executor/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/web-ui/package.json b/msa/web-ui/package.json index 868215ad08..18cc80481f 100644 --- a/msa/web-ui/package.json +++ b/msa/web-ui/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-web-ui", "private": true, - "version": "3.4.4", + "version": "3.5.0", "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 fe94b5bd40..4372bbcf0d 100644 --- a/msa/web-ui/pom.xml +++ b/msa/web-ui/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT msa org.thingsboard.msa diff --git a/netty-mqtt/pom.xml b/netty-mqtt/pom.xml index fdc53f6b36..c246ab7c5c 100644 --- a/netty-mqtt/pom.xml +++ b/netty-mqtt/pom.xml @@ -19,11 +19,11 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard netty-mqtt - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT jar Netty MQTT Client diff --git a/pom.xml b/pom.xml index 92f13121d6..991a95d1b6 100755 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT pom Thingsboard diff --git a/rest-client/pom.xml b/rest-client/pom.xml index 943466a411..f2b1eca351 100644 --- a/rest-client/pom.xml +++ b/rest-client/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard rest-client diff --git a/rule-engine/pom.xml b/rule-engine/pom.xml index fc27ede39e..d1f2bacea6 100644 --- a/rule-engine/pom.xml +++ b/rule-engine/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard rule-engine diff --git a/rule-engine/rule-engine-api/pom.xml b/rule-engine/rule-engine-api/pom.xml index c696866004..5016186a5c 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 - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT 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 0c92fe9672..a79134b811 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 - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT rule-engine org.thingsboard.rule-engine diff --git a/tools/pom.xml b/tools/pom.xml index de23ae355d..bb9c5f9958 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard tools diff --git a/transport/coap/pom.xml b/transport/coap/pom.xml index 64afdbfd66..a915e0ef1a 100644 --- a/transport/coap/pom.xml +++ b/transport/coap/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/http/pom.xml b/transport/http/pom.xml index 4f7ad8cd01..71869bf1b0 100644 --- a/transport/http/pom.xml +++ b/transport/http/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/lwm2m/pom.xml b/transport/lwm2m/pom.xml index e6970f8ac1..bd1bb0500c 100644 --- a/transport/lwm2m/pom.xml +++ b/transport/lwm2m/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/mqtt/pom.xml b/transport/mqtt/pom.xml index 1dd97ec2ea..55d5d04c7c 100644 --- a/transport/mqtt/pom.xml +++ b/transport/mqtt/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/pom.xml b/transport/pom.xml index be6eceaec1..318bc794d1 100644 --- a/transport/pom.xml +++ b/transport/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard transport diff --git a/transport/snmp/pom.xml b/transport/snmp/pom.xml index 6f9acc0d7c..9aa4039b31 100644 --- a/transport/snmp/pom.xml +++ b/transport/snmp/pom.xml @@ -21,7 +21,7 @@ org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT transport diff --git a/ui-ngx/package.json b/ui-ngx/package.json index 3edaefcf35..0758e39948 100644 --- a/ui-ngx/package.json +++ b/ui-ngx/package.json @@ -1,6 +1,6 @@ { "name": "thingsboard", - "version": "3.4.4", + "version": "3.5.0", "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 a2640113e3..6361c082e5 100644 --- a/ui-ngx/pom.xml +++ b/ui-ngx/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.thingsboard - 3.4.4-SNAPSHOT + 3.5.0-SNAPSHOT thingsboard org.thingsboard