paveldanilin / grafana-csv-plugin

CSV datasource for Grafana 6.x.x / 7.x.x
MIT License
36 stars 12 forks source link

Support for variables #25

Closed ralgozino closed 4 years ago

ralgozino commented 4 years ago

Hi!

Could you please consider adding support for variables?

We have some graphs that we would like to repeat for the different values of a dashboard variable, but the value doesn't get replaced in the query. Otherwise, I would have to copy and paste the same panel 22 times, and if I change something re-do again 22 times the modification.

For example, if I define a variable $myvar that has values val1 selected, and then use the query for a panel SELECT field FROM table WHERE column="$myvar", $myvar doesn't get replaced by val1.

Maybe this link could be useful: https://grafana.com/docs/grafana/latest/developers/plugins/add-support-for-variables/

Thank you!

paveldanilin commented 4 years ago

Hi!

No problem, it will take a couple of days

paveldanilin commented 4 years ago

Hi!

Could you test the latest change and confirm whether it works for your case or not?

ralgozino commented 4 years ago

Seems to be working as expected! thank you!

paveldanilin commented 4 years ago

If you have other ideas on how the plugin can be improved, please share them with me