Hi
I developed a custom plugin for Kibana 7.17.0 and when I enable the autoRefresh in the Visualization editor page it works ok, but when I add the custom plugin to an empty dashboard it doesn't refresh when autoRefresh is enabled in the dashboard
Also, I noticed that if besides the custom plugin I add a default Kibana plugin like "Metric" of "Cloud Tag" to the dashboard, the custom plugin starts to autoRefresh as expected.
I see that not all of Kibana default plugins work with the dashboard autoRefresh, for example the Markdown plugin autoRefreshes in the editor but not when added to a dashboard.
Besides calling the handler.done after the custom plugin is rendered, is there anything additional I need to implement in the custom plugin to make it work with the autoRefresh of the dashboards?
// best way in a dashboard to estimate that panels are updated is to rely in search session service state waitUntilNextSessionCompletes$(search.session).pipe(finalize(done))
The session needs to be marked as complete, and after that the auto_refresh_loop done method is called. I found out that in the timeline plugin they are calling trackSession and untrackSession and this triggers changing the session state to complete, see kibana/timelion_request_handler.ts at 7.17 · elastic/kibana · GitHub
After calling those methods in my code the auto refresh worked and I didn’t have to call the autoRefresh API. The way that Kibana handles the dashboard session was affecting the autoRefresh logic, not sure if this only happens in Kibana 7.17.0
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.