I'm trying to develop a simple Kibana plugin using the React framework (library, to be precise).
Now, I'm not a React expert and I'm having problems with a couple of minor tasks.
When I generate a plugin using the plugin generator and I specify the title of the plugin in the index.js file, I can find the new tab in the main sidebar BUT I cannot find a way to put a logo (either one of the Kibana EuiIcon or a custom svg logo) next to the write. Where (which file and portion of code) do I have to specify which logo to be seen in the navbar?
Generating the plugin, I noticed the arrow to Collapse/Expand the sidebar at the bottom of the sidebar disappeared. Why did it happen and how can I reinsert it?
Just to make it clear what I am talking about, I'll post here the image of the original Kibana 7.0 interface (where you can see the collapse/expand arrow) and then the image of the Kibana 7.0 interface with my added plugin (where you can see the missing icon and the disappeared collapse/expand arrow).
Also, in this case I wanted to add a new tab and it came for free with the plugin generator. What if I wanted to make an additional visualization and so visualize my custom icon only at visualization creation time?
Is there any reliable resource where to find such info?
Ok, the euiIconType worked but I cannot find a way to use a custom svg.
I tried putting a sample svg file into the public/ folder and then typing icon: './public/AJ_Digital_Camera.svg' but it didn't load anything in the sidebar.
Well, apart from the fact I was only able to do it if developing a plugin with version >= 7.2, since previously the plugin generator generates the plugin folder my_sample_plugin inside the kibana-extra folder which is a sibling of the kibana folder (so I do not actually have the plugins/my_sample_plugin folder at development time, do I?).
But even starting a new project (plugin development) with the 7.3 version (so having the my_sample_plugin folder been created inside the kibana/plugins/ folder) I still cannot see anything putting icon: 'plugins/my_sample_plugin/AJ_Digital_Camera.svg' inside the index.json and the svg file inside kibana/plugins/my_sample_plugin/ folder.
What am I doing wrong?
P.S. generating a plugin with the 7.3 version I initially see a king of custom write (2 letters) as custom icon but I cannot figure out where they are coming from. Let's say my plugin name is kt_mixed_stuff and the title Kt Mixed Stuff I see the icon KM when launching the plugin without specifying any icon in the index.json.
It works flawlessly (in 7.3)! Thank you so much!
I guess it's not very intuitive the fact the the path you are referring to in icon: path does not coincide with the actual path.
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.