|
@@ -5,6 +5,7 @@ import {Location} from 'history';
|
|
|
|
|
|
import Alert from 'app/components/alert';
|
|
|
import * as DividerHandlerManager from 'app/components/events/interfaces/spans/dividerHandlerManager';
|
|
|
+import * as ScrollbarManager from 'app/components/events/interfaces/spans/scrollbarManager';
|
|
|
import FeatureBadge from 'app/components/featureBadge';
|
|
|
import * as Layout from 'app/components/layouts/thirds';
|
|
|
import LoadingError from 'app/components/loadingError';
|
|
@@ -21,17 +22,22 @@ import Breadcrumb from 'app/views/performance/breadcrumb';
|
|
|
import {MetaData} from 'app/views/performance/transactionDetails/styles';
|
|
|
|
|
|
import {
|
|
|
+ DividerSpacer,
|
|
|
+ ScrollbarContainer,
|
|
|
SearchContainer,
|
|
|
StyledPanel,
|
|
|
StyledSearchBar,
|
|
|
TraceDetailBody,
|
|
|
TraceDetailHeader,
|
|
|
TraceViewContainer,
|
|
|
+ TraceViewHeaderContainer,
|
|
|
TransactionRowMessage,
|
|
|
+ VirtualScrollBar,
|
|
|
+ VirtualScrollBarGrip,
|
|
|
} from './styles';
|
|
|
import TransactionGroup from './transactionGroup';
|
|
|
import {TraceInfo, TreeDepth} from './types';
|
|
|
-import {getTraceInfo, isRootTransaction} from './utils';
|
|
|
+import {getTraceInfo, isRootTransaction, toPercent} from './utils';
|
|
|
|
|
|
type IndexedFusedTransaction = {
|
|
|
transaction: TraceFullDetailed;
|
|
@@ -76,6 +82,7 @@ class TraceDetailsContent extends React.Component<Props, State> {
|
|
|
};
|
|
|
|
|
|
traceViewRef = React.createRef<HTMLDivElement>();
|
|
|
+ virtualScrollbarContainerRef = React.createRef<HTMLDivElement>();
|
|
|
|
|
|
renderTraceLoading() {
|
|
|
return <LoadingIndicator />;
|
|
@@ -432,36 +439,69 @@ class TraceDetailsContent extends React.Component<Props, State> {
|
|
|
|
|
|
const traceView = (
|
|
|
<TraceDetailBody>
|
|
|
- <StyledPanel>
|
|
|
- <DividerHandlerManager.Provider interactiveLayerRef={this.traceViewRef}>
|
|
|
- <TraceViewContainer ref={this.traceViewRef}>
|
|
|
- <TransactionGroup
|
|
|
- location={location}
|
|
|
- organization={organization}
|
|
|
- traceInfo={traceInfo}
|
|
|
- transaction={{
|
|
|
- traceSlug,
|
|
|
- generation: 0,
|
|
|
- 'transaction.duration':
|
|
|
- traceInfo.endTimestamp - traceInfo.startTimestamp,
|
|
|
- children: traces,
|
|
|
- start_timestamp: traceInfo.startTimestamp,
|
|
|
- timestamp: traceInfo.endTimestamp,
|
|
|
- }}
|
|
|
- continuingDepths={[]}
|
|
|
- isOrphan={false}
|
|
|
- isLast={false}
|
|
|
- index={0}
|
|
|
- isVisible
|
|
|
- renderedChildren={transactionGroups}
|
|
|
- />
|
|
|
- {this.renderInfoMessage({
|
|
|
- isVisible: true,
|
|
|
- numberOfHiddenTransactionsAbove,
|
|
|
- })}
|
|
|
- </TraceViewContainer>
|
|
|
- </DividerHandlerManager.Provider>
|
|
|
- </StyledPanel>
|
|
|
+ <DividerHandlerManager.Provider interactiveLayerRef={this.traceViewRef}>
|
|
|
+ <DividerHandlerManager.Consumer>
|
|
|
+ {({dividerPosition}) => (
|
|
|
+ <ScrollbarManager.Provider
|
|
|
+ dividerPosition={dividerPosition}
|
|
|
+ interactiveLayerRef={this.virtualScrollbarContainerRef}
|
|
|
+ >
|
|
|
+ <StyledPanel>
|
|
|
+ <TraceViewHeaderContainer>
|
|
|
+ <ScrollbarContainer
|
|
|
+ ref={this.virtualScrollbarContainerRef}
|
|
|
+ style={{
|
|
|
+ // the width of this component is shrunk to compensate for half of the width of the divider line
|
|
|
+ width: `calc(${toPercent(dividerPosition)} - 0.5px)`,
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <ScrollbarManager.Consumer>
|
|
|
+ {({virtualScrollbarRef, onDragStart}) => {
|
|
|
+ return (
|
|
|
+ <VirtualScrollBar
|
|
|
+ data-type="virtual-scrollbar"
|
|
|
+ ref={virtualScrollbarRef}
|
|
|
+ onMouseDown={onDragStart}
|
|
|
+ >
|
|
|
+ <VirtualScrollBarGrip />
|
|
|
+ </VirtualScrollBar>
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ </ScrollbarManager.Consumer>
|
|
|
+ </ScrollbarContainer>
|
|
|
+ <DividerSpacer />
|
|
|
+ </TraceViewHeaderContainer>
|
|
|
+ <TraceViewContainer ref={this.traceViewRef}>
|
|
|
+ <TransactionGroup
|
|
|
+ location={location}
|
|
|
+ organization={organization}
|
|
|
+ traceInfo={traceInfo}
|
|
|
+ transaction={{
|
|
|
+ traceSlug,
|
|
|
+ generation: 0,
|
|
|
+ 'transaction.duration':
|
|
|
+ traceInfo.endTimestamp - traceInfo.startTimestamp,
|
|
|
+ children: traces,
|
|
|
+ start_timestamp: traceInfo.startTimestamp,
|
|
|
+ timestamp: traceInfo.endTimestamp,
|
|
|
+ }}
|
|
|
+ continuingDepths={[]}
|
|
|
+ isOrphan={false}
|
|
|
+ isLast={false}
|
|
|
+ index={0}
|
|
|
+ isVisible
|
|
|
+ renderedChildren={transactionGroups}
|
|
|
+ />
|
|
|
+ {this.renderInfoMessage({
|
|
|
+ isVisible: true,
|
|
|
+ numberOfHiddenTransactionsAbove,
|
|
|
+ })}
|
|
|
+ </TraceViewContainer>
|
|
|
+ </StyledPanel>
|
|
|
+ </ScrollbarManager.Provider>
|
|
|
+ )}
|
|
|
+ </DividerHandlerManager.Consumer>
|
|
|
+ </DividerHandlerManager.Provider>
|
|
|
</TraceDetailBody>
|
|
|
);
|
|
|
|