From 5023f2ebd69e7cd508a1ce233af973925b294af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Fri, 11 Jan 2019 14:42:43 +0100 Subject: [PATCH] Remove `app/apm` from internal links --- .../__snapshots__/DetailView.test.tsx.snap | 1 - .../app/ErrorGroupDetails/DetailView/index.tsx | 1 - .../__test__/__snapshots__/List.test.js.snap | 16 ++++++++-------- .../__test__/__snapshots__/List.test.js.snap | 1 - .../app/ServiceOverview/ServiceList/index.tsx | 2 +- .../Waterfall/FlyoutTopLevelProperties.tsx | 5 +---- .../components/shared/Links/KibanaLink.tsx | 2 +- .../components/shared/Links/url_helpers.ts | 6 +++--- .../public/components/shared/TransactionLink.tsx | 6 +----- 9 files changed, 15 insertions(+), 25 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.tsx.snap b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.tsx.snap index a56e1c46af904..00580027c064d 100644 --- a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.tsx.snap +++ b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.tsx.snap @@ -76,7 +76,6 @@ exports[`DetailView should render StickyProperties 1`] = ` "label": "Transaction sample ID", "val": List should render with data 1`] = ` > a0ce2 @@ -513,7 +513,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` @@ -572,7 +572,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` > f3ac9 @@ -592,7 +592,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` @@ -651,7 +651,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` > e9086 @@ -671,7 +671,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` @@ -730,7 +730,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` > 8673d @@ -750,7 +750,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` 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 9b7b92df92f10..4af693fe71107 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 @@ -9,7 +9,6 @@ exports[`ErrorGroupOverview -> List should render columns correctly 1`] = ` > 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 1c8c22308190a..bba9f8564ff0d 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 @@ -53,7 +53,7 @@ export const SERVICE_COLUMNS = [ sortable: true, render: (serviceName: string) => ( - + {formatString(serviceName)} diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/FlyoutTopLevelProperties.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/FlyoutTopLevelProperties.tsx index 56ce3aefcf8f8..438f75b7205d2 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/FlyoutTopLevelProperties.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/FlyoutTopLevelProperties.tsx @@ -28,10 +28,7 @@ export function FlyoutTopLevelProperties({ transaction }: Props) { label: 'Service', fieldName: SERVICE_NAME, val: ( - + {transaction.context.service.name} ), diff --git a/x-pack/plugins/apm/public/components/shared/Links/KibanaLink.tsx b/x-pack/plugins/apm/public/components/shared/Links/KibanaLink.tsx index a4b3baa8216df..51cd1a98061cf 100644 --- a/x-pack/plugins/apm/public/components/shared/Links/KibanaLink.tsx +++ b/x-pack/plugins/apm/public/components/shared/Links/KibanaLink.tsx @@ -26,7 +26,7 @@ export function UnconnectedKibanaLink({ location, pathname, hash, - query = {}, + query, ...props }: Props) { const href = getKibanaHref({ diff --git a/x-pack/plugins/apm/public/components/shared/Links/url_helpers.ts b/x-pack/plugins/apm/public/components/shared/Links/url_helpers.ts index cfd0cc41f9166..504e4d1265fbd 100644 --- a/x-pack/plugins/apm/public/components/shared/Links/url_helpers.ts +++ b/x-pack/plugins/apm/public/components/shared/Links/url_helpers.ts @@ -76,16 +76,16 @@ function getQueryWithRisonParams(location: Location, query: RisonDecoded = {}) { export interface KibanaHrefArgs { location: Location; - pathname: string; + pathname?: string; hash?: string; query?: QueryParamsDecoded; } export function getKibanaHref({ location, - pathname, + pathname = '', hash, - query + query = {} }: KibanaHrefArgs): string { const queryWithRisonParams = getQueryWithRisonParams(location, query); const search = stringifyWithoutEncoding(queryWithRisonParams); diff --git a/x-pack/plugins/apm/public/components/shared/TransactionLink.tsx b/x-pack/plugins/apm/public/components/shared/TransactionLink.tsx index 41c5914320cbf..5cdf46fa9f692 100644 --- a/x-pack/plugins/apm/public/components/shared/TransactionLink.tsx +++ b/x-pack/plugins/apm/public/components/shared/TransactionLink.tsx @@ -51,9 +51,5 @@ export const TransactionLink: React.SFC = ({ return {children}; } - return ( - - {children} - - ); + return {children}; };