-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geomap: Add ability to select a data query filter for each layer #49966
Conversation
…e layer queues off of query data
…me. Lift data frame selection up a level in order to add some more complex error handling.
…ana into mmandrus/geomap-data-layers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmandrus -- this looks great, thanks for sticking with it :)
I pushed a small commit that changes the text displayed in the dropdown. I think we can improve this component in a new PR.
I recall you had previously implemented logic that looked tried to re-sync the current value with a new value when the refID changes. I think that is OK, but should happen in FrameSelectionEditor
not the base layer implementation
…lways use the context of the last layer
Hate to keep this one going, but while re-adding the query ID recovery logic, I discovered a bug in the onFilterChange callback. If we don't add the layer name as a dependency, we always use the "last" version of the callback, which updates the wrong layer. Also re-added the recovery logic, using redux to store the previous dropdown state after every update. |
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/21498 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
What this PR does / why we need it:
Right now, the Geomap panel always uses the first query in the list, so users are not able to fully visualize all of their data. This fix allows users to select which query to use in each layer. It also includes some handling for when queries are renamed or deleted that will keep the UI up to date.
Which issue(s) this PR fixes:
Fixes #48274