Hello,
I’m creating my very first data source using the new Grafana 7 plugin development model. The following code in my data source plugin substitutes the variable values in the query:
/**
* Override to apply template variables
*/
applyTemplateVariables(query: DataQueryFilter) {
if (query.filter) {
query.filter = getTemplateSrv().replace(query.filter);
}
return query;
}
This code works fine with a single value. However, when I change panel mode to “repeat by variable” each panel getting all values instead of a single value designated for this panel. Please see below:
Object
request:Object
url:"api/ds/query"
method:"POST"
data:Object
queries:Array[1]
0:Object
filter:"node={14,15} type=node metric=conns"
The expected value is node=14
for a first panel and node=15
for the second panel. Can you please advice, is it bug in Grafana or my underdeveloped code? Grafana v7.0.1 (ef5b586d7d). I found the similar GitHub issue, is it applicable here?
Thank you very much