Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Sep 22, 2020
1 parent acd39ef commit 54d856d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/plugins/data/public/search/expressions/esaggs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,9 @@ const handleCourierRequest = async ({
: undefined,
};

(searchSource as any).tabifiedResponse = tabifyAggResponse(
aggs,
(searchSource as any).finalResponse,
tabifyParams
);
const response = tabifyAggResponse(aggs, (searchSource as any).finalResponse, tabifyParams);

(searchSource as any).tabifiedResponse = response;

inspectorAdapters.data.setTabularLoader(
() =>
Expand All @@ -207,7 +205,7 @@ const handleCourierRequest = async ({
{ returnsFormattedValues: true }
);

return (searchSource as any).tabifiedResponse;
return response;
};

export const esaggs = (): EsaggsExpressionFunctionDefinition => ({
Expand Down Expand Up @@ -281,8 +279,8 @@ export const esaggs = (): EsaggsExpressionFunctionDefinition => ({
const table: Datatable = {
type: 'datatable',
rows: response.rows,
columns: response.columns.map((column: any) => {
const serializedFieldFormat = column.aggConfig.getSerializedFormat();
columns: response.columns.map((column) => {
const serializedFieldFormat: any = column.aggConfig.toSerializedFieldFormat();
const cleanedColumn: DatatableColumn = {
id: column.id,
name: column.name,
Expand Down

0 comments on commit 54d856d

Please sign in to comment.