mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
# Conflicts: # x-pack/plugins/apm/public/services/kuery.ts
This commit is contained in:
parent
d70a731ffc
commit
3cdc32f93f
3 changed files with 5 additions and 13 deletions
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
import { KBN_FIELD_TYPES } from '../../../../utils/kbn_field_types';
|
||||
import { get } from 'lodash';
|
||||
|
||||
const filterableTypes = KBN_FIELD_TYPES.filter(type => type.filterable).map(type => type.name);
|
||||
|
||||
|
@ -26,7 +27,7 @@ export function isFilterable(field) {
|
|||
}
|
||||
|
||||
export function getFromSavedObject(savedObject) {
|
||||
if (!savedObject) {
|
||||
if (get(savedObject, 'attributes.fields') === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query';
|
||||
import { getAutocompleteProvider } from 'ui/autocomplete_providers';
|
||||
// @ts-ignore
|
||||
import { getFromSavedObject } from 'ui/index_patterns/static_utils';
|
||||
import { getAPMIndexPattern } from './rest/savedObjects';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { first, isEmpty, memoize } from 'lodash';
|
||||
import { memoize } from 'lodash';
|
||||
import chrome from 'ui/chrome';
|
||||
import { callApi } from './callApi';
|
||||
|
||||
|
@ -34,15 +34,7 @@ export const getAPMIndexPattern = memoize(async () => {
|
|||
}
|
||||
});
|
||||
|
||||
if (isEmpty(res.saved_objects)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const apmSavedObject = first(
|
||||
res.saved_objects.filter(
|
||||
savedObject => savedObject.attributes.title === apmIndexPatternTitle
|
||||
)
|
||||
return res.saved_objects.find(
|
||||
savedObject => savedObject.attributes.title === apmIndexPatternTitle
|
||||
);
|
||||
|
||||
return apmSavedObject;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue