-
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
[Observability] Serverless navigation #157139
Changes from 5 commits
0ae6bd9
4fcef9b
2ffac4f
8a9c306
fc6d4ab
0fe01eb
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 |
---|---|---|
|
@@ -116,7 +116,7 @@ pageLoadAssetSize: | |
security: 65433 | ||
securitySolution: 66738 | ||
serverless: 16573 | ||
serverlessObservability: 16582 | ||
serverlessObservability: 30000 | ||
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. where did this limit come from? |
||
serverlessSearch: 22555 | ||
serverlessSecurity: 41807 | ||
sessionView: 77750 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import { CoreStart } from '@kbn/core/public'; | ||
import type { | ||
SideNavComponent, | ||
SideNavCompProps, | ||
} from '@kbn/core-chrome-browser/src/project_navigation'; | ||
import { ServerlessObservabilityPluginStartDependencies } from '../../types'; | ||
import { ObservabilitySideNavigation } from './side_navigation'; | ||
import { KibanaServicesProvider } from '../../services'; | ||
|
||
export const getObservabilitySideNavComponent = ( | ||
core: CoreStart, | ||
pluginsStart: ServerlessObservabilityPluginStartDependencies | ||
): SideNavComponent => { | ||
return (_props: SideNavCompProps) => ( | ||
<KibanaServicesProvider core={core} pluginsStart={pluginsStart}> | ||
<ObservabilitySideNavigation /> | ||
</KibanaServicesProvider> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import { SolutionNav } from '@kbn/shared-ux-page-solution-nav'; | ||
|
||
export function ObservabilitySideNavigation() { | ||
return ( | ||
<SolutionNav | ||
items={[ | ||
{ | ||
id: 'services-infra', | ||
name: undefined, | ||
items: [ | ||
{ | ||
id: 'services', | ||
name: 'Services', | ||
}, | ||
{ | ||
id: 'infra', | ||
name: 'Infrastructure', | ||
}, | ||
], | ||
}, | ||
|
||
{ | ||
id: 'alerts-cases-slos', | ||
name: undefined, | ||
items: [ | ||
{ | ||
id: 'alerts', | ||
name: 'Alerts', | ||
}, | ||
{ | ||
id: 'Cases', | ||
name: 'Cases', | ||
}, | ||
{ | ||
id: 'slos', | ||
name: 'SLOs', | ||
}, | ||
], | ||
}, | ||
|
||
{ | ||
id: 'signals', | ||
name: 'Signals', | ||
items: [ | ||
{ | ||
id: 'traces', | ||
name: 'Traces', | ||
}, | ||
{ | ||
id: 'logs', | ||
name: 'Logs', | ||
}, | ||
], | ||
}, | ||
|
||
{ | ||
id: 'toolbox', | ||
name: 'Toolbox', | ||
items: [ | ||
{ | ||
id: 'visualization', | ||
name: 'Visualization', | ||
}, | ||
{ | ||
id: 'dashboards', | ||
name: 'Dashboards', | ||
}, | ||
], | ||
}, | ||
]} | ||
canBeCollapsed={false} | ||
name={'Observability'} | ||
icon={'logoObservability'} | ||
closeFlyoutButtonPosition={'inside'} | ||
/> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import { | ||
KibanaContextProvider, | ||
useKibana as useKibanaReact, | ||
} from '@kbn/kibana-react-plugin/public'; | ||
import type { ServerlessObservabilityPluginStartDependencies } from './types'; | ||
|
||
export type Services = CoreStart & ServerlessObservabilityPluginStartDependencies; | ||
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: the type doesn't seem to be used in another file |
||
|
||
export const KibanaServicesProvider: React.FC<{ | ||
core: CoreStart; | ||
pluginsStart: ServerlessObservabilityPluginStartDependencies; | ||
}> = ({ core, pluginsStart, children }) => { | ||
const services: Services = { ...core, ...pluginsStart }; | ||
return <KibanaContextProvider services={services}>{children}</KibanaContextProvider>; | ||
}; | ||
|
||
export const useKibana = () => useKibanaReact<Services>(); | ||
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. Is this being used anywhere? |
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.
@ogupte @yngrdyn Any objections with enabling obs onboarding by default on serverless?