Skip to content

Commit

Permalink
Merge pull request #315 from kubeshop/mm/fix/tracemainscrollbar
Browse files Browse the repository at this point in the history
fix: remove trace main scrollbar
  • Loading branch information
mortada-codes authored Apr 22, 2022
2 parents f4f7381 + 093b442 commit 6fd8647
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions web/src/components/Trace/Trace.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {useCallback, useEffect, useMemo, useState} from 'react';
import styled from 'styled-components';
import {useNavigate} from 'react-router-dom';

import {useStoreActions} from 'react-flow-renderer';
import {ReflexContainer, ReflexSplitter, ReflexElement} from 'react-reflex';
Expand Down Expand Up @@ -33,6 +32,7 @@ import TestResults from './TestResults';

const Grid = styled.div`
display: grid;
height: calc(100vh - 200px);
`;

export type TSpanInfo = {
Expand All @@ -51,7 +51,6 @@ type TraceProps = {
};

const Trace: React.FC<TraceProps> = ({testId, testResultId, onDismissTrace, onRunTest}) => {
const navigate = useNavigate();
const [selectedSpan, setSelectedSpan] = useState<TSpanInfo | undefined>();
const [traceResultList, setTraceResultList] = useState<AssertionResult[]>([]);
const [isFirstLoad, setIsFirstLoad] = useState(true);
Expand Down Expand Up @@ -165,7 +164,12 @@ const Trace: React.FC<TraceProps> = ({testId, testResultId, onDismissTrace, onRu
<ReflexContainer orientation="vertical">
<ReflexElement flex={0.5} className="left-pane">
<div className="pane-content">
<TraceDiagram spanMap={spanMap} onSelectSpan={handleOnSpanSelected} selectedSpan={selectedSpan} trace={testResultDetails?.trace!} />
<TraceDiagram
spanMap={spanMap}
onSelectSpan={handleOnSpanSelected}
selectedSpan={selectedSpan}
trace={testResultDetails?.trace!}
/>
</div>
</ReflexElement>
<ReflexElement flex={0.5} className="right-pane">
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/TraceDiagram/TraceDiagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const TraceDiagram = ({spanMap, trace, selectedSpan, onSelectSpan}: IPropsTraceD
}, [dagLayout, spanMap, trace, selectedSpan?.id]);

return (
<S.Container style={{height: Math.max(dagLayout?.layout?.height || 0, 700) + 100}}>
<S.Container style={{height: Math.max(dagLayout?.layout?.height || 0, 900) + 100}}>
<ReactFlow
nodeTypes={{TraceNode}}
defaultZoom={0.5}
Expand Down

0 comments on commit 6fd8647

Please sign in to comment.