-
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.
Browse files
Browse the repository at this point in the history
* Create a new menu for observability links. Use it on inentory page. * Change the order of props for clarity * Fix default message * Composition over configuration * Show ids and ips. PR feedback. * Don't wrap subtitle. Use fields in inventory model for name * Tooltip was becoming hacky. Keep it simple and wrap the id. * Create observability plugin. Add action menu to it. * Fix path * Satisfy linter and fix test * Please the linter * Update translastions * Update test for disabled links * Update more tests Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
512b9eb
commit 1b96001
Showing
17 changed files
with
243 additions
and
64 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
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
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,6 @@ | ||
{ | ||
"id": "observability", | ||
"version": "8.0.0", | ||
"kibanaVersion": "kibana", | ||
"ui": true | ||
} |
57 changes: 57 additions & 0 deletions
57
x-pack/plugins/observability/public/components/action_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,57 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { | ||
EuiPopover, | ||
EuiText, | ||
EuiListGroup, | ||
EuiSpacer, | ||
EuiHorizontalRule, | ||
EuiListGroupItem, | ||
EuiPopoverProps, | ||
} from '@elastic/eui'; | ||
|
||
import React, { HTMLAttributes } from 'react'; | ||
import { EuiListGroupItemProps } from '@elastic/eui/src/components/list_group/list_group_item'; | ||
|
||
type Props = EuiPopoverProps & HTMLAttributes<HTMLDivElement>; | ||
|
||
export const SectionTitle: React.FC<{}> = props => ( | ||
<> | ||
<EuiText size={'s'} grow={false}> | ||
<h5>{props.children}</h5> | ||
</EuiText> | ||
<EuiSpacer size={'s'} /> | ||
</> | ||
); | ||
|
||
export const SectionSubtitle: React.FC<{}> = props => ( | ||
<> | ||
<EuiText size={'xs'} color={'subdued'} grow={false}> | ||
<small>{props.children}</small> | ||
</EuiText> | ||
<EuiSpacer size={'s'} /> | ||
</> | ||
); | ||
|
||
export const SectionLinks: React.FC<{}> = props => ( | ||
<EuiListGroup flush={true} bordered={false}> | ||
{props.children} | ||
</EuiListGroup> | ||
); | ||
|
||
export const SectionSpacer: React.FC<{}> = () => <EuiSpacer size={'l'} />; | ||
|
||
export const Section: React.FC<{}> = props => <>{props.children}</>; | ||
|
||
export type SectionLinkProps = EuiListGroupItemProps; | ||
export const SectionLink: React.FC<EuiListGroupItemProps> = props => ( | ||
<EuiListGroupItem style={{ padding: 0 }} size={'s'} {...props} /> | ||
); | ||
|
||
export const ActionMenuDivider: React.FC<{}> = props => <EuiHorizontalRule margin={'s'} />; | ||
|
||
export const ActionMenu: React.FC<Props> = props => <EuiPopover {...props} ownFocus={true} />; |
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,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { PluginInitializerContext, PluginInitializer } from 'kibana/public'; | ||
import { Plugin, ClientSetup, ClientStart } from './plugin'; | ||
|
||
export const plugin: PluginInitializer<ClientSetup, ClientStart> = ( | ||
context: PluginInitializerContext | ||
) => { | ||
return new Plugin(context); | ||
}; | ||
|
||
export * from './components/action_menu'; |
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,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { Plugin as PluginClass, PluginInitializerContext } from 'kibana/public'; | ||
|
||
export type ClientSetup = void; | ||
export type ClientStart = void; | ||
|
||
export class Plugin implements PluginClass { | ||
constructor(context: PluginInitializerContext) {} | ||
start() {} | ||
setup() {} | ||
} |
Oops, something went wrong.