You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When panel repetition is enabled for a given template variable, the GraphQL query in each of the repeated panels is executed for all values of the template variable, rather than for the individual value in the specific panel.
For example, let's say we have a Grafana template variable called asset_id with multiple values 1, 2, 3. We also have a panel that's set to repeat for each value of asset_id. If in that panel we have the GraphQL query
then in principle the query in each panel should substitute each of the values of asset_id, with queries like id: 1, id: 2, id: 3. This is handled correctly for other datasources I've tried.
Instead, in each panel the query states id: 1,2,3, so the same (multi-value) result appears in each of the repeated panels.
I've reviewed some of the other issues/PRs relating to template variables, but I feel like this is separate. Happy to provide additional details if helpful!
The text was updated successfully, but these errors were encountered:
This seems to be a common issue with datasource plugins, e.g. stackdriver grafana/grafana#28672. That was fixed by adding scopedVars to the templateSrv.replace() call, which we already do. But maybe scopedVars isn't getting passed into createQuery() correctly...
When panel repetition is enabled for a given template variable, the GraphQL query in each of the repeated panels is executed for all values of the template variable, rather than for the individual value in the specific panel.
For example, let's say we have a Grafana template variable called
asset_id
with multiple values1, 2, 3
. We also have a panel that's set to repeat for each value ofasset_id
. If in that panel we have the GraphQL querythen in principle the query in each panel should substitute each of the values of
asset_id
, with queries likeid: 1
,id: 2
,id: 3
. This is handled correctly for other datasources I've tried.Instead, in each panel the query states
id: 1,2,3
, so the same (multi-value) result appears in each of the repeated panels.I've reviewed some of the other issues/PRs relating to template variables, but I feel like this is separate. Happy to provide additional details if helpful!
The text was updated successfully, but these errors were encountered: