Skip to content

Commit

Permalink
Fix from 51618 pr
Browse files Browse the repository at this point in the history
  • Loading branch information
igoristic committed Nov 27, 2019
1 parent f74a376 commit 8a09ab7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions x-pack/legacy/plugins/monitoring/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const monitoring = (kibana: LegacyPluginApi): ArrayOrItem<LegacyPluginSpe

init(server: Server) {
const serverConfig = server.config();
const { usage, injectUiAppVars, getOSInfo, plugins } = server as (typeof server & { getOSInfo?: any });
const { injectUiAppVars, getOSInfo, plugins } = server as (typeof server & { getOSInfo?: any });
const log = (...args: Parameters<typeof server.log>) => server.log(...args);
const route = (...args: Parameters<typeof server.route>) => server.route(...args);
const expose = (...args: Parameters<typeof server.expose>) => server.expose(...args);
Expand All @@ -108,9 +108,6 @@ export const monitoring = (kibana: LegacyPluginApi): ArrayOrItem<LegacyPluginSpe
throw `Unknown key '${key}'`;
}
}),
usage: {
collectorSet: usage.collectorSet
},
injectUiAppVars,
log,
getOSInfo,
Expand All @@ -126,7 +123,8 @@ export const monitoring = (kibana: LegacyPluginApi): ArrayOrItem<LegacyPluginSpe

const serverPlugins = plugins as Partial<typeof plugins> & { infra?: InfraPlugin };
const { xpack_main, elasticsearch, infra } = serverPlugins;
new Plugin().setup(serverFacade, { xpack_main, elasticsearch, infra });
const { usageCollection } = server.newPlatform.setup.plugins;
new Plugin().setup(serverFacade, { xpack_main, elasticsearch, infra, usageCollection, });
},

postInit(server: Server) {
Expand Down

0 comments on commit 8a09ab7

Please sign in to comment.