Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Documentation links using ElasticDocsLink.tsx don't always work #56453

Closed
bmorelli25 opened this issue Jan 30, 2020 · 1 comment · Fixed by #61880
Closed

[APM] Documentation links using ElasticDocsLink.tsx don't always work #56453

bmorelli25 opened this issue Jan 30, 2020 · 1 comment · Fixed by #61880
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:NP Migration Team:APM All issues that need APM UI Team support v7.7.0

Comments

@bmorelli25
Copy link
Member

bmorelli25 commented Jan 30, 2020

The ElasticDocsLink.tsx component uses the version of Kibana to generate links to documentation.

export function ElasticDocsLink({ section, path, ...rest }: Props) {
const { version } = useApmPluginContext().packageInfo;
const href = `https://www.elastic.co/guide/en${section}/${version}${path}`;
return <EuiLink href={href} {...rest} />;
}

This is fine, except when running a version of Kibana like 8.0.0, or 7.6.0-snapshot. Documentation for those versions don't exist, which breaks the links that use the component.

As an example, when running 7.6.0-snapshot: "How to add labels and other data" links to
https://www.elastic.co/guide/en/apm/get-started/7.6.0-SNAPSHOT/metadata.html instead of
https://www.elastic.co/guide/en/apm/get-started/7.6/metadata.html.

<ElasticDocsLink section="/apm/get-started" path="/metadata.html">
<EuiText size="s">
<EuiIcon type="help" /> How to add labels and other data
</EuiText>
</ElasticDocsLink>

Is it possible for this component to use the {config.docs.version} that the links in the APM tutorial use? This method uses the correct documentation version for external links`. As an example:

'{config.docs.base_url}guide/en/apm/get-started/{config.docs.version}/index.html',

@bmorelli25 bmorelli25 added bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support labels Jan 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@smith smith self-assigned this Mar 24, 2020
@smith smith added the v7.8.0 label Mar 24, 2020
@smith smith removed their assignment Mar 24, 2020
smith added a commit to smith/kibana that referenced this issue Mar 30, 2020
Remove `packageInfo` (from ui/metadata package from the legacy platform) and replace with `core.dockLinks` in the `ElasticDocsLink` component.

Fixes elastic#56453
Fixes elastic#60945
@smith smith self-assigned this Mar 30, 2020
@smith smith added v7.7.0 and removed v7.8.0 labels Mar 30, 2020
smith added a commit that referenced this issue Mar 30, 2020
* Use docLinks API for APM doc links

Remove `packageInfo` (from ui/metadata package from the legacy platform) and replace with `core.dockLinks` in the `ElasticDocsLink` component.

Fixes #56453
Fixes #60945
@zube zube bot added the [zube]: Done label Mar 30, 2020
smith added a commit to smith/kibana that referenced this issue Mar 30, 2020
* Use docLinks API for APM doc links

Remove `packageInfo` (from ui/metadata package from the legacy platform) and replace with `core.dockLinks` in the `ElasticDocsLink` component.

Fixes elastic#56453
Fixes elastic#60945
smith added a commit to smith/kibana that referenced this issue Mar 30, 2020
* Use docLinks API for APM doc links

Remove `packageInfo` (from ui/metadata package from the legacy platform) and replace with `core.dockLinks` in the `ElasticDocsLink` component.

Fixes elastic#56453
Fixes elastic#60945
smith added a commit that referenced this issue Mar 31, 2020
* Use docLinks API for APM doc links

Remove `packageInfo` (from ui/metadata package from the legacy platform) and replace with `core.dockLinks` in the `ElasticDocsLink` component.

Fixes #56453
Fixes #60945
smith added a commit that referenced this issue Apr 2, 2020
* Use docLinks API for APM doc links

Remove `packageInfo` (from ui/metadata package from the legacy platform) and replace with `core.dockLinks` in the `ElasticDocsLink` component.

Fixes #56453
Fixes #60945

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:NP Migration Team:APM All issues that need APM UI Team support v7.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants