mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
This commit is contained in:
parent
a0a749e270
commit
e447134243
16 changed files with 136 additions and 49 deletions
|
@ -20,7 +20,5 @@
|
|||
export { buildEsQuery, EsQueryConfig } from './build_es_query';
|
||||
export { buildQueryFromFilters } from './from_filters';
|
||||
export { luceneStringToDsl } from './lucene_string_to_dsl';
|
||||
export { migrateFilter } from './migrate_filter';
|
||||
export { decorateQuery } from './decorate_query';
|
||||
export { filterMatchesIndex } from './filter_matches_index';
|
||||
export { getEsQueryConfig } from './get_es_query_config';
|
||||
|
|
|
@ -21,13 +21,14 @@ import { omit, get } from 'lodash';
|
|||
import { Filter } from './meta_filter';
|
||||
|
||||
export * from './build_filters';
|
||||
export * from './get_filter_params';
|
||||
export * from './get_filter_field';
|
||||
|
||||
export * from './custom_filter';
|
||||
export * from './exists_filter';
|
||||
export * from './geo_bounding_box_filter';
|
||||
export * from './geo_polygon_filter';
|
||||
export * from './get_display_value';
|
||||
export * from './get_filter_field';
|
||||
export * from './get_filter_params';
|
||||
export * from './get_index_pattern_from_filter';
|
||||
export * from './match_all_filter';
|
||||
export * from './meta_filter';
|
||||
export * from './missing_filter';
|
||||
|
|
|
@ -19,6 +19,5 @@
|
|||
import * as esQuery from './es_query';
|
||||
import * as esFilters from './filters';
|
||||
import * as esKuery from './kuery';
|
||||
import * as utils from './utils';
|
||||
|
||||
export { esFilters, esQuery, utils, esKuery };
|
||||
export { esFilters, esQuery, esKuery };
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import { get, isUndefined } from 'lodash';
|
||||
import { getPhraseScript } from '../../filters';
|
||||
import { getFields } from './utils/get_fields';
|
||||
import { getTimeZoneFromSettings } from '../../utils/get_time_zone_from_settings';
|
||||
import { getTimeZoneFromSettings } from '../../utils';
|
||||
import { getFullFieldNameNode } from './utils/get_full_field_name_node';
|
||||
|
||||
import * as ast from '../ast';
|
||||
|
|
|
@ -22,7 +22,7 @@ import { nodeTypes } from '../node_types';
|
|||
import * as ast from '../ast';
|
||||
import { getRangeScript } from '../../filters';
|
||||
import { getFields } from './utils/get_fields';
|
||||
import { getTimeZoneFromSettings } from '../../utils/get_time_zone_from_settings';
|
||||
import { getTimeZoneFromSettings } from '../../utils';
|
||||
import { getFullFieldNameNode } from './utils/get_full_field_name_node';
|
||||
|
||||
export function buildNodeParams(fieldName, params) {
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './get_time_zone_from_settings';
|
||||
export * from './get_index_pattern_from_filter';
|
||||
export * from './get_display_value';
|
|
@ -22,19 +22,75 @@ export function plugin(initializerContext: PluginInitializerContext) {
|
|||
return new DataPublicPlugin(initializerContext);
|
||||
}
|
||||
|
||||
export * from '../common';
|
||||
/**
|
||||
* Types to be shared externally
|
||||
* @public
|
||||
*/
|
||||
export { IRequestTypesMap, IResponseTypesMap } from './search';
|
||||
export * from './types';
|
||||
export {
|
||||
// field formats
|
||||
ContentType, // only used in agg_type
|
||||
FIELD_FORMAT_IDS,
|
||||
IFieldFormat,
|
||||
IFieldFormatId,
|
||||
IFieldFormatType,
|
||||
// index patterns
|
||||
IIndexPattern,
|
||||
IFieldType,
|
||||
IFieldSubType,
|
||||
// kbn field types
|
||||
ES_FIELD_TYPES,
|
||||
KBN_FIELD_TYPES,
|
||||
// query
|
||||
Query,
|
||||
// timefilter
|
||||
RefreshInterval,
|
||||
TimeRange,
|
||||
} from '../common';
|
||||
|
||||
/**
|
||||
* Static code to be shared externally
|
||||
* @public
|
||||
*/
|
||||
export * from './autocomplete_provider';
|
||||
export * from './field_formats_provider';
|
||||
export * from './index_patterns';
|
||||
|
||||
export * from './types';
|
||||
|
||||
export { IRequestTypesMap, IResponseTypesMap } from './search';
|
||||
export * from './search';
|
||||
export * from './query';
|
||||
|
||||
export * from './ui';
|
||||
export {
|
||||
// es query
|
||||
esFilters,
|
||||
esKuery,
|
||||
esQuery,
|
||||
// field formats
|
||||
BoolFormat,
|
||||
BytesFormat,
|
||||
ColorFormat,
|
||||
DateFormat,
|
||||
DateNanosFormat,
|
||||
DEFAULT_CONVERTER_COLOR,
|
||||
DurationFormat,
|
||||
FieldFormat,
|
||||
getHighlightRequest, // only used in search source
|
||||
IpFormat,
|
||||
NumberFormat,
|
||||
PercentFormat,
|
||||
RelativeDateFormat,
|
||||
SourceFormat,
|
||||
StaticLookupFormat,
|
||||
StringFormat,
|
||||
TEXT_CONTEXT_TYPE, // only used in agg_types
|
||||
TruncateFormat,
|
||||
UrlFormat,
|
||||
// index patterns
|
||||
isFilterable,
|
||||
// kbn field types
|
||||
castEsToKbnFieldTypeName,
|
||||
getKbnFieldType,
|
||||
getKbnTypeNames,
|
||||
} from '../common';
|
||||
|
||||
// Export plugin after all other imports
|
||||
import { DataPublicPlugin } from './plugin';
|
||||
|
|
|
@ -30,7 +30,7 @@ import {
|
|||
} from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import React, { Component } from 'react';
|
||||
import { mapAndFlattenFilters, esFilters, utils, IIndexPattern } from '../..';
|
||||
import { mapAndFlattenFilters, esFilters, IIndexPattern } from '../..';
|
||||
import { FilterLabel } from '../filter_bar';
|
||||
|
||||
interface Props {
|
||||
|
@ -56,7 +56,7 @@ export class ApplyFiltersPopoverContent extends Component<Props, State> {
|
|||
};
|
||||
}
|
||||
private getLabel(filter: esFilters.Filter) {
|
||||
const valueLabel = utils.getDisplayValueFromFilter(filter, this.props.indexPatterns);
|
||||
const valueLabel = esFilters.getDisplayValueFromFilter(filter, this.props.indexPatterns);
|
||||
return <FilterLabel filter={filter} valueLabel={valueLabel} />;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ import { Operator } from './lib/filter_operators';
|
|||
import { PhraseValueInput } from './phrase_value_input';
|
||||
import { PhrasesValuesInput } from './phrases_values_input';
|
||||
import { RangeValueInput } from './range_value_input';
|
||||
import { esFilters, utils, IIndexPattern, IFieldType } from '../../..';
|
||||
import { esFilters, IIndexPattern, IFieldType } from '../../..';
|
||||
|
||||
interface Props {
|
||||
filter: esFilters.Filter;
|
||||
|
@ -371,7 +371,7 @@ class FilterEditorUI extends Component<Props, State> {
|
|||
}
|
||||
|
||||
private getIndexPatternFromFilter() {
|
||||
return utils.getIndexPatternFromFilter(this.props.filter, this.props.indexPatterns);
|
||||
return esFilters.getIndexPatternFromFilter(this.props.filter, this.props.indexPatterns);
|
||||
}
|
||||
|
||||
private getFieldFromFilter() {
|
||||
|
|
|
@ -24,7 +24,7 @@ import React, { Component } from 'react';
|
|||
import { IUiSettingsClient } from 'src/core/public';
|
||||
import { FilterEditor } from './filter_editor';
|
||||
import { FilterView } from './filter_view';
|
||||
import { esFilters, utils, IIndexPattern } from '../..';
|
||||
import { esFilters, IIndexPattern } from '../..';
|
||||
|
||||
interface Props {
|
||||
id: string;
|
||||
|
@ -60,7 +60,7 @@ class FilterItemUI extends Component<Props, State> {
|
|||
this.props.className
|
||||
);
|
||||
|
||||
const valueLabel = utils.getDisplayValueFromFilter(filter, this.props.indexPatterns);
|
||||
const valueLabel = esFilters.getDisplayValueFromFilter(filter, this.props.indexPatterns);
|
||||
const dataTestSubjKey = filter.meta.key ? `filter-key-${filter.meta.key}` : '';
|
||||
const dataTestSubjValue = filter.meta.value ? `filter-value-${valueLabel}` : '';
|
||||
const dataTestSubjDisabled = `filter-${
|
||||
|
|
|
@ -24,14 +24,70 @@ export function plugin(initializerContext: PluginInitializerContext) {
|
|||
return new DataServerPlugin(initializerContext);
|
||||
}
|
||||
|
||||
export { DataServerPlugin as Plugin };
|
||||
/**
|
||||
* Types to be shared externally
|
||||
* @public
|
||||
*/
|
||||
export { IRequestTypesMap, IResponseTypesMap } from './search';
|
||||
export {
|
||||
// field formats
|
||||
FIELD_FORMAT_IDS,
|
||||
IFieldFormat,
|
||||
IFieldFormatId,
|
||||
IFieldFormatType,
|
||||
// index patterns
|
||||
IIndexPattern,
|
||||
IFieldType,
|
||||
IFieldSubType,
|
||||
// kbn field types
|
||||
ES_FIELD_TYPES,
|
||||
KBN_FIELD_TYPES,
|
||||
// query
|
||||
Query,
|
||||
// timefilter
|
||||
RefreshInterval,
|
||||
TimeRange,
|
||||
} from '../common';
|
||||
|
||||
/**
|
||||
* Static code to be shared externally
|
||||
* @public
|
||||
*/
|
||||
export {
|
||||
IndexPatternsFetcher,
|
||||
FieldDescriptor,
|
||||
shouldReadFieldFromDocValues,
|
||||
} from './index_patterns';
|
||||
|
||||
export * from './search';
|
||||
export * from '../common';
|
||||
export {
|
||||
// es query
|
||||
esFilters,
|
||||
esKuery,
|
||||
esQuery,
|
||||
// field formats
|
||||
BoolFormat,
|
||||
BytesFormat,
|
||||
ColorFormat,
|
||||
DateFormat,
|
||||
DateNanosFormat,
|
||||
DEFAULT_CONVERTER_COLOR,
|
||||
DurationFormat,
|
||||
FieldFormat,
|
||||
IpFormat,
|
||||
NumberFormat,
|
||||
PercentFormat,
|
||||
RelativeDateFormat,
|
||||
SourceFormat,
|
||||
StaticLookupFormat,
|
||||
StringFormat,
|
||||
TruncateFormat,
|
||||
UrlFormat,
|
||||
// index patterns
|
||||
isFilterable,
|
||||
// kbn field types
|
||||
castEsToKbnFieldTypeName,
|
||||
getKbnFieldType,
|
||||
getKbnTypeNames,
|
||||
} from '../common';
|
||||
|
||||
export { IRequestTypesMap, IResponseTypesMap } from './search';
|
||||
export { DataServerPlugin as Plugin };
|
||||
|
|
|
@ -22,7 +22,6 @@ import {
|
|||
IIndexPattern,
|
||||
esFilters,
|
||||
Query,
|
||||
utils,
|
||||
} from '../../../../../../../../../../src/plugins/data/public';
|
||||
|
||||
import { FilterLabel } from './filter_label';
|
||||
|
@ -126,7 +125,7 @@ const getDescriptionItem = (
|
|||
<EuiBadgeWrap color="hollow">
|
||||
<FilterLabel
|
||||
filter={filter}
|
||||
valueLabel={utils.getDisplayValueFromFilter(filter, [indexPatterns])}
|
||||
valueLabel={esFilters.getDisplayValueFromFilter(filter, [indexPatterns])}
|
||||
/>
|
||||
</EuiBadgeWrap>
|
||||
</EuiFlexItem>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue