I posted this a while ago as a reply to another question, which is a pretty comprehensive guide to creating navbarExtensions: Dev on Kibana plugin: navbar icon disappear when switching tabs. Your code here looks almost exactly the same as what I posted there, so perhaps you already found that ;).
The problem here is with the appName in your provider. From that thread:
You will need to define, at a minimum, an appName (the name of the app to inject into), a unique key, and I'd encourage you to add a label too since it'll display that text then, which can be more user-friendly.
appName is actually the name of the app you are trying to inject the button into, not the name of your app. So, for example, if you are trying to add a button to the Discover app, you would use discover, as that's the name attribute used in the kbn-top-nav directive. If you'd like to inject a navbar button into another app, refer to its kbn-top-nav use, and set the appName in your provider to match the name used in the template.
Most of the names are exactly what you would expect them to be. discover, visualize, dashboard, devtools... and it's pretty easy to look up by just searching the codebase for the kbn-top-nav directive. Just keep in mind that you have to register a nav control for every app you want to put a button in.
Hi @Joe_Fleming, in fact after debuggin my code I found that the problem was appName.
Changed it to dashboard and I have it on the dashboard app navbar.
Thank you again for the answer, hope this will be helpfull for someone in the future.
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.