forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] fixes elastic#20145 by displaying span.context.http.url in the …
…span details flyout (elastic#26238)
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...pp/TransactionDetails/Transaction/WaterfallContainer/Waterfall/SpanFlyout/HttpContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { Fragment } from 'react'; | ||
import styled from 'styled-components'; | ||
import { | ||
borderRadius, | ||
colors, | ||
fontFamilyCode, | ||
px, | ||
unit, | ||
units | ||
} from '../../../../../../../style/variables'; | ||
|
||
import { EuiTitle } from '@elastic/eui'; | ||
import { HttpContext } from '../../../../../../../../typings/Span'; | ||
|
||
const DatabaseStatement = styled.div` | ||
margin-top: ${px(unit)}; | ||
padding: ${px(units.half)} ${px(unit)}; | ||
background: ${colors.gray5}; | ||
border-radius: ${borderRadius}; | ||
border: 1px solid ${colors.gray4}; | ||
font-family: ${fontFamilyCode}; | ||
`; | ||
|
||
interface Props { | ||
httpContext?: HttpContext; | ||
} | ||
|
||
export function HttpContext({ httpContext }: Props) { | ||
if (!httpContext || !httpContext.url) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Fragment> | ||
<EuiTitle size="xs"> | ||
<h3>HTTP URL</h3> | ||
</EuiTitle> | ||
<DatabaseStatement>{httpContext.url}</DatabaseStatement> | ||
</Fragment> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters