-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
29 lines (28 loc) · 1007 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var join = require('path').join;
var requireAllAndApply = require('./server/lib/require_all_and_apply');
module.exports = function (kibana) {
return new kibana.Plugin({
require: ['kibana', 'elasticsearch'],
uiExports: {
app: {
title: 'Funger\'s Plugin',
description: 'reminder that he could kill you at any moment.',
icon: 'plugins/funger-plugin/funger.svg',
main: 'plugins/funger-plugin/app',
injectVars: function (server, options) {
var config = server.config();
return {
kbnIndex: config.get('kibana.index'),
esShardTimeout: config.get('elasticsearch.shardTimeout'),
esApiVersion: config.get('elasticsearch.apiVersion')
};
},
// by default, it autoloads 'EVERYTHING'
//autoload: kibana.autoload.styles,
}
},
init: function (server, options) {
requireAllAndApply(join(__dirname, 'server', 'routes', '**', '*.js'), server);
}
});
};