-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add side navigation component for serverless search #156465
Changes from 1 commit
0493ffb
5da6e09
5b8f09d
2fef742
cd1cad8
4199a7a
90c150a
12a8673
897ffcf
dcba408
1980903
00a3b5e
4945a14
ad537f1
15be9ad
f11f607
e7bc9ba
c309b1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { CoreStart } from '@kbn/core/public'; | ||
import { | ||
Navigation, | ||
NavigationKibanaProvider, | ||
NavItemProps, | ||
} from '@kbn/shared-ux-chrome-navigation'; | ||
import React from 'react'; | ||
|
||
const navItems: NavItemProps[] = [ | ||
{ | ||
name: '', | ||
id: 'root', | ||
items: [ | ||
{ id: 'overview', name: 'Overview', href: '/app/enterprise_search/overview' }, | ||
{ id: 'indices', name: 'Indices', href: '/app/enterprise_search/content/search_indices' }, | ||
{ id: 'engines', name: 'Engines', href: '/app/enterprise_search/content/engines' }, | ||
{ id: 'api_keys', name: 'API keys', href: '/app/management/security/api_keys' }, | ||
{ | ||
id: 'ingest_pipelines', | ||
name: 'Ingest pipelines', | ||
href: '/app/management/ingest/ingest_pipelines', | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
export const serverlessSearchSideNavComponentProvider = (core: CoreStart) => () => | ||
( | ||
<NavigationKibanaProvider core={core}> | ||
<Navigation | ||
solutions={[ | ||
{ | ||
id: 'search_project_nav', | ||
items: navItems, | ||
name: 'Search', | ||
icon: 'logoEnterpriseSearch', | ||
}, | ||
]} | ||
activeNavItemId="search_project_nav.root.overview" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: is this hardcoded string needed for now? Shouldn't we leave it empty until we receive this state from the Chrome service? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left code in to set the activeNavItemId to |
||
platformConfig={{}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Shouldn't we set |
||
homeHref="/app/enterprise_search/content/setup_guide" | ||
linkToCloud="projects" | ||
/> | ||
</NavigationKibanaProvider> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: These links were copied from the serverless Search nav from an earlier POC: 89bd09c#diff-a3106909413d188596dc1162e4fc5d4f884f4fd9b3a4eca6c03666bb5d35dbb9R24-R45