This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new d92d30f30b fix: Add time settings to query parameters in data explorer 
(#3751)
d92d30f30b is described below

commit d92d30f30b419167cb10d179b4e3bd54c1b7f90c
Author: Dominik Riemer <[email protected]>
AuthorDate: Tue Aug 26 10:33:33 2025 +0200

    fix: Add time settings to query parameters in data explorer (#3751)
---
 .../chart-view/data-explorer-chart-view.component.ts     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git 
a/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
 
b/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
index 0e9c817d9d..62028c22ef 100644
--- 
a/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
+++ 
b/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
@@ -32,6 +32,7 @@ import {
 import {
     ActivatedRoute,
     ActivatedRouteSnapshot,
+    Router,
     RouterStateSnapshot,
 } from '@angular/router';
 import {
@@ -73,6 +74,7 @@ export class DataExplorerChartViewComponent
     private dataExplorerSharedService = inject(DataExplorerSharedService);
     private detectChangesService = inject(DataExplorerDetectChangesService);
     private route = inject(ActivatedRoute);
+    private router = inject(Router);
     private dialog = inject(MatDialog);
     private routingService = inject(DataExplorerRoutingService);
     private dataViewService = inject(ChartService);
@@ -123,6 +125,7 @@ export class DataExplorerChartViewComponent
             const height = this.outerPanel.nativeElement.offsetHeight;
             this.gridsterItemComponent = { width, height };
             this.timeSelectionService.notify(this.timeSettings);
+            this.updateQueryParams(this.timeSettings);
         });
     }
 
@@ -230,6 +233,19 @@ export class DataExplorerChartViewComponent
     updateDateRange(timeSettings: TimeSettings) {
         this.timeSettings = timeSettings;
         this.timeSelectionService.notify(timeSettings);
+        this.updateQueryParams(timeSettings);
+    }
+
+    updateQueryParams(timeSettings: TimeSettings) {
+        this.router.navigate([], {
+            relativeTo: this.route,
+            queryParams: {
+                startDate: timeSettings.startTime,
+                endDate: timeSettings.endTime,
+            },
+            queryParamsHandling: 'merge',
+            replaceUrl: true,
+        });
     }
 
     downloadDataAsFile() {

Reply via email to