-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[graph] implement k7Breadcrumbs (#26591)
* [graph] implement k7Breadcrumbs * [graph] implement real k7Breadcrumbs * hide workspace title in local nav in k7design
- Loading branch information
Spencer
committed
Dec 4, 2018
1 parent
53f7ed8
commit 757f836
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export function getHomeBreadcrumbs() { | ||
return [ | ||
{ | ||
text: i18n.translate('xpack.graph.home.breadcrumb', { | ||
defaultMessage: 'Graph' | ||
}), | ||
href: '#/home' | ||
} | ||
]; | ||
} | ||
|
||
export function getWorkspaceBreadcrumbs($route) { | ||
const { savedWorkspace } = $route.current.locals; | ||
|
||
return [ | ||
...getHomeBreadcrumbs(), | ||
{ | ||
text: savedWorkspace.title | ||
} | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters