Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sulemanof committed Oct 7, 2020
1 parent e7a6dbe commit 4e74b69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions src/plugins/vis_type_table/public/to_ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ import { getVisSchemas, Vis, BuildPipelineParams } from '../../visualizations/pu
import { TableExpressionFunctionDefinition } from './table_vis_fn';
import { TableVisConfig, TableVisParams } from './types';

export const escapeString = (data: string): string => {
return data.replace(/\\/g, `\\\\`).replace(/'/g, `\\'`);
};

const buildTableVisConfig = (
schemas: ReturnType<typeof getVisSchemas>,
visParams: TableVisParams
Expand Down Expand Up @@ -69,7 +65,7 @@ export const toExpressionAst = (vis: Vis<TableVisParams>, params: BuildPipelineP
};

const table = buildExpressionFunction<TableExpressionFunctionDefinition>('kibana_table', {
visConfig: escapeString(JSON.stringify(visConfig)),
visConfig: JSON.stringify(visConfig),
});

const ast = buildExpression([esaggs, table]);
Expand Down

0 comments on commit 4e74b69

Please sign in to comment.