How to allow only one query per panel in the query editor?

I am developing custom Datasource plugin where want to allow user to enter only one query from QueryEditor and it shouldn’t allow user to click Add Query button in same panel. Any suggestion will be appreciated.

Thanks,
Surendhar

I don’t believe you can limit the number of queries (though you can remove them altogether), unfortunately. Could you share more of your use case? Maybe there’s another way to accomplish what you want to do.

Hi Marcusolsson,

Thanks. Our backend db providing REST API that supports regex with different AND/OR conditions. Above REST API making single call, I will get all the required data.

If you suggest me to goahead with multiple queries( in single panel) calling above mentioned rest api sequentially one by one will work?

  • If yes, please kindly provide me sample example.

  • No means - I have to combine all of above queries and write go file(which will query backend ie., multiple calls) which will return single json response to datasource.js combining all of multiple queries response to single panel ?

Best Regards,
Surendhar

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.