-
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
[Logs+] Restore Dataset selection from page URL #161144
Merged
tonyghiani
merged 61 commits into
elastic:main
from
tonyghiani:160425-restore-dataset-selection
Jul 20, 2023
Merged
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
8b5af82
feat(discover-log-explorer): wip on mode state selection
3272648
feat(discover-log-explorer): wip on DatasetSelection data structures
d305f84
feat(discover-log-explorer): implement dataset selection strategies
1815c18
refactor(discover-log-explorer): update dataset selector to manage se…
68e70d8
tests(discover-log-explorer): add encoding/decoding tests
dc1b427
refactor(discover-log-explorer): remove empty line
24e5437
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine f483418
refactor(discover-log-explorer): improve state machine readability
de15dc6
Merge branch '160146-all-entry-dataset-selector' of github.com:tonygh…
6d24915
Merge branch 'main' into 160146-all-entry-dataset-selector
tonyghiani e9fa701
feat(discover-log-explorer): wip on restore selection
db5855f
feat(discover-log-explorer): update logic for initial work
b32adf5
feat(discover-log-explorer): add columns init
e93066f
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 4875476
refactor(discover-log-explorer): remove unused provider
70cac7e
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 7ab1ba9
refactor(discover-log-explorer): add restore error notification
16c437e
refactor(discover-log-explorer): add types to restore state machine
f9530ee
refactor(discover-log-explorer): remove imports
50ff8e0
refactor(discover-log-explorer): lazy load new machine
9046fe5
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine b796bd8
refactor(discover-log-explorer): update useLogExplorer hook
814555e
Merge branch '160425-restore-dataset-selection' of github.com:tonyghi…
3cc34df
refactor(discover-log-explorer): move services around
dafc59e
refactor(discover-log-explorer): reapply waiting for customizations
4f20c37
feat(discover-log-explorer): initialize data view by state machine
7603b61
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 9705194
fix(discover-log-explorer): create time based data view
443cf5f
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 8d44f3e
refactor(discover-log-explorer): extract state machine notifications
4423ee2
Merge branch '160425-restore-dataset-selection' of github.com:tonyghi…
006c0b1
refactor(discover-log-explorer): remove conflict marker
85157e1
refactor(discover-log-explorer): minor changes
f465566
test(discover-log-explorer): add suite for restore selection
6f5f6a0
refactor(discover): initialization flag for customizationService
4c252af
refactor(discover): update test
f1f8db8
refactor(discover): remove action
b34be9c
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani d09060b
refactor(discover): rename discover state action
58f7804
refactor(discover): update initialization flow for discover
9657834
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani ec9e636
refactor(discover): remove unused import
56dbe58
Merge branch '160425-restore-dataset-selection' of github.com:tonyghi…
1839921
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 7703b9f
refactor(discover): move back appState sync
da9afac
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani eb66346
refactor(discover): update comments
8f88c40
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 524137c
refactor(discover): update test
5e2624a
refactor(discover): remove import
600230f
refactor(discover-log-explorer): add serverless test
c5e98cd
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 3efdb4e
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani a7cae5e
refactor(discover): switch back to original approach
0da335d
refactor(discover): update test
4773ab7
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 65b44fa
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 42f029d
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani d97e26c
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani f736edf
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 8fe91cc
Merge branch 'main' into 160425-restore-dataset-selection
tonyghiani 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
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
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
13 changes: 0 additions & 13 deletions
13
x-pack/plugins/discover_log_explorer/public/hooks/use_data_view.ts
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
x-pack/plugins/discover_log_explorer/public/hooks/use_log_explorer_profile.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,29 @@ | ||
/* | ||
* 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 { useSelector } from '@xstate/react'; | ||
import { useCallback } from 'react'; | ||
import { LogExplorerProfileStateService } from '../state_machines/log_explorer_profile'; | ||
import { DatasetSelectionChange } from '../utils/dataset_selection'; | ||
|
||
export const useLogExplorerProfile = ( | ||
logExplorerProfileStateService: LogExplorerProfileStateService | ||
) => { | ||
const datasetSelection = useSelector( | ||
logExplorerProfileStateService, | ||
(state) => state.context.datasetSelection | ||
); | ||
|
||
const handleDatasetSelectionChange: DatasetSelectionChange = useCallback( | ||
(data) => { | ||
logExplorerProfileStateService.send({ type: 'UPDATE_DATASET_SELECTION', data }); | ||
}, | ||
[logExplorerProfileStateService] | ||
); | ||
|
||
return { datasetSelection, handleDatasetSelectionChange }; | ||
}; |
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
x-pack/plugins/discover_log_explorer/public/state_machines/log_explorer_profile/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,8 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export * from './src'; |
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.
note: parallelize the lazy loading for the required deps to keep the bundle size the smallest possible.