forked from sivasamyk/logtrail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
32 lines (30 loc) · 999 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
30
31
32
//var exampleRoute = require('./server/routes/example');
var serverRoute = require('./server/routes/server');
var validateEsRoute = require('./server/routes/validate_es');
module.exports = function (kibana) {
return new kibana.Plugin({
name: 'logtrail',
require: ['kibana', 'elasticsearch'],
uiExports: {
app: {
title: 'BNxt Tail',
description: 'Plugin to view, search & tail logs in Kibana',
main: 'plugins/logtrail/app',
url: '/app/logtrail',
injectVars: function (server, options) {
var config = server.config();
return {
kbnIndex: config.get('kibana.index'),
esShardTimeout: config.get('elasticsearch.shardTimeout'),
esApiVersion: config.get('elasticsearch.apiVersion')
};
}
}
},
init: function (server, options) {
// Add server routes and initalize the plugin here
serverRoute(server);
validateEsRoute(server);
}
});
};