mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Stateful sidenav] Put recently accessed in footer for all solutions (#184298)
This commit is contained in:
parent
04d132f886
commit
4f2f30f52d
3 changed files with 7 additions and 4 deletions
|
@ -19,7 +19,6 @@ const icon = 'logoObservability';
|
|||
|
||||
const navTree: NavigationTreeDefinition = {
|
||||
body: [
|
||||
{ type: 'recentlyAccessed' },
|
||||
{
|
||||
type: 'navGroup',
|
||||
id: 'observability_project_nav',
|
||||
|
@ -232,6 +231,7 @@ const navTree: NavigationTreeDefinition = {
|
|||
},
|
||||
],
|
||||
footer: [
|
||||
{ type: 'recentlyAccessed' },
|
||||
{
|
||||
type: 'navItem',
|
||||
title: i18n.translate('navigation.obltNav.getStarted', {
|
||||
|
|
|
@ -80,7 +80,6 @@ export const getNavigationTreeDefinition = ({
|
|||
map(({ indices, searchApps, collections }) => {
|
||||
const navTree: NavigationTreeDefinition = {
|
||||
body: [
|
||||
{ type: 'recentlyAccessed' },
|
||||
{
|
||||
breadcrumbStatus: 'hidden',
|
||||
children: [
|
||||
|
@ -242,6 +241,7 @@ export const getNavigationTreeDefinition = ({
|
|||
},
|
||||
],
|
||||
footer: [
|
||||
{ type: 'recentlyAccessed' },
|
||||
{
|
||||
breadcrumbStatus: 'hidden',
|
||||
children: [
|
||||
|
|
|
@ -28,9 +28,12 @@ export const initSideNavigation = async (services: Services) => {
|
|||
const essNavigationTree$ = navigationTree$.pipe(
|
||||
map((navigationTree) =>
|
||||
produce(navigationTree, (draft) => {
|
||||
if (draft.footer) {
|
||||
draft.footer.unshift({ type: 'recentlyAccessed' });
|
||||
}
|
||||
const footerGroup: GroupDefinition | undefined = draft.footer?.find(
|
||||
({ type }) => type === 'navGroup'
|
||||
) as GroupDefinition;
|
||||
(node): node is GroupDefinition => node.type === 'navGroup'
|
||||
);
|
||||
const management = footerGroup?.children.find((child) => child.link === 'management');
|
||||
if (management) {
|
||||
management.renderAs = 'panelOpener';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue