Hi,
I try to add multiple custom nav link under a new category in the kibana menu.
I used the setCustomNavLink function but it allows you only to add one menu item only. Is there another solution ?
Regards
Hi,
I try to add multiple custom nav link under a new category in the kibana menu.
I used the setCustomNavLink function but it allows you only to add one menu item only. Is there another solution ?
Regards
Are you developing a custom plugin and want to add it to the navLink
sidebar?
You need to register your client-side application with Application service | Kibana Guide [8.0] | Elastic
and set a category
it belongs to.
import { AppMountParameters, CoreSetup, Plugin, DEFAULT_APP_CATEGORIES } from 'kibana/public';
export class MyPlugin implements Plugin {
public setup(core: CoreSetup) {
core.application.register({
category: DEFAULT_APP_CATEGORIES.kibana,
id: 'my-plugin',
title: 'my plugin title',
order: 100,
appRoute: '/app/my_plugin', // optional. /app/{id} will be used by default
async mount(params: AppMountParameters) { ... }
});
}
}
Thanks for your reply @Mikhail_Shustov,
I am developing a plugins but I want to add others navLinks to the menu bar, not the one of my plugin
I want to add others navLinks to the menu bar, not the one of my plugin
Well, we didn't support it out-of-the-box since it breaks incapsulation. However, nothing prevents you from registering some links on behalf of your plugin.
core.application.register({
category: DEFAULT_APP_CATEGORIES.kibana,
id: 'my-plugin',
title: 'my plugin title',
order: 100,
appRoute: '/a-well-known-route',
async mount(params: AppMountParameters) {
const { application } = await core.getStartServices();
application.navigateToApp(...) or application.navigateToUrl()
}
});
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.