Skip to content

Commit ace40c4

Browse files
committed
[dev tools] Hide app link when there are no tools
1 parent cebf834 commit ace40c4

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/core_plugins/kibana/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ module.exports = function (kibana) {
7070
description: 'compose visualizations for much win',
7171
icon: 'plugins/kibana/assets/dashboard.svg',
7272
}, {
73+
id: 'kibana:dev_tools',
7374
title: 'Dev Tools',
7475
order: 9001,
7576
url: '/app/kibana#/dev_tools',

src/core_plugins/kibana/public/kibana.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import 'ui/agg_types';
2020
import 'ui/timepicker';
2121
import Notifier from 'ui/notify/notifier';
2222
import 'leaflet';
23+
import DevToolsRegistryProvider from 'ui/registry/dev_tools';
2324

2425
routes.enable();
2526

@@ -49,3 +50,11 @@ chrome
4950
});
5051

5152
modules.get('kibana').run(Notifier.pullMessageFromUrl);
53+
54+
modules.get('kibana').run(function (Private) {
55+
const hasTools = !!Private(DevToolsRegistryProvider).length;
56+
if (!hasTools) {
57+
const navLink = chrome.getNavLinkById('kibana:dev_tools');
58+
navLink.hidden = true;
59+
}
60+
});

0 commit comments

Comments
 (0)