From 7b1499f4f8517152aca014c46e0a6b4b04ce4886 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Thu, 19 Dec 2019 22:48:40 -0500 Subject: [PATCH] initial navigateToApp functionality --- src/plugins/management/public/management_service.ts | 9 ++++----- src/plugins/management/public/plugin.tsx | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/management/public/management_service.ts b/src/plugins/management/public/management_service.ts index fc541baab6dc9..8622756a52d7a 100644 --- a/src/plugins/management/public/management_service.ts +++ b/src/plugins/management/public/management_service.ts @@ -22,6 +22,7 @@ import { KibanaLegacySetup } from '../../kibana_legacy/public'; // @ts-ignore import { LegacyManagementSection } from './legacy'; import { CreateSection } from './types'; +import { CoreStart } from '../../../core/public'; export class ManagementService { private sections: ManagementSection[] = []; @@ -29,7 +30,6 @@ export class ManagementService { this.sections = []; } - // todo verify input, private register( registerLegacyApp: KibanaLegacySetup['registerLegacyApp'], getLegacyManagement: () => LegacyManagementSection @@ -79,12 +79,11 @@ export class ManagementService { }; }; - public start = { + public start = (navigateToApp: CoreStart['application']['navigateToApp']) => ({ getSection: this.getSection.bind(this), getAllSections: this.getAllSections.bind(this), navigateToApp: (appId: string, options?: { path?: string; state?: any }) => { - // @ts-ignore - // console.log('navigateToApp', appId, options); + navigateToApp(appId, options); }, - }; + }); } diff --git a/src/plugins/management/public/plugin.tsx b/src/plugins/management/public/plugin.tsx index dbb95acaa291b..beb8a96177111 100644 --- a/src/plugins/management/public/plugin.tsx +++ b/src/plugins/management/public/plugin.tsx @@ -36,7 +36,7 @@ export class ManagementPlugin implements Plugin