Skip to content

Commit

Permalink
[TSVB] Geo_point should be excluded from terms aggregation (#109210)
Browse files Browse the repository at this point in the history
* Add field type restriction for terms agg

* Fix test

* Add restriction for 'group by' in table

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
VladLasitsa and kibanamachine authored Aug 30, 2021
1 parent e610bb5 commit f7db559
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { BUCKET_TYPES } from '../../../../common/enums';
import { PanelConfigProps, PANEL_CONFIG_TABS } from './types';
import { TimeseriesVisParams } from '../../../types';
import { getIndexPatternKey } from '../../../../common/index_patterns_utils';
import { KBN_FIELD_TYPES } from '../../../../../data/public';

export class TablePanelConfig extends Component<
PanelConfigProps,
Expand Down Expand Up @@ -115,6 +116,13 @@ export class TablePanelConfig extends Component<
defaultMessage="Group by field"
/>
}
restrict={[
KBN_FIELD_TYPES.NUMBER,
KBN_FIELD_TYPES.BOOLEAN,
KBN_FIELD_TYPES.DATE,
KBN_FIELD_TYPES.IP,
KBN_FIELD_TYPES.STRING,
]}
fields={this.props.fields}
value={model.pivot_id}
indexPattern={model.index_pattern}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ export const SplitByTermsUI = ({
description="This labels a field selector allowing the user to chose 'by' which field to group."
/>
}
restrict={[
KBN_FIELD_TYPES.NUMBER,
KBN_FIELD_TYPES.BOOLEAN,
KBN_FIELD_TYPES.DATE,
KBN_FIELD_TYPES.IP,
KBN_FIELD_TYPES.STRING,
]}
data-test-subj="groupByField"
indexPattern={indexPattern}
onChange={handleSelectChange('terms_field')}
Expand Down

0 comments on commit f7db559

Please sign in to comment.