From ff54c680494c6b324e72007dd2ec5713a275059c Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Thu, 12 Dec 2019 17:31:35 -0600 Subject: [PATCH] move things --- .../plugins/apm/public/new-platform/plugin.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx b/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx index d09b984ecfc0ecf..70709c7d00e4ec0 100644 --- a/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx +++ b/x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx @@ -80,6 +80,12 @@ export class ApmPlugin setReadonlyBadge(coreStart); toggleAppLinkInNav(coreStart, config); + // create static index pattern and store as saved object. Not needed by APM UI but for legacy reasons in Discover, Dashboard etc. + createStaticIndexPattern(coreStart.http).catch(e => { + // eslint-disable-next-line no-console + console.log('Error fetching static index pattern', e); + }); + const apmPluginContextValue: ApmPluginContextValue = { config, core: coreStart, @@ -92,13 +98,9 @@ export class ApmPlugin element: document.getElementById(REACT_APP_ROOT_ID) as HTMLElement }; + // Call renderApp directly here in `start`. When when we switch to NP, we'll + // be calling the `mount` method of `core.application.register` in `setup` renderApp(apmPluginContextValue, params); - - // create static index pattern and store as saved object. Not needed by APM UI but for legacy reasons in Discover, Dashboard etc. - createStaticIndexPattern(coreStart.http).catch(e => { - // eslint-disable-next-line no-console - console.log('Error fetching static index pattern', e); - }); } public stop() {}