Skip to content

Commit 44577f3

Browse files
authored
Fix the plugins passed into legacy routes to ensure they are setup and not start plugins (#82192)
1 parent 3709b77 commit 44577f3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

x-pack/plugins/monitoring/server/plugin.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ export class Plugin {
233233
legacyConfig,
234234
core.getStartServices as () => Promise<[CoreStart, PluginsStart, {}]>,
235235
this.licenseService,
236-
this.cluster
236+
this.cluster,
237+
plugins
237238
);
238239

239240
this.registerPluginInUI(plugins);
@@ -313,7 +314,8 @@ export class Plugin {
313314
legacyConfig: any,
314315
getCoreServices: () => Promise<[CoreStart, PluginsStart, {}]>,
315316
licenseService: MonitoringLicenseService,
316-
cluster: ILegacyCustomClusterClient
317+
cluster: ILegacyCustomClusterClient,
318+
setupPlugins: PluginsSetup
317319
): MonitoringCore {
318320
const router = this.legacyShimDependencies.router;
319321
const legacyConfigWrapper = () => ({
@@ -372,7 +374,7 @@ export class Plugin {
372374
config: legacyConfigWrapper,
373375
newPlatform: {
374376
setup: {
375-
plugins,
377+
plugins: setupPlugins,
376378
},
377379
},
378380
plugins: {

x-pack/plugins/monitoring/server/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export interface LegacyRequest {
9191
};
9292
newPlatform: {
9393
setup: {
94-
plugins: PluginsStart;
94+
plugins: PluginsSetup;
9595
};
9696
};
9797
plugins: {

0 commit comments

Comments
 (0)