Skip to content
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

Better template variable UX #614

Open
oplehto opened this issue Aug 23, 2024 · 0 comments
Open

Better template variable UX #614

oplehto opened this issue Aug 23, 2024 · 0 comments
Milestone

Comments

@oplehto
Copy link

oplehto commented Aug 23, 2024

Currently the template variable UI is quite limited and makes it much more difficult to develop queries compared to the normal query editor. A failed query does not give any indication on the output. Simply the results stop getting updated.

Also getting the actual SQL query with all the macros unrolled requires going to the query log to get something that can be pasted into the CLI for testing.

Getting template queries right is IMO even more important than individual panel queries because a bad template variable query can prevent the whole dashboard from loading.

So some things that could be improved in order of priority. I understand if some of these can't be realistically implemented due to the framework limitations.

  • Displaying the appropriate error when a query fails
  • Having a simple SQL query inspector to at least see the formatted query. The output JSON would be nice but not really absolutely necessary
  • Now that we there is default timeseries column name it should be possible to also use the $timeFilter macro in template variables, right?
  • Having some progress indicator that shows when a query is active in the editor
  • Automatically adding a comment to the query indicating the dashboard and possibly also the user ID, similarly to what is done in the normal panel queries. It would be helpful to also have some indication that this query is a template variable (and even the template variable name, if possible)
@Slach Slach added this to the 3.4.0 milestone Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants