Skip to content

Commit

Permalink
New Kibana app link order (#66320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michail Yasonik committed Jun 2, 2020
1 parent 5e2a78b commit 0247df4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/core/public/chrome/nav_links/to_nav_link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export function toNavLink(
legacy: isLegacyApp(app),
baseUrl,
...(isLegacyApp(app)
? {
href: url && !url.startsWith(app.subUrlBase!) ? url : baseUrl,
}
? {}
: {
href: url,
url,
Expand Down
7 changes: 6 additions & 1 deletion src/core/public/chrome/ui/header/nav_link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ export function createEuiListItem({
navigateToApp,
dataTestSubj,
}: Props) {
const { legacy, active, id, title, disabled, euiIconType, icon, tooltip, href } = link;
const { legacy, active, id, title, disabled, euiIconType, icon, tooltip } = link;
let { href } = link;

if (legacy) {
href = link.url && !active ? link.url : link.baseUrl;
}

return {
label: tooltip ?? title,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dashboard/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class DashboardPlugin
const app: App = {
id: DashboardConstants.DASHBOARDS_ID,
title: 'Dashboard',
order: -1001,
order: 2500,
euiIconType: 'dashboardApp',
defaultPath: `#${DashboardConstants.LANDING_PAGE_PATH}`,
updater$: this.appStateUpdater,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/discover/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class DiscoverPlugin
id: 'discover',
title: 'Discover',
updater$: this.appStateUpdater.asObservable(),
order: -1004,
order: 1000,
euiIconType: 'discoverApp',
defaultPath: '#/',
category: DEFAULT_APP_CATEGORIES.kibana,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/visualize/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class VisualizePlugin
core.application.register({
id: 'visualize',
title: 'Visualize',
order: -1002,
order: 8000,
euiIconType: 'visualizeApp',
defaultPath: '#/',
category: DEFAULT_APP_CATEGORIES.kibana,
Expand Down

0 comments on commit 0247df4

Please sign in to comment.