Skip to content

Commit

Permalink
Display references unless it's a single CHILD_OF (jaegertracing#672)
Browse files Browse the repository at this point in the history
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
  • Loading branch information
yurishkuro authored Dec 25, 2020
1 parent 0de26a8 commit 0536c8a
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { Divider } from 'antd';

import AccordianKeyValues from './AccordianKeyValues';
import AccordianLogs from './AccordianLogs';
import AccordianReferences from './AccordianReferences';
import AccordianText from './AccordianText';
import DetailState from './DetailState';
import { formatDuration } from '../utils';
Expand All @@ -27,7 +28,6 @@ import { TNil } from '../../../../types';
import { KeyValuePair, Link, Log, Span } from '../../../../types/trace';

import './index.css';
import AccordianReferences from './AccordianReferences';

type SpanDetailProps = {
detailState: DetailState;
Expand Down Expand Up @@ -140,14 +140,16 @@ export default function SpanDetail(props: SpanDetailProps) {
onToggle={() => warningsToggle(spanID)}
/>
)}
{references && references.length > 1 && (
<AccordianReferences
data={references}
isOpen={isReferencesOpen}
onToggle={() => referencesToggle(spanID)}
focusSpan={focusSpan}
/>
)}
{references &&
references.length > 0 &&
(references.length > 1 || references[0].refType !== 'CHILD_OF') && (
<AccordianReferences
data={references}
isOpen={isReferencesOpen}
onToggle={() => referencesToggle(spanID)}
focusSpan={focusSpan}
/>
)}
<small className="SpanDetail--debugInfo">
<span className="SpanDetail--debugLabel" data-label="SpanID:" /> {spanID}
<CopyIcon
Expand Down

0 comments on commit 0536c8a

Please sign in to comment.