Query default datasource from Panel Plugin

Hello,

I am developing a panel plugin for a very specific use case, long story short it will be a Panel used to filter different results, some sort of a “search form” given that current filter options do not fit the purpose for my use case.

This panel needs 3 queries in order to fetch all the data it needs to work and it needs to be able to execute them several times if some of the dropdowns change. For example upon selecting a value on a dropdown I need to be able to query the datasource for more information.

I’ve been looking and I have not been able to find a way of doing a query to the selected Datasource for the panel. Is there any way from the PanelPlugin to obtain such datasource and just perform queries directly without having to write them on the QueryEditor?

Thanks!

I’m not sure I understand. If I understand you correctly, you want to build a panel that requires several queries from multiple data sources. This should be possible with the Mixed data source that lets you select a data source for each query in a panel.

Regarding the drop-down, I assume you’re referring to creating a dashboard variable that you use to create a templated query. If the value of that variable changes, the queries will be run again.

Is there any way from the PanelPlugin to obtain such datasource and just perform queries directly without having to write them on the QueryEditor?

Can you elaborate on this?