Skip to content

Commit

Permalink
Remove app/apm from internal links
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Jan 11, 2019
1 parent cc1da75 commit 5023f2e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ exports[`DetailView should render StickyProperties 1`] = `
"label": "Transaction sample ID",
"val": <Connect(UnconnectedKibanaLink)
hash="/myService/transactions/myTransactionType/myTransactionName"
pathname="/app/apm"
query={
Object {
"traceId": "traceId",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ function getTransactionLink(error: APMError, transaction?: Transaction) {

return (
<KibanaLink
pathname={'/app/apm'}
hash={path}
query={{
transactionId: transaction.transaction.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
>
<a
className="euiLink euiLink--primary c0"
href="/app/apm#/opbeans-python/errors/a0ce2c8978ef92cdf2ff163ae28576ee?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/a0ce2c8978ef92cdf2ff163ae28576ee?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
>
a0ce2
</a>
Expand All @@ -513,7 +513,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
<a
aria-describedby="overlay1"
className="euiLink euiLink--primary c2"
href="/app/apm#/opbeans-python/errors/a0ce2c8978ef92cdf2ff163ae28576ee?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/a0ce2c8978ef92cdf2ff163ae28576ee?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
onMouseOut={[Function]}
onMouseOver={[Function]}
>
Expand Down Expand Up @@ -572,7 +572,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
>
<a
className="euiLink euiLink--primary c0"
href="/app/apm#/opbeans-python/errors/f3ac95493913cc7a3cfec30a19d2120a?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/f3ac95493913cc7a3cfec30a19d2120a?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
>
f3ac9
</a>
Expand All @@ -592,7 +592,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
<a
aria-describedby="overlay3"
className="euiLink euiLink--primary c2"
href="/app/apm#/opbeans-python/errors/f3ac95493913cc7a3cfec30a19d2120a?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/f3ac95493913cc7a3cfec30a19d2120a?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
onMouseOut={[Function]}
onMouseOver={[Function]}
>
Expand Down Expand Up @@ -651,7 +651,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
>
<a
className="euiLink euiLink--primary c0"
href="/app/apm#/opbeans-python/errors/e90863d04b7a692435305f09bbe8c840?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/e90863d04b7a692435305f09bbe8c840?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
>
e9086
</a>
Expand All @@ -671,7 +671,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
<a
aria-describedby="overlay5"
className="euiLink euiLink--primary c2"
href="/app/apm#/opbeans-python/errors/e90863d04b7a692435305f09bbe8c840?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/e90863d04b7a692435305f09bbe8c840?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
onMouseOut={[Function]}
onMouseOver={[Function]}
>
Expand Down Expand Up @@ -730,7 +730,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
>
<a
className="euiLink euiLink--primary c0"
href="/app/apm#/opbeans-python/errors/8673d8bf7a032e387c101bafbab0d2bc?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/8673d8bf7a032e387c101bafbab0d2bc?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
>
8673d
</a>
Expand All @@ -750,7 +750,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
<a
aria-describedby="overlay7"
className="euiLink euiLink--primary c2"
href="/app/apm#/opbeans-python/errors/8673d8bf7a032e387c101bafbab0d2bc?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
href="#/opbeans-python/errors/8673d8bf7a032e387c101bafbab0d2bc?_g=(time:(from:now-24h,mode:quick,to:now))&_a="
onMouseOut={[Function]}
onMouseOver={[Function]}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ exports[`ErrorGroupOverview -> List should render columns correctly 1`] = `
>
<Styled(Connect(UnconnectedKibanaLink))
hash="/opbeans-python/transactions"
pathname="/app/apm"
>
opbeans-python
</Styled(Connect(UnconnectedKibanaLink))>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const SERVICE_COLUMNS = [
sortable: true,
render: (serviceName: string) => (
<EuiToolTip content={formatString(serviceName)} id="service-name-tooltip">
<AppLink pathname={'/app/apm'} hash={`/${serviceName}/transactions`}>
<AppLink hash={`/${serviceName}/transactions`}>
{formatString(serviceName)}
</AppLink>
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ export function FlyoutTopLevelProperties({ transaction }: Props) {
label: 'Service',
fieldName: SERVICE_NAME,
val: (
<KibanaLink
pathname={'/app/apm'}
hash={`/${transaction.context.service.name}`}
>
<KibanaLink hash={`/${transaction.context.service.name}`}>
{transaction.context.service.name}
</KibanaLink>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function UnconnectedKibanaLink({
location,
pathname,
hash,
query = {},
query,
...props
}: Props) {
const href = getKibanaHref({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,5 @@ export const TransactionLink: React.SFC<TransactionLinkProps> = ({
return <React.Fragment>{children}</React.Fragment>;
}

return (
<KibanaLink pathname="/app/apm" {...linkProps}>
{children}
</KibanaLink>
);
return <KibanaLink {...linkProps}>{children}</KibanaLink>;
};

0 comments on commit 5023f2e

Please sign in to comment.