mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[unified search] Query string input uses data views plugin directly instead of via deprecated data plugin reference (#143611)
* use data views plugin * remove unneeded dependency * use data views plugin * fix type * type fix * supply dataViews as depedency * supply dataViews as depeden
This commit is contained in:
parent
b1a88f5c61
commit
631c24abf4
26 changed files with 105 additions and 18 deletions
|
@ -15,6 +15,7 @@
|
|||
"kibanaReact",
|
||||
"savedObjects",
|
||||
"data",
|
||||
"dataViews",
|
||||
"kibanaUtils"
|
||||
],
|
||||
"configPath": ["xpack", "stack_alerts"],
|
||||
|
|
|
@ -11,7 +11,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { fromKueryExpression, luceneStringToDsl } from '@kbn/es-query';
|
||||
import type { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public';
|
||||
import type { DataView } from '@kbn/data-plugin/common';
|
||||
import type { DataView, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
|
||||
import type { Query } from '@kbn/es-query';
|
||||
import { QueryStringInput } from '@kbn/unified-search-plugin/public';
|
||||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
|
@ -45,6 +45,7 @@ const DEFAULT_VALUES = {
|
|||
interface KibanaDeps {
|
||||
http: HttpSetup;
|
||||
docLinks: DocLinksStart;
|
||||
dataViews: DataViewsPublicPluginStart;
|
||||
uiSettings: IUiSettingsClient;
|
||||
notifications: CoreStart['notifications'];
|
||||
storage: IStorageWrapper;
|
||||
|
@ -79,7 +80,7 @@ export const GeoContainmentAlertTypeExpression: React.FunctionComponent<
|
|||
boundaryNameField,
|
||||
} = ruleParams;
|
||||
|
||||
const { http, docLinks, uiSettings, notifications, storage, usageCollection } =
|
||||
const { http, docLinks, uiSettings, notifications, storage, usageCollection, dataViews } =
|
||||
useKibana<KibanaDeps>().services;
|
||||
|
||||
const [indexPattern, _setIndexPattern] = useState<DataView>({
|
||||
|
@ -226,6 +227,7 @@ export const GeoContainmentAlertTypeExpression: React.FunctionComponent<
|
|||
docLinks,
|
||||
uiSettings,
|
||||
data,
|
||||
dataViews,
|
||||
storage,
|
||||
usageCollection,
|
||||
}}
|
||||
|
@ -281,6 +283,7 @@ export const GeoContainmentAlertTypeExpression: React.FunctionComponent<
|
|||
docLinks,
|
||||
uiSettings,
|
||||
data,
|
||||
dataViews,
|
||||
storage,
|
||||
usageCollection,
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue