Closed gtk-grafana closed 3 days ago
This is currently in a somewhat working state. Caveats are browser back button can now take you back to the index page, but filters are not cleared (but they don't exist in the URL):
And breadcrumbs are a bit buggy:
Hopefully we can fix these bugs and merge this in before refactoring the code to support new routes.
Stuff to think about:
Fixes: https://github.com/grafana/explore-logs/issues/351 Fixes: https://github.com/grafana/explore-logs/issues/462
Adding routes for the breakdown pages:
Services index:
/a/grafana-lokiexplore-app/explore
Breakdown:/a/grafana-lokiexplore-app/explore/service/:service/:breakdownSlug
e.g.:
This PR will allow users to use the browser history to go back or forward to breakdown or index pages, instead of the whole app having essentially a single entry in the browser history.
Breadcrumbs should remain unchanged, functionality should be mostly unchanged as well. This includes clearing the filters when removing the service. It might be possible to keep filters cached, so when users removing a service, and then add it again, the previous filters are applied, but the breakdown pages cache filters individually, so when a filter was removed from a single breakdown, and then the service removed, and then re-added, each breakdown would have different filters cached, although they weren't in the URL, so weren't being applied to the query, which was buggy. If we could figure out how to have a single cache for all filters in breakdown routes, users might not need to go back in the browser history as much, as filters would be cached to the service slug.
Functionality that did change:
Notes:
Follow ups (in another PR):