Possible bug with new TextBox variable in 5.3

Using 5.3.0, Docker, Elasticsearch datasource.

Testing out the new 5.3.0 release, and looking forward to the new TextBox variable type for templates. I’ve taken a clean docker install of 5.3, created a new dashboard with a textbox variable. However, the variable is not added to the Metric query as expected:

TextBox name: mytextbox
Metric tab - Query - Lucene Query field: $mytextbox
Query Inspector below. Notice that the variable is being passed as the variable name ($mytextbox) rather than the field I have typed into the text box.

Not sure if this is a bug, or perhaps I am using it wrong?




data:"{“search_type”:“query_then_fetch”,“ignore_unavailable”:true,“index”:“cs2-*”,“max_concurrent_shard_requests”:256} {“size”:0,“query”:{“bool”:{“filter”:[{“range”:{"@timestamp":{“gte”:“1539281082063”,“lte”:“1539284682063”,“format”:“epoch_millis”}}},{“query_string”:{“analyze_wildcard”:true,“query”:"$mytextbox"}}]}},“aggs”:{“2”:{“date_histogram”:{“interval”:“5s”,“field”:"@timestamp",“min_doc_count”:0,“extended_bounds”:{“min”:“1539281082063”,“max”:“1539284682063”},“format”:“epoch_millis”},“aggs”:{}}}} "

The work around for this issue is to dump your browser’s cache and then reconnect.

Hi there, I have the same problem with a text box variable and InfluxDB datasource. The GUI also doesn’t recognize it as a variable (not getting blue, stays white in the metrics view).
In another Dash I don’t have this problem though, in the same browser session (Chromium). I already cleared the browser cache. If I look in the query editor the variable doesn’t get substituted:

“pathlevel1” =~ /$freetext/

, same with

“pathlevel1” =~ /^$freetext$/

Also tried in Firefox, where I never use Grafana, same problem here. Why is this working in one dash and not in the other ??

The on empty issue can be addressed with this PR: Add on empty option to TextBox