I'm trying to create a kibana plugin of type app (named myplugin below). I did the following:
app.js file:
require('ui/autoload/all');
require('plugins/myplugin/mypluginController');
require('plugins/myplugin/less/main.less');
var chrome = require('ui/chrome');
chrome.setNavBackground('#222222')
.setTabs([])
.setRootTemplate(require('plugins/myplugin/templates/index.html'))
.setRootController('myplugin', 'MypluginController');
mypluginController.js file:
// Create an Angular module for this plugin
var module = require('ui/modules').get('myplugin');
module.controller('MypluginController', function ($scope, $route, $interval) {
$scope.title = 'My Plugin';
$scope.description = 'My simple app plugin doing nothing';
});
index.html file:
Congratulations
You've successfully created your first Kibana Plugin!
{{title}}
{{description}}
index.js file:
module.exports = function (kibana) {
return new kibana.Plugin({
id: 'myplugin',
name: 'myplugin',
require: ['kibana', 'elasticsearch'],
uiExports: {
app: {
title: 'MyPlugin',
description: 'My simple plugin doing nothing',
main: 'plugins/myplugin/app',
injectVars: function(server, options) {
return options;
}
}
},
config: function (Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
}).default();
},
init: require('./init.js')
});
};
I installed the plugin onto installedPlugins of my kibana server started in dev mode. I correctly see myplugin application among the ones I have installed (kibana, sense, timelion). However, when I select myplugin I cannot see the angular expressions {{...}} resolved in the index.html template. It seems like myplugin angular module was not bootstrapped. What did I miss ? Thanks in advance.
p.s. I'm using the Kibana 5.0.0-snapshot (what I read from the README.md file), which I git cloned a couple of days ago.