Skip to content

Commit

Permalink
[apm] use IndexPattern instead of IIndexPattern (#107187) (#107349)
Browse files Browse the repository at this point in the history
* use IndexPattern instead of IIndexPattern

* typefix

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Matthew Kime <[email protected]>
  • Loading branch information
kibanamachine and mattkime authored Aug 2, 2021
1 parent 983f484 commit fb8b162
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fb8b162

Please sign in to comment.