Skip to content

Commit

Permalink
Add searchDeepLinks for APM
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Apr 12, 2021
1 parent 5a9fc21 commit 8282e7f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const routes: APMRouteDefinition[] = [
render: renderAsRedirectTo('/services'),
breadcrumb: 'APM',
},
// !! Need to be kept in sync with the searchDeepLinks in x-pack/plugins/apm/public/plugin.ts
{
exact: true,
path: '/services',
Expand All @@ -182,6 +183,7 @@ export const routes: APMRouteDefinition[] = [
defaultMessage: 'Services',
}),
},
// !! Need to be kept in sync with the searchDeepLinks in x-pack/plugins/apm/public/plugin.ts
{
exact: true,
path: '/traces',
Expand Down Expand Up @@ -335,6 +337,7 @@ export const routes: APMRouteDefinition[] = [
component: TraceLink,
breadcrumb: null,
},
// !! Need to be kept in sync with the searchDeepLinks in x-pack/plugins/apm/public/plugin.ts
{
exact: true,
path: '/service-map',
Expand Down
27 changes: 27 additions & 0 deletions x-pack/plugins/apm/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { ConfigSchema } from '.';
import {
FetchDataParams,
Expand Down Expand Up @@ -138,6 +139,32 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
appRoute: '/app/apm',
icon: 'plugins/apm/public/icon.svg',
category: DEFAULT_APP_CATEGORIES.observability,
meta: {
// !! Need to be kept in sync with the routes in x-pack/plugins/apm/public/components/app/Main/route_config/index.tsx
searchDeepLinks: [
{
id: 'services',
title: i18n.translate('xpack.apm.breadcrumb.servicesTitle', {
defaultMessage: 'Services',
}),
path: '/services',
},
{
id: 'traces',
title: i18n.translate('xpack.apm.breadcrumb.tracesTitle', {
defaultMessage: 'Traces',
}),
path: '/traces',
},
{
id: 'service-map',
title: i18n.translate('xpack.apm.breadcrumb.serviceMapTitle', {
defaultMessage: 'Service Map',
}),
path: '/service-map',
},
],
},

async mount(params: AppMountParameters<unknown>) {
// Load application bundle and Get start services
Expand Down

0 comments on commit 8282e7f

Please sign in to comment.