mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
This commit is contained in:
parent
981b9f18e6
commit
bd19868e00
1 changed files with 9 additions and 4 deletions
|
@ -29,17 +29,22 @@ class CodeMain extends React.Component<Props> {
|
|||
}
|
||||
|
||||
public componentDidUpdate() {
|
||||
chrome.breadcrumbs.pop();
|
||||
this.setBreadcrumbs();
|
||||
}
|
||||
|
||||
public setBreadcrumbs() {
|
||||
const { org, repo } = this.props.match.params;
|
||||
chrome.breadcrumbs.push({ text: `${org} → ${repo}` });
|
||||
const { resource, org, repo } = this.props.match.params;
|
||||
chrome.breadcrumbs.set([
|
||||
{ text: 'Code', href: '#/' },
|
||||
{
|
||||
text: `${org} → ${repo}`,
|
||||
href: `#/${resource}/${org}/${repo}`,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
chrome.breadcrumbs.pop();
|
||||
chrome.breadcrumbs.set([{ text: 'Code', href: '#/' }]);
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue