From cd532cd8f71889b2c264ff3e7e3cdd2e75d599c9 Mon Sep 17 00:00:00 2001 From: Jason Rhodes Date: Mon, 8 Apr 2019 15:47:16 -0400 Subject: [PATCH] Rework link components to be separated by destination (#34630) * Creates new LocationContext and useLocation hook * Re-structures Discover links * Re-structures ML job link, cleans up discover link changes * Removes unused components and props * Adds separated APM and Kibana link components * Adds InfraLink component * Adds integration link tests for new link components * Moves unshared getSearchWithCurrentTimeRange into APMLink component where it is used * Moves persistent APM params out of the generic url helpers util * Refactoring rison more * Clarifies interface names for rison * Removes risonStringify helper * Changes link components to inline function exports with manually created component type * Consolidate APM href generation in one place * Re-ordered imports for linting * Updates breadcrumb snapshots now that they include default values --- .../DetailView/StickyErrorProperties.tsx | 11 +- .../app/ErrorGroupOverview/List/index.tsx | 10 +- .../components/app/Main/UpdateBreadcrumbs.tsx | 13 +- .../UpdateBreadcrumbs.test.js.snap | 40 +-- .../MachineLearningFlyout/index.tsx | 16 +- .../MachineLearningFlyout/view.tsx | 16 +- .../ServiceIntegrations/WatcherFlyout.tsx | 12 +- .../ServiceIntegrations/index.tsx | 4 - .../components/app/ServiceDetails/view.tsx | 1 - .../app/ServiceOverview/NoServicesMessage.tsx | 5 +- .../__test__/__snapshots__/List.test.js.snap | 6 +- .../app/ServiceOverview/ServiceList/index.tsx | 6 +- .../NoServicesMessage.test.tsx.snap | 7 +- .../ServiceOverview.test.tsx.snap | 4 +- .../Transaction/ErrorCountBadge.tsx | 9 +- .../Waterfall/FlyoutTopLevelProperties.tsx | 6 +- .../Waterfall/TransactionFlyout/index.tsx | 5 +- .../TransactionDetails/Transaction/index.tsx | 5 +- .../app/TransactionOverview/List/index.tsx | 6 +- .../public/components/shared/KueryBar/view.js | 5 +- .../components/shared/Links/APMLink.test.tsx | 54 ++++ .../components/shared/Links/APMLink.tsx | 52 ++++ .../Links/DiscoverLinks/DiscoverLink.tsx | 61 +++-- .../DiscoverLinks/QueryWithIndexPattern.tsx | 55 ---- .../DiscoverLinks.integration.test.tsx | 27 +- .../shared/Links/InfraLink.test.tsx | 28 ++ .../components/shared/Links/InfraLink.tsx | 33 +++ .../shared/Links/KibanaLink.test.tsx | 69 +---- .../components/shared/Links/KibanaLink.tsx | 51 +--- .../shared/Links/KibanaRisonLink.test.tsx | 90 ------- .../shared/Links/KibanaRisonLink.tsx | 49 ---- .../MLJobLink.test.tsx | 33 +-- .../{ => MachineLearningLinks}/MLJobLink.tsx | 22 +- .../MachineLearningLinks/MLLink.test.tsx | 45 ++++ .../Links/MachineLearningLinks/MLLink.tsx | 44 ++++ .../shared/Links/SetupInstructionsLink.tsx | 2 +- .../shared/Links/TransactionLink.tsx | 43 ++- .../__snapshots__/KibanaLink.test.tsx.snap | 11 - .../KibanaRisonLink.test.tsx.snap | 11 - .../__snapshots__/MLJobLink.test.tsx.snap | 9 - .../components/shared/Links/rison_helpers.ts | 98 ++----- .../shared/Links/url_helpers.test.tsx | 56 ---- .../components/shared/Links/url_helpers.ts | 61 +---- .../TransactionActionMenu.tsx | 142 +++++----- .../__test__/TransactionActionMenu.test.tsx | 6 +- .../TransactionActionMenu.test.tsx.snap | 247 ++---------------- .../shared/charts/TransactionCharts/index.tsx | 3 +- .../apm/public/context/LocationContext.tsx | 23 ++ .../apm/public/hooks/useAPMIndexPattern.tsx | 28 ++ .../plugins/apm/public/hooks/useLocation.tsx | 12 + x-pack/plugins/apm/public/index.tsx | 5 +- .../plugins/apm/public/utils/testHelpers.tsx | 39 ++- 52 files changed, 634 insertions(+), 1062 deletions(-) create mode 100644 x-pack/plugins/apm/public/components/shared/Links/APMLink.test.tsx create mode 100644 x-pack/plugins/apm/public/components/shared/Links/APMLink.tsx delete mode 100644 x-pack/plugins/apm/public/components/shared/Links/DiscoverLinks/QueryWithIndexPattern.tsx create mode 100644 x-pack/plugins/apm/public/components/shared/Links/InfraLink.test.tsx create mode 100644 x-pack/plugins/apm/public/components/shared/Links/InfraLink.tsx delete mode 100644 x-pack/plugins/apm/public/components/shared/Links/KibanaRisonLink.test.tsx delete mode 100644 x-pack/plugins/apm/public/components/shared/Links/KibanaRisonLink.tsx rename x-pack/plugins/apm/public/components/shared/Links/{ => MachineLearningLinks}/MLJobLink.test.tsx (50%) rename x-pack/plugins/apm/public/components/shared/Links/{ => MachineLearningLinks}/MLJobLink.tsx (53%) create mode 100644 x-pack/plugins/apm/public/components/shared/Links/MachineLearningLinks/MLLink.test.tsx create mode 100644 x-pack/plugins/apm/public/components/shared/Links/MachineLearningLinks/MLLink.tsx delete mode 100644 x-pack/plugins/apm/public/components/shared/Links/__snapshots__/KibanaLink.test.tsx.snap delete mode 100644 x-pack/plugins/apm/public/components/shared/Links/__snapshots__/KibanaRisonLink.test.tsx.snap delete mode 100644 x-pack/plugins/apm/public/components/shared/Links/__snapshots__/MLJobLink.test.tsx.snap create mode 100644 x-pack/plugins/apm/public/context/LocationContext.tsx create mode 100644 x-pack/plugins/apm/public/hooks/useAPMIndexPattern.tsx create mode 100644 x-pack/plugins/apm/public/hooks/useLocation.tsx diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/StickyErrorProperties.tsx b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/StickyErrorProperties.tsx index 1784203e646e..ac25cf17cb0e 100644 --- a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/StickyErrorProperties.tsx +++ b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/StickyErrorProperties.tsx @@ -18,7 +18,7 @@ import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n'; import { idx } from '../../../../../common/idx'; import { APMError } from '../../../../../typings/es_schemas/ui/APMError'; import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction'; -import { KibanaLink } from '../../../shared/Links/KibanaLink'; +import { APMLink } from '../../../shared/Links/APMLink'; import { legacyEncodeURIComponent } from '../../../shared/Links/url_helpers'; import { StickyProperties } from '../../../shared/StickyProperties'; @@ -48,15 +48,16 @@ function TransactionLink({ )}/${legacyEncodeURIComponent(transaction.transaction.name)}`; return ( - {transaction.transaction.id} - + ); } diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx b/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx index 8101c738c185..0423665f133b 100644 --- a/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx @@ -21,7 +21,7 @@ import { truncate, unit } from '../../../../style/variables'; -import { KibanaLink } from '../../../shared/Links/KibanaLink'; +import { APMLink } from '../../../shared/Links/APMLink'; import { fromQuery, history, toQuery } from '../../../shared/Links/url_helpers'; function paginateItems({ @@ -36,7 +36,7 @@ function paginateItems({ return items.slice(pageIndex * pageSize, (pageIndex + 1) * pageSize); } -const GroupIdLink = styled(KibanaLink)` +const GroupIdLink = styled(APMLink)` font-family: ${fontFamilyCode}; `; @@ -44,7 +44,7 @@ const MessageAndCulpritCell = styled.div` ${truncate('100%')}; `; -const MessageLink = styled(KibanaLink)` +const MessageLink = styled(APMLink)` font-family: ${fontFamilyCode}; font-size: ${fontSizes.large}; ${truncate('100%')}; @@ -115,7 +115,7 @@ export class ErrorGroupList extends Component { width: px(unit * 6), render: (groupId: string) => { return ( - + {groupId.slice(0, 5) || NOT_AVAILABLE_LABEL} ); @@ -138,7 +138,7 @@ export class ErrorGroupList extends Component { id="error-message-tooltip" content={message || NOT_AVAILABLE_LABEL} > - + {message || NOT_AVAILABLE_LABEL} diff --git a/x-pack/plugins/apm/public/components/app/Main/UpdateBreadcrumbs.tsx b/x-pack/plugins/apm/public/components/app/Main/UpdateBreadcrumbs.tsx index ad9dd310d3f0..f3b6e63f6247 100644 --- a/x-pack/plugins/apm/public/components/app/Main/UpdateBreadcrumbs.tsx +++ b/x-pack/plugins/apm/public/components/app/Main/UpdateBreadcrumbs.tsx @@ -5,14 +5,10 @@ */ import { Location } from 'history'; -import { last, pick } from 'lodash'; +import { last } from 'lodash'; import React from 'react'; import chrome from 'ui/chrome'; -import { - fromQuery, - PERSISTENT_APM_PARAMS, - toQuery -} from '../../shared/Links/url_helpers'; +import { getAPMHref } from '../../shared/Links/APMLink'; import { Breadcrumb, ProvideBreadcrumbs } from './ProvideBreadcrumbs'; import { routes } from './routeConfig'; @@ -23,12 +19,9 @@ interface Props { class UpdateBreadcrumbsComponent extends React.Component { public updateHeaderBreadcrumbs() { - const query = toQuery(this.props.location.search); - const persistentParams = pick(query, PERSISTENT_APM_PARAMS); - const search = fromQuery(persistentParams); const breadcrumbs = this.props.breadcrumbs.map(({ value, match }) => ({ text: value, - href: `#${match.url}?${search}` + href: getAPMHref(match.url, this.props.location.search) })); const current = last(breadcrumbs) || { text: '' }; diff --git a/x-pack/plugins/apm/public/components/app/Main/__test__/__snapshots__/UpdateBreadcrumbs.test.js.snap b/x-pack/plugins/apm/public/components/app/Main/__test__/__snapshots__/UpdateBreadcrumbs.test.js.snap index 817a78658df0..3274461c6552 100644 --- a/x-pack/plugins/apm/public/components/app/Main/__test__/__snapshots__/UpdateBreadcrumbs.test.js.snap +++ b/x-pack/plugins/apm/public/components/app/Main/__test__/__snapshots__/UpdateBreadcrumbs.test.js.snap @@ -3,11 +3,11 @@ exports[`Breadcrumbs /:serviceName 1`] = ` Array [ Object { - "href": "#/?kuery=myKuery", + "href": "#/?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "APM", }, Object { - "href": "#/opbeans-node?kuery=myKuery", + "href": "#/opbeans-node?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "opbeans-node", }, ] @@ -16,15 +16,15 @@ Array [ exports[`Breadcrumbs /:serviceName/errors 1`] = ` Array [ Object { - "href": "#/?kuery=myKuery", + "href": "#/?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "APM", }, Object { - "href": "#/opbeans-node?kuery=myKuery", + "href": "#/opbeans-node?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "opbeans-node", }, Object { - "href": "#/opbeans-node/errors?kuery=myKuery", + "href": "#/opbeans-node/errors?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "Errors", }, ] @@ -33,19 +33,19 @@ Array [ exports[`Breadcrumbs /:serviceName/errors/:groupId 1`] = ` Array [ Object { - "href": "#/?kuery=myKuery", + "href": "#/?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "APM", }, Object { - "href": "#/opbeans-node?kuery=myKuery", + "href": "#/opbeans-node?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "opbeans-node", }, Object { - "href": "#/opbeans-node/errors?kuery=myKuery", + "href": "#/opbeans-node/errors?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "Errors", }, Object { - "href": "#/opbeans-node/errors/myGroupId?kuery=myKuery", + "href": "#/opbeans-node/errors/myGroupId?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "myGroupId", }, ] @@ -54,15 +54,15 @@ Array [ exports[`Breadcrumbs /:serviceName/transactions 1`] = ` Array [ Object { - "href": "#/?kuery=myKuery", + "href": "#/?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "APM", }, Object { - "href": "#/opbeans-node?kuery=myKuery", + "href": "#/opbeans-node?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "opbeans-node", }, Object { - "href": "#/opbeans-node/transactions?kuery=myKuery", + "href": "#/opbeans-node/transactions?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "Transactions", }, ] @@ -71,15 +71,15 @@ Array [ exports[`Breadcrumbs /:serviceName/transactions/:transactionType 1`] = ` Array [ Object { - "href": "#/?kuery=myKuery", + "href": "#/?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "APM", }, Object { - "href": "#/opbeans-node?kuery=myKuery", + "href": "#/opbeans-node?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "opbeans-node", }, Object { - "href": "#/opbeans-node/transactions?kuery=myKuery", + "href": "#/opbeans-node/transactions?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "Transactions", }, ] @@ -88,19 +88,19 @@ Array [ exports[`Breadcrumbs /:serviceName/transactions/:transactionType/:transactionName 1`] = ` Array [ Object { - "href": "#/?kuery=myKuery", + "href": "#/?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "APM", }, Object { - "href": "#/opbeans-node?kuery=myKuery", + "href": "#/opbeans-node?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "opbeans-node", }, Object { - "href": "#/opbeans-node/transactions?kuery=myKuery", + "href": "#/opbeans-node/transactions?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "Transactions", }, Object { - "href": "#/opbeans-node/transactions/request/my-transaction-name?kuery=myKuery", + "href": "#/opbeans-node/transactions/request/my-transaction-name?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "my-transaction-name", }, ] @@ -109,7 +109,7 @@ Array [ exports[`Breadcrumbs Homepage 1`] = ` Array [ Object { - "href": "#/?kuery=myKuery", + "href": "#/?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=myKuery", "text": "APM", }, ] diff --git a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/index.tsx b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/index.tsx index e26c2007b567..f00227aa5d0f 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/MachineLearningFlyout/index.tsx @@ -5,20 +5,18 @@ */ import { i18n } from '@kbn/i18n'; -import { Location } from 'history'; import React, { Component } from 'react'; import { toastNotifications } from 'ui/notify'; import { startMLJob } from '../../../../../services/rest/ml'; import { getAPMIndexPattern } from '../../../../../services/rest/savedObjects'; import { IUrlParams } from '../../../../../store/urlParams'; -import { MLJobLink } from '../../../../shared/Links/MLJobLink'; +import { MLJobLink } from '../../../../shared/Links/MachineLearningLinks/MLJobLink'; import { MachineLearningFlyoutView } from './view'; interface Props { isOpen: boolean; onClose: () => void; urlParams: IUrlParams; - location: Location; serviceTransactionTypes: string[]; } @@ -116,7 +114,7 @@ export class MachineLearningFlyout extends Component { }; public addSuccessToast = () => { - const { location, urlParams } = this.props; + const { urlParams } = this.props; const { serviceName, transactionType } = urlParams; if (!serviceName) { @@ -146,7 +144,6 @@ export class MachineLearningFlyout extends Component { {i18n.translate( 'xpack.apm.serviceDetails.enableAnomalyDetectionPanel.jobCreatedNotificationText.viewJobLinkText', @@ -167,13 +164,7 @@ export class MachineLearningFlyout extends Component { } public render() { - const { - isOpen, - onClose, - urlParams, - location, - serviceTransactionTypes - } = this.props; + const { isOpen, onClose, urlParams, serviceTransactionTypes } = this.props; const { serviceName, transactionType } = urlParams; const { isCreatingJob, @@ -189,7 +180,6 @@ export class MachineLearningFlyout extends Component { void; onClickCreate: () => void; onClose: () => void; @@ -46,7 +45,6 @@ const INITIAL_DATA = { count: 0, jobs: [] }; export function MachineLearningFlyoutView({ hasIndexPattern, isCreatingJob, - location, onChangeTransaction, onClickCreate, onClose, @@ -111,7 +109,6 @@ export function MachineLearningFlyoutView({ {i18n.translate( 'xpack.apm.serviceDetails.enableAnomalyDetectionPanel.callout.jobExistsDescription.viewJobLinkText', @@ -136,10 +133,7 @@ export function MachineLearningFlyoutView({ defaultMessage="No APM index pattern available. To create a job, please import the APM index pattern via the {setupInstructionLink}" values={{ setupInstructionLink: ( - + {i18n.translate( 'xpack.apm.serviceDetails.enableAnomalyDetectionPanel.callout.noPatternTitle.setupInstructionLinkText', { @@ -188,14 +182,14 @@ export function MachineLearningFlyoutView({ Once a job is created, you can manage it and see more details in the {mlJobsPageLink}." values={{ mlJobsPageLink: ( - + {i18n.translate( 'xpack.apm.serviceDetails.enableAnomalyDetectionPanel.manageMLJobDescription.mlJobsPageLinkText', { defaultMessage: 'Machine Learning jobs management page' } )} - + ) }} />{' '} diff --git a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/WatcherFlyout.tsx b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/WatcherFlyout.tsx index daf706c66d1c..3396cb6d4a26 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/WatcherFlyout.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/WatcherFlyout.tsx @@ -26,7 +26,6 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { Location } from 'history'; import { memoize, padLeft, range } from 'lodash'; import moment from 'moment-timezone'; import React, { Component } from 'react'; @@ -35,7 +34,7 @@ import chrome from 'ui/chrome'; import { toastNotifications } from 'ui/notify'; import { IUrlParams } from '../../../../store/urlParams'; import { XPACK_DOCS } from '../../../../utils/documentation/xpack'; -import { UnconnectedKibanaLink } from '../../../shared/Links/KibanaLink'; +import { KibanaLink } from '../../../shared/Links/KibanaLink'; import { createErrorGroupWatch, Schedule } from './createErrorGroupWatch'; type ScheduleKey = keyof Schedule; @@ -59,7 +58,6 @@ const SmallInput = styled.div` interface WatcherFlyoutProps { urlParams: IUrlParams; onClose: () => void; - location: Location; isOpen: boolean; } @@ -253,10 +251,8 @@ export class WatcherFlyout extends Component< } } )}{' '} - {i18n.translate( 'xpack.apm.serviceDetails.enableErrorReportsPanel.watchCreatedNotificationText.viewWatchLinkText', @@ -264,7 +260,7 @@ export class WatcherFlyout extends Component< defaultMessage: 'View watch' } )} - +

) }); diff --git a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx index f3a9054bb8b1..6dcf67f1e10f 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx @@ -11,7 +11,6 @@ import { EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { Location } from 'history'; import { memoize } from 'lodash'; import React, { Fragment } from 'react'; import chrome from 'ui/chrome'; @@ -21,7 +20,6 @@ import { MachineLearningFlyout } from './MachineLearningFlyout'; import { WatcherFlyout } from './WatcherFlyout'; interface Props { - location: Location; transactionTypes: string[]; urlParams: IUrlParams; } @@ -164,14 +162,12 @@ export class ServiceIntegrations extends React.Component { /> diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/NoServicesMessage.tsx b/x-pack/plugins/apm/public/components/app/ServiceOverview/NoServicesMessage.tsx index ddf5648cff4c..723f8db37a78 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/NoServicesMessage.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/NoServicesMessage.tsx @@ -56,10 +56,7 @@ export function NoServicesMessage({ historicalDataFound }: Props) { defaultMessage: 'You may also have old data that needs to be migrated.' })}{' '} - + {i18n.translate( 'xpack.apm.servicesTable.UpgradeAssistantLink', { diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/__test__/__snapshots__/List.test.js.snap b/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/__test__/__snapshots__/List.test.js.snap index 4af693fe7110..a3fe8a34d19c 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/__test__/__snapshots__/List.test.js.snap +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/__test__/__snapshots__/List.test.js.snap @@ -7,11 +7,11 @@ exports[`ErrorGroupOverview -> List should render columns correctly 1`] = ` id="service-name-tooltip" position="top" > - opbeans-python - + `; diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx b/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx index 11df7e29a56e..16a7f04805fa 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx @@ -12,7 +12,7 @@ import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n'; import { ServiceListAPIResponse } from '../../../../../server/lib/services/get_services'; import { fontSizes, truncate } from '../../../../style/variables'; import { asDecimal, asMillis } from '../../../../utils/formatters'; -import { KibanaLink } from '../../../shared/Links/KibanaLink'; +import { APMLink } from '../../../shared/Links/APMLink'; import { ITableColumn, ManagedTable } from '../../../shared/ManagedTable'; interface Props { @@ -34,7 +34,7 @@ function formatString(value?: string | null) { return value || NOT_AVAILABLE_LABEL; } -const AppLink = styled(KibanaLink)` +const AppLink = styled(APMLink)` font-size: ${fontSizes.large}; ${truncate('100%')}; `; @@ -51,7 +51,7 @@ export const SERVICE_COLUMNS: Array< sortable: true, render: (serviceName: string) => ( - + {formatString(serviceName)} diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/NoServicesMessage.test.tsx.snap b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/NoServicesMessage.test.tsx.snap index 22b140abd3fa..02dbe22aeb19 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/NoServicesMessage.test.tsx.snap +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/NoServicesMessage.test.tsx.snap @@ -16,12 +16,11 @@ exports[`NoServicesMessage should show a "no services installed" message, a link

You may also have old data that needs to be migrated. - Learn more by visiting the Kibana Upgrade Assistant - + .

diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.tsx.snap b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.tsx.snap index b7f431249daf..3e10ef06587e 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.tsx.snap +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.tsx.snap @@ -79,7 +79,7 @@ NodeList [ Learn more by visiting the Kibana Upgrade Assistant @@ -95,7 +95,7 @@ NodeList [ />