From 2c3e924b12739ce1492dabd70b4fca1fa5bc65c5 Mon Sep 17 00:00:00 2001 From: Ryan Keairns Date: Fri, 2 Feb 2024 09:05:42 -0800 Subject: [PATCH 1/2] Update Management section --- src/plugins/navigation/public/workflows/observability.tsx | 4 ++-- src/plugins/navigation/public/workflows/search.tsx | 4 ++-- src/plugins/navigation/public/workflows/security.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/navigation/public/workflows/observability.tsx b/src/plugins/navigation/public/workflows/observability.tsx index 468a07f18af0f..df92d4fc6ba7a 100644 --- a/src/plugins/navigation/public/workflows/observability.tsx +++ b/src/plugins/navigation/public/workflows/observability.tsx @@ -206,7 +206,7 @@ const navigationTree: NavigationTreeDefinition = { type: 'navGroup', id: 'project_settings_project_nav', title: i18n.translate('navigation.nav.projectSettings', { - defaultMessage: 'Project settings', + defaultMessage: 'Management', }), icon: 'gear', breadcrumbStatus: 'hidden', @@ -214,7 +214,7 @@ const navigationTree: NavigationTreeDefinition = { { link: 'management', title: i18n.translate('navigation.nav.mngt', { - defaultMessage: 'Management', + defaultMessage: 'Stack Management', }), renderAs: 'panelOpener', children: [ diff --git a/src/plugins/navigation/public/workflows/search.tsx b/src/plugins/navigation/public/workflows/search.tsx index 9f5732b78e4e0..dcfc718d09f0b 100644 --- a/src/plugins/navigation/public/workflows/search.tsx +++ b/src/plugins/navigation/public/workflows/search.tsx @@ -128,7 +128,7 @@ const navigationTree: NavigationTreeDefinition = { type: 'navGroup', id: 'project_settings_project_nav', title: i18n.translate('navigation.nav.projectSettings', { - defaultMessage: 'Project settings', + defaultMessage: 'Management', }), icon: 'gear', breadcrumbStatus: 'hidden', @@ -136,7 +136,7 @@ const navigationTree: NavigationTreeDefinition = { { link: 'management', title: i18n.translate('navigation.nav.mngt', { - defaultMessage: 'Management', + defaultMessage: 'Stack Management', }), renderAs: 'panelOpener', children: [ diff --git a/src/plugins/navigation/public/workflows/security.tsx b/src/plugins/navigation/public/workflows/security.tsx index 68a94176c3ac9..86ab4b493d522 100644 --- a/src/plugins/navigation/public/workflows/security.tsx +++ b/src/plugins/navigation/public/workflows/security.tsx @@ -599,14 +599,14 @@ const navigationTree: NavigationTreeDefinition = { { type: 'navGroup', id: 'category-project_settings', - title: 'Project settings', + title: 'Management', icon: 'gear', breadcrumbStatus: 'hidden', children: [ { link: 'management', title: i18n.translate('navigation.nav.mngt', { - defaultMessage: 'Management', + defaultMessage: 'Stack Management', }), renderAs: 'panelOpener', children: [ From 6fff1d60468bf8182e99477718bd06d88402ba0c Mon Sep 17 00:00:00 2001 From: Ryan Keairns Date: Wed, 21 Feb 2024 07:44:34 -0800 Subject: [PATCH 2/2] Update switcher design as new commit --- .../src/ui/workspace_switcher_breadcrumb.tsx | 40 ++-- .../navigation/public/workflows/search.tsx | 222 +++++++++++++++--- 2 files changed, 206 insertions(+), 56 deletions(-) diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/workspace_switcher_breadcrumb.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/workspace_switcher_breadcrumb.tsx index 5f5d6a0ffe8bd..bf48d3c176a19 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/workspace_switcher_breadcrumb.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/workspace_switcher_breadcrumb.tsx @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { EuiContextMenuItem, EuiContextMenuPanel } from '@elastic/eui'; +import { EuiListGroup, EuiListGroupItem, EuiTitle, EuiSpacer, EuiLink } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import type { ChromeProjectBreadcrumb, Workflows } from '@kbn/core-chrome-browser'; @@ -19,24 +19,30 @@ export const getWorkspaceSwitcherBreadCrumb = ({ }): ChromeProjectBreadcrumb => { return { text: i18n.translate('core.ui.primaryNav.cloud.workflowLabel', { - defaultMessage: 'Workflow', + defaultMessage: 'My Kibana deployment', }), popoverContent: ( - ( - { - onWorkflowChange(id); - }} - > - {title} - - ))} - /> + <> + +

Solution view

+
+ + + {Object.values(workflows).map(({ id, title, icon = 'gear' }) => [ + { + onWorkflowChange(id); + }} + />, + ])} + + + View all deployments + ), - popoverProps: { panelPaddingSize: 'none', zIndex: 6000 }, + popoverProps: { panelPaddingSize: 'm', zIndex: 6000 }, }; }; diff --git a/src/plugins/navigation/public/workflows/search.tsx b/src/plugins/navigation/public/workflows/search.tsx index dcfc718d09f0b..06fe1e530f990 100644 --- a/src/plugins/navigation/public/workflows/search.tsx +++ b/src/plugins/navigation/public/workflows/search.tsx @@ -22,12 +22,22 @@ const navigationTree: NavigationTreeDefinition = { { type: 'navGroup', id: 'search_project_nav', - title: 'Elasticsearch', + title: 'Search', icon: 'logoElasticsearch', defaultIsCollapsed: false, isCollapsible: false, breadcrumbStatus: 'hidden', children: [ + { + id: 'search_getting_started', + title: i18n.translate('navigation.nav.gettingStarted', { + defaultMessage: 'Home', + }), + link: 'dev_tools:console', + getIsActive: ({ pathNameSerialized, prepend }) => { + return pathNameSerialized.startsWith(prepend('/app/home')); + }, + }, { id: 'dev_tools', title: i18n.translate('navigation.nav.search.devTools', { @@ -41,7 +51,7 @@ const navigationTree: NavigationTreeDefinition = { { id: 'explore', title: i18n.translate('navigation.nav.explore', { - defaultMessage: 'Explore', + defaultMessage: 'Kibana', }), children: [ { @@ -66,12 +76,6 @@ const navigationTree: NavigationTreeDefinition = { ); }, }, - { - link: 'management:triggersActions', - title: i18n.translate('navigation.nav.alerts', { - defaultMessage: 'Alerts', - }), - }, ], }, { @@ -82,29 +86,171 @@ const navigationTree: NavigationTreeDefinition = { children: [ { title: i18n.translate('navigation.nav.content.indices', { - defaultMessage: 'Index Management', + defaultMessage: 'Indices', + }), + link: 'management:index_management', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'accordion', + children: [ + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'search-github', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'accordion', + children: [ + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Overview', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'item', + }, + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Documents', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'item', + }, + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Index Mappings', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'item', + }, + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Pipelines', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'item', + }, + ], + }, + ], + }, + { + title: i18n.translate('navigation.nav.content.indices', { + defaultMessage: 'Connectors', + }), + link: 'management:triggersActionsConnectors', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + }, + { + title: i18n.translate('navigation.nav.content.indices', { + defaultMessage: 'Web crawlers', + }), + link: 'management:triggersActionsConnectors', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + }, + ], + }, + { + id: 'apps', + title: i18n.translate('navigation.nav.apps', { + defaultMessage: 'Applications', + }), + children: [ + { + title: i18n.translate('navigation.nav.content.indices', { + defaultMessage: 'AI playground', + }), + link: 'management:api_keys', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + }, + { + title: i18n.translate('navigation.nav.content.indices', { + defaultMessage: 'Search applications', }), link: 'management:index_management', breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'accordion', + children: [ + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Test', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'accordion', + children: [ + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Docs explorer', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'item', + }, + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Content', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'item', + }, + { + title: i18n.translate('navigation.nav.content.pipelines', { + defaultMessage: 'Connect', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + renderAs: 'item', + }, + ], + }, + ], }, { - title: i18n.translate('navigation.nav.content.pipelines', { - defaultMessage: 'Pipelines', + title: i18n.translate('navigation.nav.content.indices', { + defaultMessage: 'Behavioral analytics', }), - link: 'management:ingest_pipelines', + link: 'management:api_keys', breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, }, ], }, { - id: 'security', - title: i18n.translate('navigation.nav.security', { - defaultMessage: 'Security', + id: 'entsearch', + title: i18n.translate('navigation.nav.entsearch', { + defaultMessage: 'Enterprise Search', }), children: [ { + title: i18n.translate('navigation.nav.content.indices', { + defaultMessage: 'App Search', + }), + link: 'management:api_keys', + breadcrumbStatus: + 'hidden' /* management sub-pages set their breadcrumbs themselves */, + }, + { + title: i18n.translate('navigation.nav.content.indices', { + defaultMessage: 'Workplace Search', + }), link: 'management:api_keys', breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, @@ -115,15 +261,6 @@ const navigationTree: NavigationTreeDefinition = { }, ], footer: [ - { - type: 'navItem', - id: 'search_getting_started', - title: i18n.translate('navigation.nav.gettingStarted', { - defaultMessage: 'Get started', - }), - icon: 'launch', - link: 'home', - }, { type: 'navGroup', id: 'project_settings_project_nav', @@ -133,11 +270,18 @@ const navigationTree: NavigationTreeDefinition = { icon: 'gear', breadcrumbStatus: 'hidden', children: [ + { + title: i18n.translate('navigation.nav.projectSettings', { + defaultMessage: 'Trained models', + }), + link: 'fleet', + }, { link: 'management', title: i18n.translate('navigation.nav.mngt', { defaultMessage: 'Stack Management', }), + spaceBefore: null, renderAs: 'panelOpener', children: [ { @@ -199,21 +343,21 @@ const navigationTree: NavigationTreeDefinition = { }, ], }, - { - id: 'cloudLinkDeployment', - cloudLink: 'deployment', - title: i18n.translate('navigation.nav.performance', { - defaultMessage: 'Performance', - }), - }, - { - id: 'cloudLinkUserAndRoles', - cloudLink: 'userAndRoles', - }, - { - id: 'cloudLinkBilling', - cloudLink: 'billingAndSub', - }, + // { + // id: 'cloudLinkDeployment', + // cloudLink: 'deployment', + // title: i18n.translate('navigation.nav.performance', { + // defaultMessage: 'Performance', + // }), + // }, + // { + // id: 'cloudLinkUserAndRoles', + // cloudLink: 'userAndRoles', + // }, + // { + // id: 'cloudLinkBilling', + // cloudLink: 'billingAndSub', + // }, ], }, ],