-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Discover] Background search inspect in child flyout #250252
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
Open
akowalska622
wants to merge
45
commits into
elastic:main
Choose a base branch
from
akowalska622:discover-background-search-inspect-in-flyout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
87c4088
fix nested flyout issue
akowalska622 ee95011
refactor background search flyout to use openSystemFlyout and opt in …
akowalska622 957a0c0
improve styling of inspect flyout
akowalska622 75d51a9
prepare background search flyout for session
akowalska622 0f4c169
adjust styling
akowalska622 bbaa4dc
add inspect action to background searches flyout
akowalska622 0ab11bf
adjust flyouts to new system flyout service
akowalska622 f464751
don't hide the title
akowalska622 c550ecc
temp: fix flyoutMenuProps in system flyout service
akowalska622 bda99e4
add isWithinFlyout prop
akowalska622 18c5e23
improve closing behavior
akowalska622 78e80e6
Changes from node scripts/lint_ts_projects --fix
kibanamachine 1d0cd11
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine 4c82fb9
add minimal reproducible example for parent-child relationship bug
akowalska622 a078f97
Merge branch 'discover-background-search-inspect-in-flyout' of github…
akowalska622 d4be458
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 5cdac52
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 1f469bb
Merge branch 'discover-background-search-inspect-in-flyout' of github…
akowalska622 2911348
pull back in changes from fix 250332
akowalska622 dfc8a05
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 27674d5
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 b3b398b
Changes from node scripts/lint_ts_projects --fix
kibanamachine cb9821e
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine fb62c28
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 bb302d9
remove redundant code
akowalska622 3a819f6
Merge branch 'discover-background-search-inspect-in-flyout' of github…
akowalska622 fa8668b
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 4f9d821
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 e880d16
remove redundant test assertion
akowalska622 d6a6df8
Merge branch 'discover-background-search-inspect-in-flyout' of github…
akowalska622 22bc818
add flyout bug example back and enrich it with second flyout
akowalska622 ac86bad
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 6ea5497
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 5281a2a
remove bug example
akowalska622 b875879
add session name to the child flyout title
akowalska622 066186a
remove redundant allowedActions
akowalska622 26af7c8
set outsideClickCloses to true
akowalska622 5cea722
update IClickActionDescriptor type
akowalska622 3c6f2fa
remove wrong old aria-labelledby
akowalska622 e83c3c7
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 ee5d269
fix i18n syntax
akowalska622 9a107b5
Merge branch 'discover-background-search-inspect-in-flyout' of github…
akowalska622 7468bd2
Merge branch 'main' into discover-background-search-inspect-in-flyout
akowalska622 4d1639a
run i18n fix script
akowalska622 406e9f1
Merge branch 'discover-background-search-inspect-in-flyout' of github…
akowalska622 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
10 changes: 10 additions & 0 deletions
10
...lugins/shared/data/public/search/session/sessions_mgmt/components/inspect_flyout/index.ts
This file contains hidden or 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,10 @@ | ||
| /* | ||
| * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| export { InspectFlyout } from './inspect_flyout'; |
80 changes: 80 additions & 0 deletions
80
...red/data/public/search/session/sessions_mgmt/components/inspect_flyout/inspect_flyout.tsx
This file contains hidden or 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,80 @@ | ||
| /* | ||
| * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| import { EuiFlyoutBody, EuiSpacer, EuiText, type UseEuiTheme } from '@elastic/eui'; | ||
| import { FormattedMessage } from '@kbn/i18n-react'; | ||
| import React from 'react'; | ||
| import { css } from '@emotion/react'; | ||
| import { CodeEditor } from '@kbn/code-editor'; | ||
| import { useMemoCss } from '@kbn/css-utils/public/use_memo_css'; | ||
| import type { UISession } from '../../types'; | ||
|
|
||
| interface InspectFlyoutProps { | ||
| searchSession: UISession; | ||
| } | ||
|
|
||
| export const InspectFlyout: React.FC<InspectFlyoutProps> = ({ searchSession }) => { | ||
| const styles = useMemoCss(componentStyles); | ||
|
|
||
| const renderInfo = () => { | ||
| return ( | ||
| <div css={styles.jsonCodeEditor}> | ||
| <CodeEditor | ||
| languageId="json" | ||
| value={JSON.stringify(searchSession, null, 2)} | ||
| options={{ | ||
| readOnly: true, | ||
| lineNumbers: 'off', | ||
| fontSize: 12, | ||
| minimap: { | ||
| enabled: false, | ||
| }, | ||
| scrollBeyondLastLine: false, | ||
| wordWrap: 'on', | ||
| wrappingIndent: 'indent', | ||
| automaticLayout: true, | ||
| }} | ||
| /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| return ( | ||
| <EuiFlyoutBody css={styles.flyout} data-test-subj="searchSessionsFlyout"> | ||
| <EuiText> | ||
| <EuiText size="xs"> | ||
| <p> | ||
| <FormattedMessage | ||
| id="data.sessions.management.backgroundSearchFlyoutText" | ||
| defaultMessage="Configuration for this background search" | ||
| /> | ||
| </p> | ||
| </EuiText> | ||
| <EuiSpacer /> | ||
| {renderInfo()} | ||
| </EuiText> | ||
| </EuiFlyoutBody> | ||
| ); | ||
| }; | ||
|
|
||
| const componentStyles = { | ||
| flyout: css({ | ||
| '.euiFlyoutBody__overflowContent': { | ||
| height: '100%', | ||
| overflow: 'hidden', | ||
| '> div': { | ||
| height: '100%', | ||
| }, | ||
| }, | ||
| }), | ||
| jsonCodeEditor: ({ euiTheme }: UseEuiTheme) => | ||
| css({ | ||
| height: `calc(100% - ${euiTheme.size.l})`, | ||
| }), | ||
| }; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.