Added "Select last used data source" to query view #590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We at Underdog.io are loving
redash
for setting up internal dashboards. We have 1 minor pain point which isredash:metadata
is always selected as the first data source for a new query. While we could delete theredash:metadata
, it would be really kicking the can down the road and not solving the problem.We had an idea to re-use the selection that a user had from the last time they change the data source (e.g. if I use "db-a", then I will see "db-a" selected the next time I create a new query). This PR is working solution for that. In this PR:
last_selected_data_source_id
inlocalStorage
as part ofdataSourceId
interactionsNotes:
I am not too familiar with Angular so I wasn't sure if
localStorage
should be injected as a dependency. If you have any requests for how the code should be organized or about using library (e.g.ded/kizzy
), please let me know.