The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Available under preserveDashboardStateWhenNavigating feature toggle.
This is a POC of a functionality that will allow preserving currently selected ~filters and group by dimensions~ dashboard variables and time range when navigating between different dashboards. It's an early WIP to gather some opinions.
How it works?
Currently selected variable and time range are captured on DashboardScene deactivation and stored in the local storage under a tab-specific key.
When new dashboard scene is loaded, we read from local storage and replace the location in the browser with the saved query params, so that when the URL sync is activated, the variables will restore preserved values.
When one navigates away from Grafana the preserved filters are cleared.
TODO:
[x] Deduplicate query params with the same value to avoid duplicate values in scenarios when someone navigates back and forts between the same dashboard (using browser's back button).
[x] On the target dashboard only apply those query params that match variable names - thi I'm not sure if we need this as this is supposed to work as part of the newDashboardWithFiltersAndGroupBy that guarantees the same name of the filters and group by variable across different dashboards.
[x] Preserve filters with tab id, so that closing one tab will not cause clearing the filters for other tabs. Or for other tabs not to override filters stored by other tabs.
@torkelo @ashharrison90 - i still need to implement tests, but this should be ready for approach review and testing. Available under preserveDashboardStateWhenNavigating feature toggle.
Available under
preserveDashboardStateWhenNavigating
feature toggle.This is a POC of a functionality that will allow preserving currently selected ~filters and group by dimensions~ dashboard variables and time range when navigating between different dashboards. It's an early WIP to gather some opinions.
How it works?
TODO:
newDashboardWithFiltersAndGroupBy
that guarantees the same name of the filters and group by variable across different dashboards.