PS E:\github\kibana\kibana\plugins\clock> sao kibana-plugin
? Name of your plugin? clock
? Provide a short description An awesome Kibana plugin for clock !
? What Kibana version are you targeting? master
? Should an app component be generated? No
? Should translation files be generated? No
? Should an hack component be generated? No
? Should a server API be generated? No
Initialized empty Git repository in E:/github/kibana/kibana/plugins/clock/.git/
> spawn-sync@1.0.15 postinstall E:\github\kibana\kibana\plugins\clock\node_modules\spawn-sync
> node postinstall
> clock@0.0.0 postinstall E:\github\kibana\kibana\plugins\clock
> plugin-helpers postinstall
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN clock@0.0.0 No repository field.
npm WARN clock@0.0.0 No license field.
added 361 packages in 32.334s
success Your plugin has been created, use `npm start` to run it
1. 修改index.js
这个文件主要是根据kibana api 定义该插件类型,本次demo 定义插件类型为visTypes.修改内容如下:
export default function (kibana) {
return new kibana.Plugin({
name: 'clock',
uiExports: {
visTypes:['plugins/clock/clock']
}
});
}