@@ -33,6 +33,7 @@ import {
3333 SavedObjectsClientContract ,
3434 ScopedHistory ,
3535} from 'src/core/public' ;
36+ import { UrlForwardingSetup , UrlForwardingStart } from 'src/plugins/url_forwarding/public' ;
3637import { UsageCollectionSetup } from '../../usage_collection/public' ;
3738import {
3839 CONTEXT_MENU_TRIGGER ,
@@ -125,6 +126,7 @@ interface SetupDependencies {
125126 embeddable : EmbeddableSetup ;
126127 home ?: HomePublicPluginSetup ;
127128 kibanaLegacy : KibanaLegacySetup ;
129+ urlForwarding : UrlForwardingSetup ;
128130 share ?: SharePluginSetup ;
129131 uiActions : UiActionsSetup ;
130132 usageCollection ?: UsageCollectionSetup ;
@@ -133,6 +135,7 @@ interface SetupDependencies {
133135interface StartDependencies {
134136 data : DataPublicPluginStart ;
135137 kibanaLegacy : KibanaLegacyStart ;
138+ urlForwarding : UrlForwardingStart ;
136139 embeddable : EmbeddableStart ;
137140 inspector : InspectorStartContract ;
138141 navigation : NavigationStart ;
@@ -190,7 +193,16 @@ export class DashboardPlugin
190193
191194 public setup (
192195 core : CoreSetup < StartDependencies , DashboardStart > ,
193- { share, uiActions, embeddable, home, kibanaLegacy, data, usageCollection } : SetupDependencies
196+ {
197+ share,
198+ uiActions,
199+ embeddable,
200+ home,
201+ kibanaLegacy,
202+ urlForwarding,
203+ data,
204+ usageCollection,
205+ } : SetupDependencies
194206 ) : Setup {
195207 this . dashboardFeatureFlagConfig = this . initializerContext . config . get <
196208 DashboardFeatureFlagConfig
@@ -311,7 +323,8 @@ export class DashboardPlugin
311323 navigation,
312324 share : shareStart ,
313325 data : dataStart ,
314- kibanaLegacy : { dashboardConfig, navigateToDefaultApp, navigateToLegacyKibanaUrl } ,
326+ kibanaLegacy : { dashboardConfig } ,
327+ urlForwarding : { navigateToDefaultApp, navigateToLegacyKibanaUrl } ,
315328 savedObjects,
316329 } = pluginsStart ;
317330
@@ -357,7 +370,7 @@ export class DashboardPlugin
357370 initAngularBootstrap ( ) ;
358371
359372 core . application . register ( app ) ;
360- kibanaLegacy . forwardApp (
373+ urlForwarding . forwardApp (
361374 DashboardConstants . DASHBOARDS_ID ,
362375 DashboardConstants . DASHBOARDS_ID ,
363376 ( path ) => {
@@ -366,7 +379,7 @@ export class DashboardPlugin
366379 return `#/list${ tail || '' } ` ;
367380 }
368381 ) ;
369- kibanaLegacy . forwardApp (
382+ urlForwarding . forwardApp (
370383 DashboardConstants . DASHBOARD_ID ,
371384 DashboardConstants . DASHBOARDS_ID ,
372385 ( path ) => {
0 commit comments