This is an automated email from the ASF dual-hosted git repository. zehnder pushed a commit to branch 4021-rename-ui-folders-of-data-explorer-to-chart in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 587eee2cab3380314a3f3cef7a92b8a4faeb26b5 Author: Philipp Zehnder <[email protected]> AuthorDate: Thu Dec 4 15:21:34 2025 +0100 refactor(#4021): Fix bug when no measurement exists --- .../components/chart-container/chart-container.component.ts | 2 +- ui/src/app/chart/components/chart-view/chart-view.component.ts | 1 - ui/src/app/chart/services/chart-detect-changes.service.ts | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/src/app/chart-shared/components/chart-container/chart-container.component.ts b/ui/src/app/chart-shared/components/chart-container/chart-container.component.ts index 88b7142b8d..3e950d1acf 100644 --- a/ui/src/app/chart-shared/components/chart-container/chart-container.component.ts +++ b/ui/src/app/chart-shared/components/chart-container/chart-container.component.ts @@ -204,7 +204,7 @@ export class ChartContainerComponent ); }); this.widgetLoaded = true; - this.title = this.dataLakeMeasure.measureName; + this.title = this.dataLakeMeasure?.measureName; this.widgetTypeChanged$ = this.widgetTypeService.chartTypeChangeSubject.subscribe( typeChange => { diff --git a/ui/src/app/chart/components/chart-view/chart-view.component.ts b/ui/src/app/chart/components/chart-view/chart-view.component.ts index 25cc4003fc..9675d9fdb1 100644 --- a/ui/src/app/chart/components/chart-view/chart-view.component.ts +++ b/ui/src/app/chart/components/chart-view/chart-view.component.ts @@ -79,7 +79,6 @@ export class ChartViewComponent originalDataView: DataExplorerWidgetModel; dataLakeMeasure: DataLakeMeasure; drawerWidth = 450; - panelWidth = '100%'; selectedAssets = []; deselectedAssets = []; diff --git a/ui/src/app/chart/services/chart-detect-changes.service.ts b/ui/src/app/chart/services/chart-detect-changes.service.ts index 7ee58f650a..83245003c2 100644 --- a/ui/src/app/chart/services/chart-detect-changes.service.ts +++ b/ui/src/app/chart/services/chart-detect-changes.service.ts @@ -86,6 +86,10 @@ export class ChartDetectChangesService { currentItem: DataExplorerWidgetModel | Dashboard, clearTimestampFn: (model: DataExplorerWidgetModel | Dashboard) => void, ): boolean { + if (!originalItem) { + return false; + } + const clonedOriginal = JSON.parse(JSON.stringify(originalItem)); const clonedCurrent = JSON.parse(JSON.stringify(currentItem)); clearTimestampFn(clonedOriginal);
