How to know in wich panel we are

Hello, i’m developing a datasource plugin and i need to know in which panel i am to make different query.

Did anyone know how to do this ?

Nicolas.

@nicolasdossantos248 my advice is to modify the query in the panel to include the information you need. datasource plugins only get information about the query and the mode they are (e.g. panel-editor, dashboard, explore page). A scoped variable might be also you want to setup in your panel.

Perhaps you can try asking what you are trying to achieve? maybe there’s a way to achieve it other than knowing which panel is querying the data.

Hello, Thank’s for the answer, for now i’m getting the url because in there there is the id of the panel.

Nicolas

@nicolasdossantos248 keep in mind those Ids are unique and the moment you create a new panel even with the same type and datasource queries it’ll change.

I don’t recommend using panel ids as a method to determine which type of panel is querying the data.

1 Like