-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.js
executable file
·34 lines (30 loc) · 1.19 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
export default function (kibana) {
return new kibana.Plugin({
name: 'wafermap',
uiExports: {
visTypes: ['plugins/wafermap/wafer_map_vis'],
injectDefaultVars(server) {
const config = server.config();
return {
defaultXAxisOrientation: config.get('wafermap.defaultXAxisOrientation'),
defaultYAxisOrientation: config.get('wafermap.defaultYAxisOrientation'),
defaultSoftBinName: config.get('wafermap.defaultSoftBinName'),
defaultHardBinName: config.get('wafermap.defaultHardBinName'),
defaultHardBinColor: config.get('wafermap.defaultHardBinColor'),
defaultSoftBinColor: config.get('wafermap.defaultSoftBinColor'),
};
},
},
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
defaultXAxisOrientation: Joi.string().default('asc'),
defaultYAxisOrientation: Joi.string().default('des'),
defaultSoftBinName: Joi.string().default('Bin'),
defaultHardBinName: Joi.string().default('Bin'),
defaultHardBinColor: Joi.string().default("1"),
defaultSoftBinColor: Joi.string().default("1"),
}).default();
},
});
}