diff --git a/x-pack/plugins/infra/public/apps/common_providers.tsx b/x-pack/plugins/infra/public/apps/common_providers.tsx index c05fd4fabb04e..001c4ce44ca0c 100644 --- a/x-pack/plugins/infra/public/apps/common_providers.tsx +++ b/x-pack/plugins/infra/public/apps/common_providers.tsx @@ -59,16 +59,16 @@ export interface CoreProvidersProps { pluginStart: InfraClientStartExports; plugins: InfraClientStartDeps; theme$: AppMountParameters['theme$']; - kibanaEnvironment: KibanaEnvContext; + kibanaEnvironment?: KibanaEnvContext; } export const CoreProviders: React.FC = ({ children, core, pluginStart, - kibanaEnvironment, plugins, theme$, + kibanaEnvironment, }) => { const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider( core, diff --git a/x-pack/plugins/infra/public/apps/metrics_app.tsx b/x-pack/plugins/infra/public/apps/metrics_app.tsx index e93958141db25..d47aaa62adcec 100644 --- a/x-pack/plugins/infra/public/apps/metrics_app.tsx +++ b/x-pack/plugins/infra/public/apps/metrics_app.tsx @@ -29,10 +29,10 @@ export const METRICS_APP_DATA_TEST_SUBJ = 'infraMetricsPage'; export const renderApp = ( core: CoreStart, plugins: InfraClientStartDeps, - kibanaEnvironment: KibanaEnvContext, pluginStart: InfraClientStartExports, pluginConfig: InfraPublicConfig, - { element, history, setHeaderActionMenu, theme$ }: AppMountParameters + { element, history, setHeaderActionMenu, theme$ }: AppMountParameters, + kibanaEnvironment: KibanaEnvContext ) => { const storage = new Storage(window.localStorage); diff --git a/x-pack/plugins/infra/public/plugin.ts b/x-pack/plugins/infra/public/plugin.ts index f44ec7de29f40..7d717cf9057e4 100644 --- a/x-pack/plugins/infra/public/plugin.ts +++ b/x-pack/plugins/infra/public/plugin.ts @@ -314,18 +314,11 @@ export class Plugin implements InfraClientPluginClass { const isCloudEnv = !!pluginsSetup.cloud?.isCloudEnabled; const isServerlessEnv = pluginsSetup.cloud?.isServerlessEnabled || this.isServerlessEnv; - return renderApp( - coreStart, - { ...plugins }, - { - kibanaVersion: this.kibanaVersion, - isCloudEnv, - isServerlessEnv, - }, - pluginStart, - this.config, - params - ); + return renderApp(coreStart, { ...plugins }, pluginStart, this.config, params, { + kibanaVersion: this.kibanaVersion, + isCloudEnv, + isServerlessEnv, + }); }, });