kibana-html-plugin icon indicating copy to clipboard operation
kibana-html-plugin copied to clipboard

Kibana 5.5.0

Open jamesspi opened this issue 7 years ago • 5 comments

Hi There!

Could you possibly look into making this compatible with 5.5.0?

Thanks, James

jamesspi avatar Jul 18 '17 05:07 jamesspi

+1. I tested it with 5.5.2 and it doesn't work

BoomerBrian avatar Sep 06 '17 14:09 BoomerBrian

html.js.zip

Same issue, solved by modifying package.json and html.js (my release attached). Fix found following: https://discuss.elastic.co/t/kibana-plugin-api-4-n-5-n-webpack-errors-when-compiling-tutorial-plugin/98228

pchanas avatar Sep 19 '17 09:09 pchanas

To add to @pchanas file you can get the original syntax highlighting working if you take his file and add back the lines require('plugins/kibana-html-plugin/deps/ace-builds/ace.js') require('plugins/kibana-html-plugin/deps/ace-builds/mode-html.js'); require('plugins/kibana-html-plugin/deps/ace-builds/theme-monokai.js'); require('plugins/kibana-html-plugin/deps/angular-ui-ace/ui-ace.min.js'); above require('plugins/kibana-html-plugin/html.less'); line

Then run bower install. https://github.com/rquadling/bower-installer. This is how raystorm originally pulled his dependencies into the public folder (code shown in bower.json). Then simply install the plugin like you would any normal plugin. I'm curious if this will be updated, however until then this would be the solution to get syntax highlighting back.

GummyDonut avatar Sep 26 '17 13:09 GummyDonut

Hi.

I did the changes here (for Kibana 5.6.3) : https://github.com/raystorm-place/kibana-html-plugin/pull/10

For v5.5.0, just downgrade the kibana version from package.json and rebuild the plugin...

gwintzer avatar Oct 12 '17 13:10 gwintzer

Hi

I have changed in this plugin to work with kibana 5.6.x.

I have changed html.js file as below(used import module in place of require module),

  import 'plugins/kibana-html-plugin/html.less';
  import 'plugins/kibana-html-plugin/htmlController';
  import { VisVisTypeProvider } from 'ui/vis/vis_type';
  import { TemplateVisTypeProvider } from 'ui/template_vis_type/template_vis_type';
  import { VisTypesRegistryProvider } from 'ui/registry/vis_types';

  VisTypesRegistryProvider.register(HtmlVisProvider);

  function HtmlVisProvider(Private) {
    const VisType = Private(VisVisTypeProvider);
    const TemplateVisType = Private(TemplateVisTypeProvider);

    return new TemplateVisType({
      name: 'html',
      title: 'Html widget',
      icon: 'fa-code',
      description: 'Useful for displaying html in dashboards.',
      category: VisType.CATEGORY.OTHER,
      template: require('plugins/kibana-html-plugin/html.html'),
      params: {
        editor: require('plugins/kibana-html-plugin/htmlOptions.html')
      },
      requiresSearch: false
    });
  }

export default HtmlVisProvider;

Hope this may be helpful for other versions.

jaydabhi17 avatar Oct 24 '17 08:10 jaydabhi17