2016-06-29 01:43:18 +00:00
|
|
|
module.exports = function (kibana) {
|
|
|
|
return new kibana.Plugin({
|
2016-08-01 14:50:18 +00:00
|
|
|
id: 'wazuh',
|
2016-06-29 01:43:18 +00:00
|
|
|
name: 'wazuh',
|
|
|
|
require: ['kibana', 'elasticsearch'],
|
|
|
|
uiExports: {
|
|
|
|
app: {
|
2016-08-01 14:50:18 +00:00
|
|
|
id: 'wazuh',
|
2016-07-22 09:03:49 +00:00
|
|
|
title: 'Wazuh',
|
2016-12-22 19:54:57 +00:00
|
|
|
description: 'Wazuh App for Kibana',
|
|
|
|
icon: 'plugins/wazuh/img/icon.png',
|
2016-06-29 01:43:18 +00:00
|
|
|
main: 'plugins/wazuh/app',
|
|
|
|
injectVars: function (server, options) {
|
2017-02-01 21:06:05 +00:00
|
|
|
const serverConfig = server.config();
|
|
|
|
const configuredUrl = server.config().get('tilemap.url');
|
|
|
|
const isOverridden = typeof configuredUrl === 'string' && configuredUrl !== '';
|
|
|
|
const tilemapConfig = serverConfig.get('tilemap');
|
2016-06-29 01:43:18 +00:00
|
|
|
return {
|
2017-02-01 21:06:05 +00:00
|
|
|
kbnIndex: serverConfig.get('kibana.index'),
|
|
|
|
esApiVersion: serverConfig.get('elasticsearch.apiVersion'),
|
|
|
|
esShardTimeout: serverConfig.get('elasticsearch.shardTimeout'),
|
|
|
|
tilemapsConfig: {
|
|
|
|
deprecated: {
|
|
|
|
isOverridden: isOverridden,
|
|
|
|
config: tilemapConfig,
|
|
|
|
},
|
|
|
|
manifestServiceUrl: serverConfig.get('tilemap.manifestServiceUrl')
|
|
|
|
}
|
2016-06-29 01:43:18 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
init: require('./init.js')
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|