-
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
[Embeddable Rebuild] [Saved Search] Migrate saved search embeddable to new embeddable framework #180536
Merged
Heenawter
merged 144 commits into
elastic:main
from
Heenawter:refactor-saved-search_2024-04-05
Jul 22, 2024
Merged
[Embeddable Rebuild] [Saved Search] Migrate saved search embeddable to new embeddable framework #180536
Changes from all commits
Commits
Show all changes
144 commits
Select commit
Hold shift + click to select a range
401a86e
Going to move embeddable registry back to Discover plugin
Heenawter ed20b74
Move back to Discover plugin
Heenawter bb088e1
Fix unlink bug
Heenawter 2fcf18d
Fix some typing
Heenawter d4e70b3
Move embeddable registration to saved search plugin
Heenawter 6d66c47
Move fixing after moving embeddable
Heenawter 135735d
Going to move embeddable back to Discover LOL - too much shared code
Heenawter 9fa6d18
Move back to Discover
Heenawter 136d656
Starting to figure it out... maybe
Heenawter fb2398c
Working on getting fetching to work
Heenawter 438bfa0
Switch to new fetch subscription
Heenawter d2f9cbb
Some small cleanups
Heenawter 115180b
Starting to make column callbacks work
Heenawter c8730c2
Small cleanup + getting more actions working
Heenawter 01f3647
Delete duplicated code
Heenawter da65460
Make filtering work
Heenawter ed654cf
Do some component separation + get parent filtering to work
Heenawter 810fbae
Do some more cleanup
Heenawter faf8ce2
Rearrange some things
Heenawter 26c50c0
Tiny cleanup
Heenawter 43976a5
Starting to convert tests
Heenawter d2b6f98
Modify + add search source tests
Heenawter 3f02cec
Clean up to run tests
Heenawter 14ac3c8
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine c128ace
Work on adding editing + unlink still broken
Heenawter ec0fafb
Clean up merge conflicts
Heenawter 7eae7c2
Change how app target is fetched
Heenawter 9b5440a
Conditionally add edit capabilities
Heenawter 87dba53
Do some more cleanup after merge
Heenawter 8ff3ed0
Register saved object
Heenawter 8ebda3f
Fix error caused by merge conflict
Heenawter de3f1a2
Fix comparator
Heenawter 357920c
Add runtime state type
Heenawter 770532a
Clean up merge conflicts
Heenawter eece65d
Working on getting saved search working after merge
Heenawter d439c6c
Get link + unlink working
Heenawter 095a023
Make sort work
Heenawter 1921699
Fix state diffing
Heenawter 6e99ece
Fix defaults
Heenawter b367de5
Fix default title/description + remove attribute service
Heenawter 923a080
Fix titles + descriptions when unlinking
Heenawter c31e36b
Merge branch 'main' of github.com:elastic/kibana into refactor-saved-…
Heenawter 90b21d9
Fix merge conflict
Heenawter 41c80fe
Fix clone panel
Heenawter ad5710c
Cleaner fix for cloning
Heenawter d8a5cd1
Fix references backup
Heenawter 76cbb98
Fix editing of by reference
Heenawter 9030b49
Make runtime state serializable
Heenawter 034a9b7
Fix filter actions
Heenawter a121a07
Fix types
Heenawter 5e028e3
Fix ESQL
Heenawter 6be016f
Do some initial clean up
Heenawter e2e6dc4
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine dae85af
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine a0e1358
Make timeslice work with ESQL
Heenawter 51bd00e
Merge branch 'refactor-saved-search_2024-04-05' of github.com:heenawt…
Heenawter 63ae404
Fix some types
Heenawter f25f68f
Fix hit count
Heenawter ee2b882
Fix more types
Heenawter 5197cdd
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 29d82cb
Merge branch 'main' of github.com:elastic/kibana into refactor-saved-…
Heenawter a91953c
Fix merge conflicts
Heenawter 6e23e4e
Fix some test failures
Heenawter 70518d5
Fix more types
Heenawter 5e6e7bf
Remove clone fix + change save behaviour of saved search
Heenawter 067b078
Small cleanup
Heenawter 6ba2864
Add fetch warnings + fix titles + fix time range
Heenawter b3bec84
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 53b2c3b
Fix sorting for ES|QL tables
Heenawter 655be4f
Fix execution context
Heenawter ef3e11d
Fix types
Heenawter e6f0985
Fix loading + sample size
Heenawter 9514e6a
Clean up the search embeddable API
Heenawter 2018ee3
More cleanup + fix failing tests
Heenawter e6d8437
More cleanup + fix state bug
Heenawter 7b545d7
Merge branch 'main' of github.com:elastic/kibana into refactor-saved-…
Heenawter dfeac53
Do some more cleanup
Heenawter 6eab288
Undo changes to saved search grid
Heenawter a4637f1
Fix imports
Heenawter cdf5287
More cleanup + fix tests
Heenawter 16dd8c4
Add context to comment
Heenawter 5810551
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 40ba2d4
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 4648fb2
More clean up + add tests
Heenawter 15069c2
Merge branch 'refactor-saved-search_2024-04-05' of github.com:heenawt…
Heenawter d87d622
Fix duplication
Heenawter 1504436
stash runtime state
Heenawter faf7653
Merge branch 'main' into refactor-saved-search_2024-04-05
kibanamachine da99bd1
Fix merge conflict
Heenawter 8ab617a
More more cleanup + fix timeslice fetching
Heenawter fd15e75
Add time range to fetch API
Heenawter c2a9ea7
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 3a1c230
Undo container changes
Heenawter 299fb66
Add `getByValueRuntimeSnapshot`
Heenawter 3e34cf8
Fix Canvas types
Heenawter 6c92c40
Use non-legacy unlink action
Heenawter 8169f8d
Undo changes to `duplicate_dashboard_panel`
Heenawter 53580df
Merge branch 'main' into refactor-saved-search_2024-04-05
kibanamachine ff01107
Remove unused export
Heenawter 31669d2
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 4362c2e
Address `TODO`
Heenawter af76713
Add time range to `FieldStatsTable`
Heenawter 83ef665
Merge branch 'main' of github.com:elastic/kibana into refactor-saved-…
Heenawter 59090fd
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter c8013da
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 7ebcf02
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 72c6f7c
Remove `breakdownField`
Heenawter 5e3c453
Add embeddable tests
Heenawter 76b5d43
Fix import
Heenawter 0202cc5
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 66cd738
Re-add `toSavedSearch` test
Heenawter 48e6cfe
Fix unnecessary promise
Heenawter dd4db62
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine f0df3bb
Fix types in test
Heenawter da72b44
Fix by-reference overwrite state
Heenawter 0d74cd8
Mark `serializeState` as `async`
Heenawter 2fc8a7f
Replace `serializable` in deserialize and remove it from serialize
Heenawter a5bdb62
Fix max allowed sample size
Heenawter 17f855b
Fix `hidePanelTitles`
Heenawter 53a02a8
Fix panel-level filters
Heenawter f6361c1
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 94aeb72
Fix imports
Heenawter fcfa1b1
Fix comment
Heenawter 3ba4ce9
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter b846b83
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 3883fe1
Fix grid
Heenawter 080e20a
Fix typo in comment
Heenawter 1430d53
Fix type of mock
Heenawter 7ba7df4
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 113048a
Fix add new panel + backup with runtime state
Heenawter 510fedc
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter e96522e
Make saved search plugin changes
Heenawter 6491931
Merge branch 'refactor-saved-search_2024-04-05' of github.com:heenawt…
Heenawter 6de3429
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter bfcf0cf
Remove unnecessary filters update
Heenawter 1b61a41
Merge branch 'refactor-saved-search_2024-04-05' of github.com:heenawt…
Heenawter 177fed2
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 19cf82a
Remove `id` from `toSavedSearch` + rename
Heenawter 2c9e264
More small cleanups
Heenawter 78c2f60
Use saved search columns in field stats table
Heenawter 9e24c2d
Clean up abort controller
Heenawter 229d241
Add refetch test + fix `onAddFilter`
Heenawter 0ece8d7
Fix failing tests
Heenawter 56d65a8
Merge branch 'main' into refactor-saved-search_2024-04-05
Heenawter 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
import { pluck } from 'rxjs'; | ||
import { lastValueFrom } from 'rxjs'; | ||
import { i18n } from '@kbn/i18n'; | ||
import type { Query, AggregateQuery, Filter } from '@kbn/es-query'; | ||
import { Query, AggregateQuery, Filter, TimeRange } from '@kbn/es-query'; | ||
import type { Adapters } from '@kbn/inspector-plugin/common'; | ||
import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; | ||
import type { ExpressionsStart } from '@kbn/expressions-plugin/public'; | ||
|
@@ -30,6 +30,7 @@ export function fetchEsql({ | |
query, | ||
inputQuery, | ||
filters, | ||
inputTimeRange, | ||
dataView, | ||
abortSignal, | ||
inspectorAdapters, | ||
|
@@ -40,14 +41,15 @@ export function fetchEsql({ | |
query: Query | AggregateQuery; | ||
inputQuery?: Query; | ||
filters?: Filter[]; | ||
inputTimeRange?: TimeRange; | ||
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. This makes it so that ES|QL saved searches now respond to the dashboard timeslider - previously, the timeslice was ignored. |
||
dataView: DataView; | ||
abortSignal?: AbortSignal; | ||
inspectorAdapters: Adapters; | ||
data: DataPublicPluginStart; | ||
expressions: ExpressionsStart; | ||
profilesManager: ProfilesManager; | ||
}): Promise<RecordsFetchResponse> { | ||
const timeRange = data.query.timefilter.timefilter.getTime(); | ||
const timeRange = inputTimeRange ?? data.query.timefilter.timefilter.getTime(); | ||
return textBasedQueryStateToAstWithValidation({ | ||
filters, | ||
query, | ||
|
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.
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.
This used to be handled by the
RenderCompleteDispatcher
, but new React embeddables no longer use this - however, since legacy embeddables are still using theRenderCompleteDispatcher
, we cannot move this logic into the Presentation Panel component until all embeddables are converted to the new React embeddable system. Therefore, this will be updated to be the actual render count in #179376.