datasweet / kibana-datasweet-formula

This Kibana plugin allows calculated metrics on any standard kibana visualizations.
Apache License 2.0
121 stars 34 forks source link

Problem with datasweet clash with custom plugins #68

Closed zxjczero closed 4 years ago

zxjczero commented 4 years ago

I'm working with the datasweet plugin (datasweet_formula-2.1.2_kibana-6.8.0 ) for Kibana 6.8.3.datasweet plugin can work,but other custom plugins Open to blank.How should I do to fix

lfroment-datasweet commented 4 years ago

Hi @zxjczero. I'm not sure I understand your problem. Could you be more specific? Moreover, we are looking for help to maintain, so we are not in a position to work on newer versions of the plugin. Elastic makes it very difficult by introducing breaking changes very frequently in Kibana releases.

pchakour commented 4 years ago

I already had this issue with custom plugins. To fix it, you have to change the public/formula_hack.js file.

Remove the following line:

import { decorateAggTypes } from './decorators/agg_types';

And after the following line:

if (appId === 'kibana' || appId === 'dashboardViewer') {

Add these lines:

// Include agg_types only when necessary else custom plugin will not work (blank page)
const decorateAggTypes = require('./decorators/agg_types').decorateAggTypes;
zxjczero commented 4 years ago

@pchakour Thanks a million!