[APM] Fix link to onboarding page in the Observability Onboarding plugin (#161847)

Closes https://github.com/elastic/kibana/issues/159675

## Summary

We have in lot of places, Tutorial link hardcoded to
`'/app/home#/tutorial/apm'`

This must change based on deployment type to be Serverless or Non
Serverless.

For Serverless the URL is - `'/app/apm/onboarding'`
For Non Serverless, the URL - `'/app/home#/tutorial/apm'`

Hence to avoid adding logic to read Serverless/Non Serverless mode in
all plugins and packages, i have implemented a redirect URL
`/app/apm/tutorial` inside the APM plugin which will read the Serverless
config and accordingly do the redirect.
This commit is contained in:
Achyut Jhunjhunwala 2023-07-20 12:33:42 +02:00 committed by GitHub
parent ab486aff05
commit fabb7109a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 103 additions and 29 deletions

View file

@ -78,7 +78,7 @@ export function UXActionMenu({
color="primary"
iconType="indexOpen"
iconSide="left"
href={application.getUrlForApp('/home#/tutorial/apm')}
href={application.getUrlForApp('/apm/tutorial')}
>
{i18n.translate('xpack.ux.addDataButtonLabel', {
defaultMessage: 'Add data',

View file

@ -48,7 +48,7 @@ export function RumHome() {
'Enable RUM with the APM agent to collect user experience data.',
}
),
href: http.basePath.prepend(`/app/home#/tutorial/apm`),
href: http.basePath.prepend('/app/apm/tutorial'),
},
},
docsLink: docLinks.links.observability.guide,