-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
[Bug] Templating - json parse fails when using another template variable in query #5615
Comments
For completeness, When I remove the $Storage_instance variable and hard-code a name, the lookup works with the following
|
+1 |
So this seems to be working fine with top of the tree. I guess it got fixed sometime recently. Confirmation would be nice. ./bin/grafana-server -v |
maybe it was fixed by this commit? |
can try to cherry pick that to 3.1.x branch and have it included in next patch release |
this is now in 3.1.x branch, will be included in next patch. |
Sorry for the late reply.. I did try the patch it and it works! Thanks! |
Please include this information:
Version 3.1.0 (commit: v3.1.0)
Elasticsearch
Ubuntu 14.04
When building a template with query that uses another template variable, often times json parse fails because of escaping of special characters.
My query looks like:
{"find": "terms", "field": "storageInstances.lunInstances.name", "query":"storageInstances.name:$Storage_instances"}
Where for example, the $Storage_instances = "cent7-pbs-client-app__ST__storage-1"
According to chrome console, the query being json parsed is:
The stack trace shows:
If I use json formatter on the above query, it complains of an invalid character when "-" is escaped.
I believe the template should handle escaping of template variables according to json standards.
The text was updated successfully, but these errors were encountered: