diff --git a/.eslintrc b/.eslintrc index 69c9df7..2a20fc3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,2 +1,2 @@ --- -extends: "@elastic/kibana" +extends: "@elastic/eslint-config-kibana" diff --git a/gather-info.js b/gather-info.js deleted file mode 100644 index f84cf30..0000000 --- a/gather-info.js +++ /dev/null @@ -1,18 +0,0 @@ -const templatePkg = require('./package.json'); -const kibanaPkg = require('../kibana/package.json'); - -const debugInfo = { - kibana: { - version: kibanaPkg.version, - build: kibanaPkg.build, - engines: kibanaPkg.engines, - }, - plugin: { - name: templatePkg.name, - version: templatePkg.version, - kibana: templatePkg.kibana, - dependencies: templatePkg.dependencies, - }, -}; - -console.log(debugInfo); \ No newline at end of file diff --git a/index.js b/index.js index bffdd00..0bad498 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,15 @@ export default kibana => new kibana.Plugin({ - require: ['kibana', 'elasticsearch'], + id: 'kibana-milestones-vis', + require: ['elasticsearch'], + uiExports: { - visTypes: [ - 'plugins/kibana-milestones-vis/milestones_vis' - ] - } + visTypes: ['plugins/kibana-milestones-vis/milestones_vis'] + }, + + config(Joi) { + return Joi.object({ + enabled: Joi.boolean().default(true), + }).default(); + }, + }); diff --git a/package.json b/package.json index 101c9c1..725ac36 100644 --- a/package.json +++ b/package.json @@ -16,28 +16,31 @@ "Walter Rafelsberger " ], "kibana": { - "version": "6.2.0", - "templateVersion": "7.2.2" + "version": "6.3.0", + "templateVersion": "1.0.0" }, "scripts": { - "lint": "eslint", + "preinstall": "node ../../kibana/preinstall_check", + "kbn": "node ../../kibana/scripts/kbn", + "lint": "eslint **/*.js", "start": "plugin-helpers start", "test:server": "plugin-helpers test:server", "test:browser": "plugin-helpers test:browser", - "build": "plugin-helpers build", - "postinstall": "plugin-helpers postinstall", - "gather-info": "node gather-info.js" + "build": "plugin-helpers build" }, "devDependencies": { - "@elastic/eslint-config-kibana": "0.13.0", - "@elastic/plugin-helpers": "7.1.3", - "babel-eslint": "7.2.3", - "eslint": "3.19.0", - "eslint-plugin-babel": "4.1.1", - "eslint-plugin-import": "2.3.0", - "eslint-plugin-mocha": "4.9.0", - "eslint-plugin-react": "7.3.0", - "expect.js": "0.3.1" + "@elastic/eslint-config-kibana": "link:../../kibana/packages/eslint-config-kibana", + "@elastic/eslint-import-resolver-kibana": "^0.9.0", + "@kbn/plugin-helpers": "link:../../kibana/packages/kbn-plugin-helpers", + "babel-eslint": "^8.0.2", + "eslint": "^4.11.0", + "eslint-plugin-babel": "^4.1.1", + "eslint-plugin-import": "^2.3.0", + "eslint-plugin-jest": "^21.3.2", + "eslint-plugin-mocha": "^4.9.0", + "eslint-plugin-prefer-object-spread": "^1.2.1", + "eslint-plugin-react": "^7.0.1", + "expect.js": "^0.3.1" }, "dependencies": { "d3": "3.5.6", diff --git a/public/milestones_vis.js b/public/milestones_vis.js index ac1659d..d55c6aa 100644 --- a/public/milestones_vis.js +++ b/public/milestones_vis.js @@ -2,7 +2,7 @@ import './milestones.less'; import './milestones_vis_params'; import { VisFactoryProvider } from 'ui/vis/vis_factory'; import { CATEGORY } from 'ui/vis/vis_category'; -import { VisSchemasProvider } from 'ui/vis/editors/default/schemas'; +import { Schemas } from 'ui/vis/editors/default/schemas'; import { VisTypesRegistryProvider } from 'ui/registry/vis_types'; import image from './images/icon-milestones.svg'; @@ -11,8 +11,7 @@ import { MilestonesResponseHandlerProvider } from './response_handler'; function MilestonesProvider(Private) { const VisFactory = Private(VisFactoryProvider); - const Schemas = Private(VisSchemasProvider); - const responseHandler = Private(MilestonesResponseHandlerProvider).handler; + const responseHandler = MilestonesResponseHandlerProvider().handler; return VisFactory.createBaseVisualization({ name: 'milestones',