[APM] Uses doc link service instead of ElasticDocsLink for linking upgrading info (#111155) (#111293)

This commit is contained in:
István Zoltán Szabó 2021-09-06 19:35:12 +02:00 committed by GitHub
parent 4542e15b8a
commit 2cace2f7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 7 deletions

View file

@ -12,6 +12,7 @@ readonly links: {
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {

File diff suppressed because one or more lines are too long

View file

@ -34,6 +34,7 @@ export class DocLinksService {
apm: {
kibanaSettings: `${KIBANA_DOCS}apm-settings-in-kibana.html`,
supportedServiceMaps: `${KIBANA_DOCS}service-maps.html#service-maps-supported`,
upgrading: `${APM_DOCS}server/${DOC_LINK_VERSION}/upgrading.html`,
metaData: `${APM_DOCS}get-started/${DOC_LINK_VERSION}/metadata.html`,
},
canvas: {
@ -462,6 +463,7 @@ export interface DocLinksStart {
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {

View file

@ -477,6 +477,7 @@ export interface DocLinksStart {
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {

View file

@ -10,6 +10,7 @@ import {
EuiFlexGrid,
EuiFlexGroup,
EuiFlexItem,
EuiLink,
EuiPanel,
EuiSpacer,
EuiStat,
@ -24,6 +25,7 @@ import {
SERVICE_NODE_NAME_MISSING,
} from '../../../../common/service_nodes';
import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context';
import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context';
import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb';
import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context';
import { useApmParams } from '../../../hooks/use_apm_params';
@ -33,7 +35,6 @@ import { useServiceMetricChartsFetcher } from '../../../hooks/use_service_metric
import { useTimeRange } from '../../../hooks/use_time_range';
import { truncate, unit } from '../../../utils/style';
import { MetricsChart } from '../../shared/charts/metrics_chart';
import { ElasticDocsLink } from '../../shared/Links/ElasticDocsLink';
const INITIAL_DATA = {
host: '',
@ -99,6 +100,7 @@ export function ServiceNodeMetrics() {
[kuery, serviceName, serviceNodeName, start, end]
);
const { docLinks } = useApmPluginContext().core;
const isLoading = status === FETCH_STATUS.LOADING;
const isAggregatedData = serviceNodeName === SERVICE_NODE_NAME_MISSING;
@ -120,16 +122,12 @@ export function ServiceNodeMetrics() {
defaultMessage="We could not identify which JVMs these metrics belong to. This is likely caused by running a version of APM Server that is older than 7.5. Upgrading to APM Server 7.5 or higher should resolve this issue. For more information on upgrading, see the {link}. As an alternative, you can use the Kibana Query bar to filter by hostname, container ID or other fields."
values={{
link: (
<ElasticDocsLink
target="_blank"
section="/apm/server"
path="/upgrading.html"
>
<EuiLink href={docLinks.links.apm.upgrading}>
{i18n.translate(
'xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningDocumentationLink',
{ defaultMessage: 'documentation of APM Server' }
)}
</ElasticDocsLink>
</EuiLink>
),
}}
/>