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 all 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 @@ -144,6 +144,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 @@ -129,6 +129,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 @@ -164,6 +164,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 @@ -144,6 +144,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 @@ -139,6 +139,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 @@ -62,6 +62,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 @@ -18,7 +18,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