-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
51 lines (43 loc) · 1.34 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { resolve } from 'path';
import { init } from './server/init';
import { replaceInjectedVars } from './server/lib/replace_injected_vars';
export default function (kibana) {
return new kibana.Plugin({
id: 'notification_center',
configPrefix: 'notification_center',
require: ['elasticsearch'],
name: 'notification_center',
publicDir: resolve(__dirname, 'public'),
uiExports: {
chromeNavControls: [
'plugins/notification_center/nav_control/nav_control'
],
injectDefaultVars(server) {
return {
notificationCenter: {
supportDarkTheme: server.config().get('notification_center.supportDarkTheme')
}
};
},
replaceInjectedVars
},
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
index: Joi.string().default('notification-%{+YYYY.MM.DD}'),
template: Joi.object({
name: Joi.string().default('notification_center_template'),
overwrite: Joi.boolean().default(false)
}).default(),
api: Joi.object({
enabled: Joi.boolean().default(true),
pull: Joi.object({
maxSize: Joi.number().default(100)
}).default()
}).default(),
supportDarkTheme: Joi.boolean().default(true)
}).default();
},
init
});
};