Skip to content

Commit

Permalink
Merge pull request #5 from jasonrhodes/np-help_reinstate-legacy-infra…
Browse files Browse the repository at this point in the history
…-plugin-for-saved-object-mappings

Initiates legacy plugin correctly with proper dummy config
  • Loading branch information
Kerry350 authored Jan 23, 2020
2 parents 5879c9d + 4382081 commit bbe8436
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { consoleExtensions } from './legacy/plugins/console_extensions';
import { spaces } from './legacy/plugins/spaces';
import { kueryAutocompleteInitializer } from './legacy/plugins/kuery_autocomplete';
import { canvas } from './legacy/plugins/canvas';
import { infra } from './legacy/plugins/infra';
import { taskManager } from './legacy/plugins/task_manager';
import { rollup } from './legacy/plugins/rollup';
import { siem } from './legacy/plugins/siem';
Expand Down Expand Up @@ -67,6 +68,7 @@ module.exports = function(kibana) {
consoleExtensions(kibana),
indexLifecycleManagement(kibana),
kueryAutocompleteInitializer(kibana),
infra(kibana),
taskManager(kibana),
rollup(kibana),
transform(kibana),
Expand Down
13 changes: 9 additions & 4 deletions x-pack/legacy/plugins/infra/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { Root } from 'joi';
import { savedObjectMappings } from '../../../plugins/infra/server';

export const APP_ID = 'infra';

export function infra(kibana: any) {
return new kibana.Plugin({
id: APP_ID,
id: 'infra',
configPrefix: 'xpack.infra',
require: ['kibana', 'elasticsearch'],
uiExports: {
mappings: savedObjectMappings,
},
config(Joi: Root) {
return Joi.object({
enabled: Joi.boolean().default(true),
})
.unknown()
.default();
},
});
}

0 comments on commit bbe8436

Please sign in to comment.