Skip to content

Commit e07589a

Browse files
committed
[Lens] change name of custom query to filters
1 parent ae55391 commit e07589a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function BucketNestingEditor({
6969
values: { field: fieldName },
7070
}),
7171
filters: i18n.translate('xpack.lens.indexPattern.groupingOverallFilters', {
72-
defaultMessage: 'Top values for each custom query',
72+
defaultMessage: 'Top values for each filter',
7373
}),
7474
date_histogram: i18n.translate('xpack.lens.indexPattern.groupingOverallDateHistogram', {
7575
defaultMessage: 'Top values for each {field}',

x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('filters', () => {
5454
columnOrder: ['col1', 'col2'],
5555
columns: {
5656
col1: {
57-
label: 'Custom query',
57+
label: 'filters',
5858
dataType: 'document',
5959
operationType: 'filters',
6060
scale: 'ordinal',
@@ -209,7 +209,7 @@ describe('filters', () => {
209209
});
210210
});
211211

212-
describe('Modify custom query', () => {
212+
describe('Modify filters', () => {
213213
it('should correctly show existing filters ', () => {
214214
const setStateSpy = jest.fn();
215215
const instance = mount(
@@ -236,7 +236,7 @@ describe('filters', () => {
236236
).toEqual('src : 2');
237237
});
238238

239-
it('should remove custom query', () => {
239+
it('should remove filter', () => {
240240
const setStateSpy = jest.fn();
241241
const instance = mount(
242242
<InlineOptions

x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export interface FilterValue {
3131
label: string;
3232
}
3333

34-
const customQueryLabel = i18n.translate('xpack.lens.indexPattern.customQuery', {
35-
defaultMessage: 'Custom query',
34+
const filtersLabel = i18n.translate('xpack.lens.indexPattern.filters', {
35+
defaultMessage: 'Filters',
3636
});
3737

3838
export const defaultLabel = i18n.translate('xpack.lens.indexPattern.filters.label.placeholder', {
@@ -70,7 +70,7 @@ export interface FiltersIndexPatternColumn extends FieldBasedIndexPatternColumn
7070

7171
export const filtersOperation: OperationDefinition<FiltersIndexPatternColumn> = {
7272
type: 'filters',
73-
displayName: customQueryLabel,
73+
displayName: filtersLabel,
7474
priority: 3, // Higher than any metric
7575
getPossibleOperationForField: ({ type }) => {
7676
if (type === 'document') {
@@ -102,7 +102,7 @@ export const filtersOperation: OperationDefinition<FiltersIndexPatternColumn> =
102102
}
103103

104104
return {
105-
label: customQueryLabel,
105+
label: filtersLabel,
106106
dataType: 'string',
107107
operationType: 'filters',
108108
scale: 'ordinal',
@@ -223,8 +223,8 @@ export const FilterList = ({
223223
defaultMessage: 'This query is invalid',
224224
})}
225225
onRemoveClick={() => onRemoveFilter(filter.id)}
226-
removeTitle={i18n.translate('xpack.lens.indexPattern.filters.removeCustomQuery', {
227-
defaultMessage: 'Remove custom query',
226+
removeTitle={i18n.translate('xpack.lens.indexPattern.filters.removeFilter', {
227+
defaultMessage: 'Remove a filter',
228228
})}
229229
>
230230
<FilterPopover
@@ -259,8 +259,8 @@ export const FilterList = ({
259259
onAddFilter();
260260
setIsOpenByCreation(true);
261261
}}
262-
label={i18n.translate('xpack.lens.indexPattern.filters.addCustomQuery', {
263-
defaultMessage: 'Add a custom query',
262+
label={i18n.translate('xpack.lens.indexPattern.filters.addaFilter', {
263+
defaultMessage: 'Add a filter',
264264
})}
265265
/>
266266
</>

0 commit comments

Comments
 (0)