From e07589ac0b1d2cc7c9c590491a25d5be250f3b79 Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Thu, 17 Sep 2020 10:54:23 +0200 Subject: [PATCH] [Lens] change name of custom query to filters --- .../dimension_panel/bucket_nesting_editor.tsx | 2 +- .../definitions/filters/filters.test.tsx | 6 +++--- .../operations/definitions/filters/filters.tsx | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx index 281c72915e46e..325f18ee9833a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx @@ -69,7 +69,7 @@ export function BucketNestingEditor({ values: { field: fieldName }, }), filters: i18n.translate('xpack.lens.indexPattern.groupingOverallFilters', { - defaultMessage: 'Top values for each custom query', + defaultMessage: 'Top values for each filter', }), date_histogram: i18n.translate('xpack.lens.indexPattern.groupingOverallDateHistogram', { defaultMessage: 'Top values for each {field}', diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx index 6364d3913bf57..2d79c5faf74fe 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx @@ -54,7 +54,7 @@ describe('filters', () => { columnOrder: ['col1', 'col2'], columns: { col1: { - label: 'Custom query', + label: 'filters', dataType: 'document', operationType: 'filters', scale: 'ordinal', @@ -209,7 +209,7 @@ describe('filters', () => { }); }); - describe('Modify custom query', () => { + describe('Modify filters', () => { it('should correctly show existing filters ', () => { const setStateSpy = jest.fn(); const instance = mount( @@ -236,7 +236,7 @@ describe('filters', () => { ).toEqual('src : 2'); }); - it('should remove custom query', () => { + it('should remove filter', () => { const setStateSpy = jest.fn(); const instance = mount( = { type: 'filters', - displayName: customQueryLabel, + displayName: filtersLabel, priority: 3, // Higher than any metric getPossibleOperationForField: ({ type }) => { if (type === 'document') { @@ -102,7 +102,7 @@ export const filtersOperation: OperationDefinition = } return { - label: customQueryLabel, + label: filtersLabel, dataType: 'string', operationType: 'filters', scale: 'ordinal', @@ -223,8 +223,8 @@ export const FilterList = ({ defaultMessage: 'This query is invalid', })} onRemoveClick={() => onRemoveFilter(filter.id)} - removeTitle={i18n.translate('xpack.lens.indexPattern.filters.removeCustomQuery', { - defaultMessage: 'Remove custom query', + removeTitle={i18n.translate('xpack.lens.indexPattern.filters.removeFilter', { + defaultMessage: 'Remove a filter', })} >