Skip to content

Commit 077879a

Browse files
[APM] Fix trace sample double pagination summary (#57558)
* [APM] Remove PaginationContainer Removing the old pagination from the trace summary title. * [APM] Removing PaginationContainer component ref * [APM] Change the vertical alignment to center * [APM] Leaving the EuiPagination component in place Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 0101c63 commit 077879a

File tree

1 file changed

+7
-27
lines changed
  • x-pack/legacy/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary

1 file changed

+7
-27
lines changed

x-pack/legacy/plugins/apm/public/components/app/TransactionDetails/WaterfallWithSummmary/index.tsx

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ import {
1616
import { i18n } from '@kbn/i18n';
1717
import { Location } from 'history';
1818
import React, { useEffect, useState } from 'react';
19-
import styled from 'styled-components';
2019
import { IBucket } from '../../../../../server/lib/transactions/distribution/get_buckets/transform';
2120
import { IUrlParams } from '../../../../context/UrlParamsContext/types';
22-
import { px, units } from '../../../../style/variables';
2321
import { history } from '../../../../utils/history';
2422
import { fromQuery, toQuery } from '../../../shared/Links/url_helpers';
2523
import { LoadingStatePrompt } from '../../../shared/LoadingStatePrompt';
@@ -29,20 +27,6 @@ import { MaybeViewTraceLink } from './MaybeViewTraceLink';
2927
import { TransactionTabs } from './TransactionTabs';
3028
import { IWaterfall } from './WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers';
3129

32-
const PaginationContainer = styled.div`
33-
margin-left: ${px(units.quarter)};
34-
display: flex;
35-
align-items: center;
36-
37-
> span:first-of-type {
38-
font-weight: 600;
39-
}
40-
41-
> span:last-of-type {
42-
margin-right: ${px(units.half)};
43-
}
44-
`;
45-
4630
interface Props {
4731
urlParams: IUrlParams;
4832
location: Location;
@@ -102,7 +86,7 @@ export const WaterfallWithSummmary: React.FC<Props> = ({
10286
return (
10387
<EuiPanel paddingSize="m">
10488
<EuiFlexGroup>
105-
<EuiFlexItem style={{ flexDirection: 'row', alignItems: 'baseLine' }}>
89+
<EuiFlexItem style={{ flexDirection: 'row', alignItems: 'center' }}>
10690
<EuiTitle size="xs">
10791
<h5>
10892
{i18n.translate('xpack.apm.transactionDetails.traceSampleTitle', {
@@ -111,16 +95,12 @@ export const WaterfallWithSummmary: React.FC<Props> = ({
11195
</h5>
11296
</EuiTitle>
11397
{traceSamples && (
114-
<PaginationContainer>
115-
<span>{sampleActivePage + 1}</span>
116-
<span>/{traceSamples.length}</span>
117-
<EuiPagination
118-
pageCount={traceSamples.length}
119-
activePage={sampleActivePage}
120-
onPageClick={goToSample}
121-
compressed
122-
/>
123-
</PaginationContainer>
98+
<EuiPagination
99+
pageCount={traceSamples.length}
100+
activePage={sampleActivePage}
101+
onPageClick={goToSample}
102+
compressed
103+
/>
124104
)}
125105
</EuiFlexItem>
126106
<EuiFlexItem>

0 commit comments

Comments
 (0)