Skip to content

Commit

Permalink
fixes timelion interpreter fn (elastic#48746) (elastic#48907)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar authored Oct 22, 2019
1 parent 709c818 commit 0396759
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/legacy/core_plugins/timelion/public/timelion_vis_fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { i18n } from '@kbn/i18n';
import { ExpressionFunction, KibanaContext, Render } from 'src/plugins/expressions/public';
import { getTimelionRequestHandler } from './vis/timelion_request_handler';
import { TimelionVisualizationDependencies } from './plugin';
import { TIMELION_VIS_NAME } from './vis';

const name = 'timelion_vis';

Expand All @@ -32,7 +33,7 @@ interface Arguments {

interface RenderValue {
visData: Context;
visType: typeof name;
visType: 'timelion';
visParams: VisParams;
}

Expand Down Expand Up @@ -77,14 +78,14 @@ export const getTimelionVisualizationConfig = (
forceFetch: true,
});

response.visType = 'timelion';
response.visType = TIMELION_VIS_NAME;

return {
type: 'render',
as: 'visualization',
value: {
visParams,
visType: name,
visType: TIMELION_VIS_NAME,
visData: response,
},
};
Expand Down
4 changes: 3 additions & 1 deletion src/legacy/core_plugins/timelion/public/vis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ import { TimelionVisualizationDependencies } from '../plugin';
// @ts-ignore
import { AngularVisController } from '../../../../ui/public/vis/vis_types/angular_vis_type';

export const TIMELION_VIS_NAME = 'timelion';

export function getTimelionVisualization(dependencies: TimelionVisualizationDependencies) {
const timelionRequestHandler = getTimelionRequestHandler(dependencies);

// return the visType object, which kibana will use to display and configure new
// Vis object of this type.
return visFactory.createBaseVisualization({
name: 'timelion',
name: TIMELION_VIS_NAME,
title: 'Timelion',
icon: 'visTimelion',
description: i18n.translate('timelion.timelionDescription', {
Expand Down

0 comments on commit 0396759

Please sign in to comment.