Skip to content

Commit

Permalink
move things
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Dec 12, 2019
1 parent 7987d15 commit ff54c68
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions x-pack/legacy/plugins/apm/public/new-platform/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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() {}
Expand Down

0 comments on commit ff54c68

Please sign in to comment.