Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display references unless it's a single CHILD_OF #672

Merged
merged 3 commits into from
Dec 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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