Hiding some top navbar links like share,clone and edit from a plugin in kibana 6.2

Hi Team,

I am using the below mentioned way for registering my new links to top-nav bar which is successfully working for adding new links from my plugin but now I want to figure out if I can use the below code for disabling some of the pre-existing top-nav links like "share, clone etc" , if not it will be a great help if anyone can guide me in doing so

I am using kibana 6.2 in windows os.

import { NavBarExtensionsRegistryProvider } from 'ui/registry/navbar_extensions';

function navbarButtonProvider(Private, $location, dashboardConfig) {
return {
appName: 'dashboard',
key: 'logout',
label: 'logout',
template: ``,
description: 'test',
hideButton: () => false,
disableButton: () => false,
tooltip: () => 'logout',
run: ()=>{
window.location="../plugins/my-plugin/logout";
}
};
}

NavBarExtensionsRegistryProvider.register(navbarButtonProvider);

hi @Sunny_Sachan

have you tried it?

For something like this, maybe you don't need to rely on the Kibana-internals. You could always just use additional CSS and hide the offending buttons with display: none?

Many Thanks Thomas, its resolved using the same now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.