Skip to content

Using multiple-value variable in canvas button post #108527

@krzysiekkolodziej

Description

@krzysiekkolodziej

I have the same problem as: https://github.com/scottxusayhi #82041, could you please help me?

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)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions