From fb8b162931b86bb4e830c666f5db46d5d01cc7e6 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Sun, 1 Aug 2021 22:28:46 -0400 Subject: [PATCH] [apm] use IndexPattern instead of IIndexPattern (#107187) (#107349) * use IndexPattern instead of IIndexPattern * typefix Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Matthew Kime --- .../apm/public/components/shared/kuery_bar/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx b/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx index 72c5bac1f9f17..8358837cac563 100644 --- a/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx @@ -11,7 +11,7 @@ import React, { useState } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import { esKuery, - IIndexPattern, + IndexPattern, QuerySuggestion, } from '../../../../../../../src/plugins/data/public'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; @@ -29,7 +29,7 @@ interface State { isLoadingSuggestions: boolean; } -function convertKueryToEsQuery(kuery: string, indexPattern: IIndexPattern) { +function convertKueryToEsQuery(kuery: string, indexPattern: IndexPattern) { const ast = esKuery.fromKueryExpression(kuery); return esKuery.toElasticsearchQuery(ast, indexPattern); } @@ -125,7 +125,10 @@ export function KueryBar(props: { prepend?: React.ReactNode | string }) { } try { - const res = convertKueryToEsQuery(inputValue, indexPattern); + const res = convertKueryToEsQuery( + inputValue, + indexPattern as IndexPattern + ); if (!res) { return; }