Skip to content

Commit

Permalink
Add x-pack/plugins/observability_solution/apm/public/application/inde…
Browse files Browse the repository at this point in the history
…x.tsx
  • Loading branch information
tsullivan committed Apr 16, 2024
1 parent f6731e2 commit 8a3e4ef
Showing 1 changed file with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

import React from 'react';
import ReactDOM from 'react-dom';

import type { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public';
import {
AppMountParameters,
CoreStart,
APP_WRAPPER_CLASS,
} from '@kbn/core/public';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
import { ConfigSchema } from '..';
import { ApmPluginSetupDeps, ApmPluginStartDeps, ApmServices } from '../plugin';
import { createCallApmApi } from '../services/rest/create_call_apm_api';
Expand Down Expand Up @@ -44,7 +46,7 @@ export const renderApp = ({
apmServices: ApmServices;
kibanaEnvironment: KibanaEnvContext;
}) => {
const { element, theme$ } = appMountParameters;
const { element } = appMountParameters;
const apmPluginContextValue = {
appMountParameters,
config,
Expand Down Expand Up @@ -73,21 +75,23 @@ export const renderApp = ({
element.classList.add(APP_WRAPPER_CLASS);

ReactDOM.render(
<KibanaThemeProvider
theme$={theme$}
modify={{
breakpoint: {
xxl: 1600,
xxxl: 2000,
},
}}
>
<ApmAppRoot
apmPluginContextValue={apmPluginContextValue}
pluginsStart={pluginsStart}
apmServices={apmServices}
/>
</KibanaThemeProvider>,
<KibanaRenderContextProvider {...coreStart}>
<KibanaThemeProvider
theme={coreStart.theme}
modify={{
breakpoint: {
xxl: 1600,
xxxl: 2000,
},
}}
>
<ApmAppRoot
apmPluginContextValue={apmPluginContextValue}
pluginsStart={pluginsStart}
apmServices={apmServices}
/>
</KibanaThemeProvider>
</KibanaRenderContextProvider>,
element
);
return () => {
Expand Down

0 comments on commit 8a3e4ef

Please sign in to comment.