-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Description
What happened?
I defined a dashboard varable ${var} with values 1,2,3, and some rows repeat by ${var}.
Inside each repeated row I hava a canvas button, where I used ${var} as part of the API address, e.g., https://jsonplaceholder.typicode.com/todos/${var}.
Here's the screenshot:
When I clicked the button in first row, I expect the API address would be https://jsonplaceholder.typicode.com/todos/1, but grafana resolved it to https://jsonplaceholder.typicode.com/todos/{1,2,3}
The same issue happed to query params and payloads fields.
What did you expect to happen?
If a canvas button is within a row that is repeated using ${var}, it will accurately substitute the template variable ${var} with the corresponding value for that row.
Did this work before?
No
How do we reproduce it?
- create a new dashboard
- define a new variable $var, with value 1,2,3
- create a row, repeated by $var, now we have 3 rows
- inside the row, create a new canvas button
- configure the API address of the button to https://jsonplaceholder.typicode.com/todos/${var}
- back to dashboard main view, now we have 3 buttons
- click any of the 3 button, observe the API address in browser console
Is the bug inside a dashboard panel?
No response
Environment (with versions)?
Grafana: v10.3
OS: macOS 13.6
Browser: Chrome 121.0.6167.139
Grafana platform?
None
Datasource(s)?
No response