Skip to content

Commit

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

* typefix

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
mattkime and kibanamachine committed Aug 2, 2021
1 parent e771748 commit 63ec458
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 63ec458

Please sign in to comment.