Skip to content

Commit 750eb78

Browse files
rename
1 parent fa0d459 commit 750eb78

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

x-pack/plugins/maps/public/classes/fields/es_fielded_agg_field.test.ts renamed to x-pack/plugins/maps/public/classes/fields/agg_field.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { ESFieldedAggField } from './es_fielded_agg_field';
7+
import { AggField } from './agg_field';
88
import { AGG_TYPE, FIELD_ORIGIN } from '../../../common/constants';
99
import { IESAggSource } from '../sources/es_agg_source';
1010
import { IIndexPattern } from 'src/plugins/data/public';
@@ -38,20 +38,20 @@ const defaultParams = {
3838

3939
describe('supportsFieldMeta', () => {
4040
test('Non-counting aggregations should support field meta', () => {
41-
const avgMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.AVG });
41+
const avgMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.AVG });
4242
expect(avgMetric.supportsFieldMeta()).toBe(true);
43-
const maxMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.MAX });
43+
const maxMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.MAX });
4444
expect(maxMetric.supportsFieldMeta()).toBe(true);
45-
const minMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.MIN });
45+
const minMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.MIN });
4646
expect(minMetric.supportsFieldMeta()).toBe(true);
47-
const termsMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.TERMS });
47+
const termsMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.TERMS });
4848
expect(termsMetric.supportsFieldMeta()).toBe(true);
4949
});
5050

5151
test('Counting aggregations should not support field meta', () => {
52-
const sumMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.SUM });
52+
const sumMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.SUM });
5353
expect(sumMetric.supportsFieldMeta()).toBe(false);
54-
const uniqueCountMetric = new ESFieldedAggField({
54+
const uniqueCountMetric = new AggField({
5555
...defaultParams,
5656
aggType: AGG_TYPE.UNIQUE_COUNT,
5757
});

x-pack/plugins/maps/public/classes/fields/es_fielded_agg_field.ts renamed to x-pack/plugins/maps/public/classes/fields/agg_field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface IESFieldedAggParams extends IESAggFieldParams {
1515
aggType: AGG_TYPE;
1616
}
1717

18-
export class ESFieldedAggField extends CountAggField {
18+
export class AggField extends CountAggField {
1919
private readonly _esDocField?: IField;
2020
private readonly _aggType: AGG_TYPE;
2121

x-pack/plugins/maps/public/classes/fields/es_agg_factory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ESDocField } from './es_doc_field';
1111
import { TopTermPercentageField } from './top_term_percentage_field';
1212
import { CountAggField } from './count_agg_field';
1313
import { IESAggField } from './agg_field_types';
14-
import { ESFieldedAggField } from './es_fielded_agg_field';
14+
import { AggField } from './agg_field';
1515

1616
export function esAggFieldsFactory(
1717
aggDescriptor: AggDescriptor,
@@ -28,7 +28,7 @@ export function esAggFieldsFactory(
2828
canReadFromGeoJson,
2929
});
3030
} else {
31-
aggField = new ESFieldedAggField({
31+
aggField = new AggField({
3232
label: aggDescriptor.label,
3333
esDocField:
3434
'field' in aggDescriptor && aggDescriptor.field

0 commit comments

Comments
 (0)