Skip to content

Commit

Permalink
load visualizations code lazily
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Apr 28, 2020
1 parent f9c81a3 commit aafbb8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/vis_type_timeseries/public/metrics_fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import { get } from 'lodash';
import { i18n } from '@kbn/i18n';
import { ExpressionFunctionDefinition, KibanaContext, Render } from '../../expressions/public';
import { PersistedState } from '../../visualizations/public';

// @ts-ignore
import { metricsRequestHandler } from './request_handler';
Expand Down Expand Up @@ -76,6 +75,7 @@ export const createMetricsFn = (): ExpressionFunctionDefinition<
const params = JSON.parse(args.params);
const uiStateParams = JSON.parse(args.uiState);
const savedObjectId = args.savedObjectId;
const { PersistedState } = await import('../../visualizations/public');
const uiState = new PersistedState(uiStateParams);

const response = await metricsRequestHandler({
Expand Down

0 comments on commit aafbb8a

Please sign in to comment.