How to access DataSource.getResource() in the Plugin ConfigEditor

Hi,
is there a way to access the DataSource props in the ConfigEditor already?
I would like to query a resource endpoint in my DataSource Plugin to show some actual usage stats and thought the config page could be a good place to use.

in QueryEditorProps the DataSource is available.
in DataSourcePluginOptionsEditorProps its missing. (propably due to the fact, that there is no datasource before config…)

Hello,

The reason why DataSource props are not available in the ConfigEditor is because the datasource may not exist yet (or it may not be updated with the latest changes made to the form).

For your use case, it’s better to include a dashboard with the stats you want to show: https://grafana.com/developers/plugin-tools/how-to-guides/data-source-plugins/include-dashboards