Hello,
I need to programmatically get access to the selected datasources from within the panel editor.
Within the panel itself, this is easily feasible: From the panel properties, I can get the request.targets
which contains all the configured queries. These queries contain information like the datasource id and type which I can use to get the actual data source by by using getDataSourceSrv()
.
However, I don’t see anything like that in the properties that are passed to the editor. The context
prop includes the data and also some meta data, but not an identifier for the data source.
Does anyone have an idea?