-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[ML] Hide ES|QL based saved searches in ML & Transforms #195084
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; | |
| import React, { type FC, Fragment } from 'react'; | ||
|
|
||
| import { SavedObjectFinder } from '@kbn/saved-objects-finder-plugin/public'; | ||
| import type { FinderAttributes, SavedObjectCommon } from '@kbn/saved-objects-finder-plugin/common'; | ||
| import { useAppDependencies } from '../../../../app_dependencies'; | ||
|
|
||
| interface SearchSelectionProps { | ||
|
|
@@ -19,6 +20,8 @@ interface SearchSelectionProps { | |
| canEditDataView: boolean; | ||
| } | ||
|
|
||
| type SavedObject = SavedObjectCommon<FinderAttributes & { isTextBasedQuery?: boolean }>; | ||
|
|
||
| const fixedPageSize: number = 8; | ||
|
|
||
| export const SearchSelection: FC<SearchSelectionProps> = ({ | ||
|
|
@@ -64,6 +67,9 @@ export const SearchSelection: FC<SearchSelectionProps> = ({ | |
| defaultMessage: 'Saved search', | ||
| } | ||
| ), | ||
| showSavedObject: (savedObject: SavedObject) => | ||
|
Contributor
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. Interestingly the transform wizard used to partially work when selecting an ES|QL based saved search, successfully pulling out the index pattern from the search to use in the transform. However the other commands in the search (WHERE, RENAME, DROP etc) would be ignored, so I think this change is correct, filtering out ES|QL based saved searches until if / when the transform wizard supports the whole of the search. |
||
| // ES|QL Based saved searches are not supported in transforms, filter them out | ||
| savedObject.attributes.isTextBasedQuery !== true, | ||
| }, | ||
| { | ||
| type: 'index-pattern', | ||
|
|
||
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.
It covers: