Hello,
I am trying to make a new react panel plugin which allows me to upload a config file and save it to the database. I have done something similar on grafana 6 where I if I extend MetricsPanelCtrl I can just call
(in the onClick handler)
this.datasource.custommethod().then(
handle results.
)
However, in Grafana 7 the panel is a function component. So there is no this state. My question is how do I get the datasource in the new framework and ensure it is a type that can call my custom methods?
thanks,
Dennis