Skip to content

Commit

Permalink
Merge pull request #1 from michimau/v6.1.0
Browse files Browse the repository at this point in the history
V6.1.0
  • Loading branch information
gwintzer authored Jan 10, 2018
2 parents 1fa4fd4 + de2f3ad commit c2add95
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ bin/kibana-plugin install <PATH_OR_URL_TO_YOUR_ZIP_FILE>
Plugins are officialy not supported, because of fast code changes even in minor Versions.

The plugin is compatible with following Versions:
* kibana (=5.3.1)
* kibana (=6.1.0)

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "kibana-html-plugin",
"description": "This is a Kibana 5 plugin which renders HTML in visualizations",
"version": "5.6.3"
"description": "This is a Kibana 6 plugin which renders HTML in visualizations",
"version": "6.1.0"
}
56 changes: 32 additions & 24 deletions public/html.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
import 'plugins/kibana-html-plugin/html.less';

import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { TemplateVisTypeProvider } from 'ui/template_vis_type/template_vis_type';
import mainTemplate from 'plugins/kibana-html-plugin/html.html';
import optionsTemplate from 'plugins/kibana-html-plugin/htmlOptions.html';

define(function (require) {
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');
require('plugins/kibana-html-plugin/html.less');
require('plugins/kibana-html-plugin/htmlController');

VisTypesRegistryProvider.register(HtmlVisProvider);
import 'plugins/kibana-html-plugin/htmlController.js';

function HtmlVisProvider(Private) {
require('ui/template_vis_type/template_vis_type');
var TemplateVisType = Private(TemplateVisTypeProvider);
import {CATEGORY} from 'ui/vis/vis_category';
import {VisFactoryProvider} from 'ui/vis/vis_factory';
import {VisTypesRegistryProvider} from 'ui/registry/vis_types';
import {VisSchemasProvider} from 'ui/vis/editors/default/schemas';

return new TemplateVisType({
function HtmlVisProvider(Private) {
const VisFactory = Private(VisFactoryProvider);
const Schemas = Private(VisSchemasProvider);

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

return HtmlVisProvider;
});
visConfig: {
defaults: {},
template: mainTemplate
},
editorConfig: {
optionsTemplate: optionsTemplate,
schemas: new Schemas([{
group: 'metrics',
name: 'metric',
title: 'Metric',
min: 1,
aggFilter: ['!derivative', '!geo_centroid']
}]),
}
});
}
VisTypesRegistryProvider.register(HtmlVisProvider);
2 changes: 1 addition & 1 deletion public/html.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}

.html-editor {
min-height: 500px;
min-height: 800px;
min-width: 600px;
font-size: 14px !important;
}
Expand Down

0 comments on commit c2add95

Please sign in to comment.