grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
134 stars 20 forks source link

Exporting scenes app as panel plugin, variables in dashboard are not available when panel renders #684

Open LLKCoder opened 5 months ago

LLKCoder commented 5 months ago

Hi, i want to use grafana plugin tools to develop a functionally enhanced grafana log panel plugin, but grafana plugin tools do not have an interface to directly obtain the log panel. I used the PanelBuilders.logs() of grafana scene to obtain the log panel

截屏2024-04-10 09 52 35

and exported it as a panel plugin (named custom-log).

截屏2024-04-10 09 54 26

A problem occurred when I added custom-log to the dashboard: when the custom-log panel was rendered, the values ​​of all variables in the current dashboard were unavailable, and the variables in the query statements of other panels under the same dashboard were all unavailable. like: dashboard has a variables, named param, value is 123, use a query to fetch http://xxxx?param=$param, the query url is just http://xxxx?param=$param, $param will not transfrom to 123. Thank you very much for answering my question

torkelo commented 5 months ago

This is not supported yet, should be able to support this in the future