-
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
[serverless][poc] Unified Navigation #153274
Closed
clintandrewhall
wants to merge
7
commits into
serverless/poc/main
from
serverless/poc/unified_navigation
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c97ce81
Disable plugins for serverless.
clintandrewhall dd04ada
Add chrome style, project header.
clintandrewhall 7e1a9f2
Serverless plugin
clintandrewhall 5a0a626
Observability Serverless plugin
clintandrewhall 03e8824
Security Serverless plugin
clintandrewhall 89bd09c
Search Serverless plugin
clintandrewhall 82e2f22
fix security test
semd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
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,7 @@ | ||
xpack.apm.enabled: false | ||
xpack.uptime.enabled: false | ||
|
||
enterpriseSearch.enabled: true | ||
xpack.serverless.search.enabled: true | ||
|
||
uiSettings.overrides.defaultRoute: /app/enterprise_search/content/search_indices |
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 |
---|---|---|
@@ -1 +1,8 @@ | ||
xpack.infra.logs.app_target: discover | ||
enterpriseSearch.enabled: false | ||
xpack.cloudSecurityPosture.enabled: false | ||
xpack.securitySolution.enabled: false | ||
|
||
xpack.serverless.observability.enabled: true | ||
|
||
uiSettings.overrides.defaultRoute: /app/observability/overview |
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,8 @@ | ||
enterpriseSearch.enabled: false | ||
xpack.apm.enabled: false | ||
xpack.observability.enabled: false | ||
xpack.uptime.enabled: false | ||
|
||
xpack.serverless.security.enabled: true | ||
|
||
uiSettings.overrides.defaultRoute: /app/security/get_started |
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 |
---|---|---|
@@ -1,2 +1,19 @@ | ||
newsfeed.enabled: false | ||
xpack.security.showNavLinks: false | ||
xpack.serverless.plugin.enabled: true | ||
xpack.fleet.enableExperimental: ['fleetServerStandalone'] | ||
xpack.fleet.internal.disableILMPolicies: true | ||
|
||
# Management team plugins | ||
xpack.upgrade_assistant.enabled: false | ||
xpack.rollup.enabled: false | ||
xpack.watcher.enabled: false | ||
xpack.ccr.enabled: false | ||
xpack.ilm.enabled: false | ||
xpack.remote_clusters.enabled: false | ||
xpack.snapshot_restore.enabled: false | ||
xpack.license_management.enabled: false | ||
|
||
# Other disabled plugins | ||
xpack.canvas.enabled: false | ||
xpack.reporting.enabled: false |
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
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
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
90 changes: 90 additions & 0 deletions
90
packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx
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,90 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Router } from 'react-router-dom'; | ||
import { EuiHeader, EuiHeaderLogo, EuiHeaderSection, EuiHeaderSectionItem } from '@elastic/eui'; | ||
import { | ||
ChromeBreadcrumb, | ||
ChromeGlobalHelpExtensionMenuLink, | ||
ChromeHelpExtension, | ||
ChromeNavControl, | ||
} from '@kbn/core-chrome-browser/src'; | ||
import { Observable } from 'rxjs'; | ||
import { MountPoint } from '@kbn/core-mount-utils-browser'; | ||
import { InternalApplicationStart } from '@kbn/core-application-browser-internal'; | ||
import { HeaderBreadcrumbs } from '../header/header_breadcrumbs'; | ||
import { HeaderActionMenu } from '../header/header_action_menu'; | ||
import { HeaderHelpMenu } from '../header/header_help_menu'; | ||
import { HeaderNavControls } from '../header/header_nav_controls'; | ||
import { ProjectNavigation } from './navigation'; | ||
|
||
interface Props { | ||
breadcrumbs$: Observable<ChromeBreadcrumb[]>; | ||
actionMenu$: Observable<MountPoint | undefined>; | ||
kibanaDocLink: string; | ||
globalHelpExtensionMenuLinks$: Observable<ChromeGlobalHelpExtensionMenuLink[]>; | ||
helpExtension$: Observable<ChromeHelpExtension | undefined>; | ||
helpSupportUrl$: Observable<string>; | ||
kibanaVersion: string; | ||
application: InternalApplicationStart; | ||
navigation: JSX.Element; | ||
navControlsRight$: Observable<ChromeNavControl[]>; | ||
} | ||
|
||
export const ProjectHeader = ({ | ||
application, | ||
kibanaDocLink, | ||
kibanaVersion, | ||
navigation, | ||
...observables | ||
}: Props) => { | ||
const renderLogo = () => ( | ||
<EuiHeaderLogo | ||
iconType="logoElastic" | ||
href="#" | ||
onClick={(e) => e.preventDefault()} | ||
aria-label="Go to home page" | ||
/> | ||
); | ||
|
||
return ( | ||
<> | ||
<EuiHeader position="fixed"> | ||
<EuiHeaderSection grow={false}> | ||
<EuiHeaderSectionItem border="right">{renderLogo()}</EuiHeaderSectionItem> | ||
<EuiHeaderSectionItem> | ||
<HeaderBreadcrumbs breadcrumbs$={observables.breadcrumbs$} /> | ||
</EuiHeaderSectionItem> | ||
</EuiHeaderSection> | ||
<EuiHeaderSection side="right"> | ||
<EuiHeaderSectionItem> | ||
<HeaderHelpMenu | ||
globalHelpExtensionMenuLinks$={observables.globalHelpExtensionMenuLinks$} | ||
helpExtension$={observables.helpExtension$} | ||
helpSupportUrl$={observables.helpSupportUrl$} | ||
kibanaDocLink={kibanaDocLink} | ||
kibanaVersion={kibanaVersion} | ||
navigateToUrl={application.navigateToUrl} | ||
/> | ||
</EuiHeaderSectionItem> | ||
<EuiHeaderSectionItem border="left"> | ||
<HeaderActionMenu actionMenu$={observables.actionMenu$} /> | ||
</EuiHeaderSectionItem> | ||
|
||
<EuiHeaderSectionItem> | ||
<HeaderNavControls navControls$={observables.navControlsRight$} /> | ||
</EuiHeaderSectionItem> | ||
</EuiHeaderSection> | ||
</EuiHeader> | ||
<Router history={application.history}> | ||
<ProjectNavigation>{navigation}</ProjectNavigation> | ||
</Router> | ||
</> | ||
); | ||
}; |
9 changes: 9 additions & 0 deletions
9
packages/core/chrome/core-chrome-browser-internal/src/ui/project/index.ts
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,9 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export { ProjectHeader } from './header'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
❤️
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.
This likely needs to change to core router in prod. @vadimkibana and @lukeelmers , can you weigh in?
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.
Not completely sure, would need to play with the code, but it might be already good. As the
application.history
is the one from "core", so it sort of already is the "core router".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.
I believe the
history
here is pulling from core's internal application service contract, which means it is the global (unscoped) history instance that's currently only accessible to core.We'll need to think about what we want to expose here for the project navs in serverless. Since the navs could be anything, it may be hard to avoid leaking the global history. cc @pgayvallet @rudolf
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.
The project nav isn't / shouldn't be scoped to a given plugin path, so using the global history seems fine to me, especially given its usage will be isolated in Core code / packages