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

Fix template variables multi-select #855

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aangelisc
Copy link
Contributor

Allow multi-select of template variables in the builder editor.

The problem here was that we were quoting the template variable values. I've tested this with multiple filters/group bys and the quoting doesn't seem necessary so I've removed it.

Let me know if you find any cases where this may not be the case!

Updated the docs to reflect that these variables will now work in the builder.

Fixes #823

@aangelisc aangelisc added the enhancement New feature or request label Apr 11, 2024
@aangelisc aangelisc self-assigned this Apr 11, 2024
@aangelisc aangelisc requested a review from a team as a code owner April 11, 2024 17:16
Copy link

Use the following command to run this PR with Docker at http://localhost:3000:

docker run --rm -p 3000:3000 grafana/plugin-builds:b2e8388e5529192931e9f19cff9d01361f08d3f0pre

Copy link
Contributor

@bossinc bossinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work when I create constants without quotes, but I don't think we should be modifying template variable values in components. That should be done in applyTemplateVars function in datasource

@adamyeats adamyeats self-requested a review April 18, 2024 16:54
@aangelisc
Copy link
Contributor Author

This doesn't seem to work when I create constants without quotes, but I don't think we should be modifying template variable values in components. That should be done in applyTemplateVars function in datasource

Good callout @bossinc, I'll take a look at just implementing this in applyTemplateVariables (and how to handle quoted values).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template variables in Builder
3 participants