There is any way to refresh dashboard from react panel plugin?
Hi! Could you share some more details on your use case? Why do you want to refresh the dashboard?
Hi.
I develop my custom plugin in which we can send some value to the influx database. After pressing the send button, I would like the other plugins that display data from the database to be refreshed and show the current value.
Hm. I donāt believe think this is supported. My gut feeling tells me that full dashboard refresh is probably not something we expose to plugins, as it could potentially lead to poor experience. If this is something youād still like to see, Iād recommend that you submit an enhancement request.
Ok, thanks for help.
Did some research, and it seems like this was possible in Angular plugins by emitting a refresh event, but I donāt see the event emitter being exposed to React plugins. Iāll continue digging, and will update this topic once I know more.
Looks like event handling is still being worked on for React plugins:
I think I need some help. I donāt quite know how to use Event Bus in my component. The ā@ grafana / dataā module has no exported member similar to EventBus or EventBusSrv.
Iāve have accomplished this using
<a href="#" onclick="document.getElementsByClassName('btn btn--radius-right-0 navbar-button navbar-button--border-right-0')[0].click()">
inside a panel. Simple javascript that clicks the refresh button. Since this is possible, Iād think it would be worthwhile exposing as a better option.
Any news on this topic?
Hello @marcus, do we have any update on this feature?
Hello, is there any news ?
I know that the āData manipulationā plugin from @mikhailvolkov , accomplishes this using locationService.reload(), I implemented a refresh condition using that plugin and if you just want to refresh the dashboard it does the job, I had a small issue because the Grafana variables in the template were not being āclearedā, they kept their last value instead of refreshing the query but I had a workaround using locationService.replace(currentPath), and refreshing again.
I hope it helps.
In my case I use RunQuery() in the QueryEditor. it refresh the dashboard without reloading the page.
@nicolasdossantos248 RunQuery only reloads the specific panel the query is in, not all the dashboard.