-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Logs UI] Add shared observability page template and navigation (#99380)
Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
7fc4a1f
commit 06d276e
Showing
30 changed files
with
680 additions
and
234 deletions.
There are no files selected for viewing
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
41 changes: 41 additions & 0 deletions
41
x-pack/plugins/observability/public/components/app/header/header_menu.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,41 @@ | ||
/* | ||
* 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 { EuiHeaderLink, EuiHeaderLinks } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
import { usePluginContext } from '../../../hooks/use_plugin_context'; | ||
import HeaderMenuPortal from '../../shared/header_menu_portal'; | ||
|
||
export function ObservabilityHeaderMenu(): React.ReactElement | null { | ||
const { | ||
appMountParameters: { setHeaderActionMenu }, | ||
core: { | ||
http: { | ||
basePath: { prepend }, | ||
}, | ||
}, | ||
} = usePluginContext(); | ||
|
||
return ( | ||
<HeaderMenuPortal setHeaderActionMenu={setHeaderActionMenu}> | ||
<EuiHeaderLinks> | ||
<EuiHeaderLink | ||
color="primary" | ||
href={prepend('/app/home#/tutorial_directory/logging')} | ||
iconType="indexOpen" | ||
> | ||
{addDataLinkText} | ||
</EuiHeaderLink> | ||
</EuiHeaderLinks> | ||
</HeaderMenuPortal> | ||
); | ||
} | ||
|
||
const addDataLinkText = i18n.translate('xpack.observability.home.addData', { | ||
defaultMessage: 'Add data', | ||
}); |
18 changes: 0 additions & 18 deletions
18
x-pack/plugins/observability/public/components/app/header/index.test.tsx
This file was deleted.
Oops, something went wrong.
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
48 changes: 0 additions & 48 deletions
48
x-pack/plugins/observability/public/components/app/layout/with_header.tsx
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.