Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] lens_multitable removal. #131699

Merged
merged 18 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ describe('interpreter/functions#gauge', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ export const gaugeFunction = (): GaugeExpressionFunctionDefinition => ({
}

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const logTable = prepareLogTable(
data,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ describe('interpreter/functions#heatmap', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ export const heatmapFunction = (): HeatmapExpressionFunctionDefinition => ({
validateAccessor(args.splitColumnAccessor, data.columns);

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const argsTable: Dimension[] = [];
if (args.valueAccessor) {
prepareHeatmapLogTable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe('interpreter/functions#metric', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ export const metricVisFunction = (): MetricVisExpressionFunctionDefinition => ({
validateAccessor(args.bucket, input.columns);

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const argsTable: Dimension[] = [
[
args.metric,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ describe('interpreter/functions#mosaicVis', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export const mosaicVisFunction = (): MosaicVisExpressionFunctionDefinition => ({
};

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const logTable = prepareLogTable(
context,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ describe('interpreter/functions#pieVis', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ export const pieVisFunction = (): PieVisExpressionFunctionDefinition => ({
};

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const logTable = prepareLogTable(
context,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ describe('interpreter/functions#treemapVis', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export const treemapVisFunction = (): TreemapVisExpressionFunctionDefinition =>
};

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const logTable = prepareLogTable(
context,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ describe('interpreter/functions#waffleVis', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export const waffleVisFunction = (): WaffleVisExpressionFunctionDefinition => ({
};

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const logTable = prepareLogTable(
context,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ describe('interpreter/functions#tagcloud', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const XY_VIS = 'xyVis';
export const LAYERED_XY_VIS = 'layeredXyVis';
export const Y_CONFIG = 'yConfig';
export const EXTENDED_Y_CONFIG = 'extendedYConfig';
export const MULTITABLE = 'lens_multitable';
export const DATA_LAYER = 'dataLayer';
export const EXTENDED_DATA_LAYER = 'extendedDataLayer';
export const LEGEND_CONFIG = 'legendConfig';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export const xyVisFn: XyVisFn['fn'] = async (data, args, handlers) => {
];

if (handlers.inspectorAdapters.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const layerDimensions = layers.reduce<Dimension[]>((dimensions, layer) => {
if (layer.layerType === LayerTypes.ANNOTATIONS) {
return dimensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export type {
LegendConfig,
IconPosition,
DataLayerArgs,
LensMultiTable,
ValueLabelMode,
AxisExtentMode,
DataLayerConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
FittingFunctions,
IconPositions,
LayerTypes,
MULTITABLE,
LineStyles,
SeriesTypes,
ValueLabelModes,
Expand Down Expand Up @@ -296,15 +295,6 @@ export type XYExtendedLayerConfigResult =
| ExtendedReferenceLineLayerConfigResult
| ExtendedAnnotationLayerConfigResult;

export interface LensMultiTable {
type: typeof MULTITABLE;
tables: Record<string, Datatable>;
dateRange?: {
fromDate: Date;
toDate: Date;
};
}

export type ReferenceLineLayerConfigResult = ReferenceLineLayerArgs & {
type: typeof REFERENCE_LINE_LAYER;
layerType: typeof LayerTypes.REFERENCELINE;
Expand Down
Loading