I wrote a plugin for Kibana 7.5 and I'm porting it to Kibana 7.8. I need access to the filterManager from within my visualization file. Is there an example of how to do this in Kibana 7.8? In 7.5 I was able to do the following:
import { start as data } from "../../../../src/legacy/core_plugins/data/public/legacy";
From my research, I think I need to import DataPublicPluginSetup to get access to the filterManager, but when I import that value, it is always "undefined". Is there a example somewhere of how to access the filterManager in Kibana 7.8?
Are you attempting to migrate to the Kibana platform when doing this? If you have a kibana.json file, then that's the case and you need to pass the filter manager instance down from the setup method of your plugin class.
Yes. I've created a basic 7.8 plugin and now I'm trying to add my code from my 7.5 plugin into the 7.8 plugin. We are in the process of moving from 7.5 to 7.8. So I do have a kibana.json file. After posting this question, I did find that I'll have to add "data" to my requiredPlugins section of the kibana.json file to get access to DataPublicPluginSetup. Things like that is what I need to know because that is total different than how it was setup in 7.5. Can you point me to an example of how to pass that information on from my setup method? Here's my current setup method:
I see, it's a little more tricky in that case. You can store the reference to data passed into your setup/start methods in a module your import from in your actual visualization.
Check out how the reference to the format service is passed down in the metric visualization:
7.8 is a hard target for plugin development because a lot of things are in flux due to the migration to Kibana platform. Putting together better documentation and other material to write plugins is an important task on the roadmap/
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.