Skip to content

Commit

Permalink
[maps] geo_line aggregation notify licensed feature usage (#85807) (#…
Browse files Browse the repository at this point in the history
…85889)

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
nreese and kibanamachine authored Dec 15, 2020
1 parent d1eb749 commit 6726a72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { IField } from '../../fields/field';
import { ITooltipProperty, TooltipProperty } from '../../tooltips/tooltip_property';
import { esFilters } from '../../../../../../../src/plugins/data/public';
import { getIsGoldPlus } from '../../../licensed_features';
import { LICENSED_FEATURES } from '../../../licensed_features';

const MAX_TRACKS = 250;

Expand Down Expand Up @@ -357,6 +358,10 @@ export class ESGeoLineSource extends AbstractESAggSource {
);
return tooltipProperties;
}

async getLicensedFeatures(): Promise<LICENSED_FEATURES[]> {
return [LICENSED_FEATURES.GEO_LINE_AGG];
}
}

registerSource({
Expand Down
5 changes: 5 additions & 0 deletions x-pack/plugins/maps/public/licensed_features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { LicensingPluginSetup, LicensingPluginStart } from '../../licensing/publ
import { APP_ID } from '../common/constants';

export enum LICENSED_FEATURES {
GEO_LINE_AGG = 'GEO_LINE_AGG',
GEO_SHAPE_AGGS_GEO_TILE = 'GEO_SHAPE_AGGS_GEO_TILE',
}

Expand All @@ -18,6 +19,10 @@ export interface LicensedFeatureDetail {
}

export const LICENCED_FEATURES_DETAILS: Record<LICENSED_FEATURES, LicensedFeatureDetail> = {
[LICENSED_FEATURES.GEO_LINE_AGG]: {
name: 'geo_line aggregation',
license: 'gold',
},
[LICENSED_FEATURES.GEO_SHAPE_AGGS_GEO_TILE]: {
name: 'geo_tile aggregation on geo_shape field-type',
license: 'gold',
Expand Down

0 comments on commit 6726a72

Please sign in to comment.