Skip to content

Commit 0247df4

Browse files
author
Michail Yasonik
authored
New Kibana app link order (#66320)
1 parent 5e2a78b commit 0247df4

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

src/core/public/chrome/nav_links/to_nav_link.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ export function toNavLink(
4242
legacy: isLegacyApp(app),
4343
baseUrl,
4444
...(isLegacyApp(app)
45-
? {
46-
href: url && !url.startsWith(app.subUrlBase!) ? url : baseUrl,
47-
}
45+
? {}
4846
: {
4947
href: url,
5048
url,

src/core/public/chrome/ui/header/nav_link.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ export function createEuiListItem({
5555
navigateToApp,
5656
dataTestSubj,
5757
}: Props) {
58-
const { legacy, active, id, title, disabled, euiIconType, icon, tooltip, href } = link;
58+
const { legacy, active, id, title, disabled, euiIconType, icon, tooltip } = link;
59+
let { href } = link;
60+
61+
if (legacy) {
62+
href = link.url && !active ? link.url : link.baseUrl;
63+
}
5964

6065
return {
6166
label: tooltip ?? title,

src/plugins/dashboard/public/plugin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export class DashboardPlugin
228228
const app: App = {
229229
id: DashboardConstants.DASHBOARDS_ID,
230230
title: 'Dashboard',
231-
order: -1001,
231+
order: 2500,
232232
euiIconType: 'dashboardApp',
233233
defaultPath: `#${DashboardConstants.LANDING_PAGE_PATH}`,
234234
updater$: this.appStateUpdater,

src/plugins/discover/public/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export class DiscoverPlugin
188188
id: 'discover',
189189
title: 'Discover',
190190
updater$: this.appStateUpdater.asObservable(),
191-
order: -1004,
191+
order: 1000,
192192
euiIconType: 'discoverApp',
193193
defaultPath: '#/',
194194
category: DEFAULT_APP_CATEGORIES.kibana,

src/plugins/visualize/public/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class VisualizePlugin
102102
core.application.register({
103103
id: 'visualize',
104104
title: 'Visualize',
105-
order: -1002,
105+
order: 8000,
106106
euiIconType: 'visualizeApp',
107107
defaultPath: '#/',
108108
category: DEFAULT_APP_CATEGORIES.kibana,

0 commit comments

Comments
 (0)