/
index.js
34 lines (33 loc) · 1.23 KB
/
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
33
34
import { registerFieldFormats } from './server/field-formatters';
export default function(kibana) {
return new kibana.Plugin({
require: ['kibana'],
name: 'kibana_object_format',
uiExports: {
hacks: [
'plugins/kibana_object_format/hacks/field_mapper_hack',
'plugins/kibana_object_format/hacks/custom_filter_bootstrap',
'plugins/kibana_object_format/hacks/object_filter',
'plugins/kibana_object_format/hacks/scroll_bug',
'plugins/kibana_object_format/field_formats/object/register',
],
uiSettingDefaults: {
'fieldMapperHack:fields': {
value:
'{\n "index_pattern": {\n "*": {\n "include": [],\n "exclude": [".*"]\n }\n }\n}',
type: 'json',
description:
'Configure field formatters for objects and arrays of objects by declaring the patterns and fields. See the <a href="https://github.com/istresearch/kibana-object-format" target="_blank">kibana-object-formatter</a> plugin project.',
},
},
},
async init(server) {
registerFieldFormats(server);
},
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
}).default();
},
});
}