From ca0454c86bc5c8048f91d9e1c97bffd9890d241d Mon Sep 17 00:00:00 2001 From: Ruben Vargas Palma Date: Sat, 23 Feb 2019 04:34:40 -0500 Subject: [PATCH] Hide child status icon on SpanTreeOffset used in SpanDetailRow component (#334) * Hide child status icon on SpanTreeOffset used in SpanDetailRow component Signed-off-by: Ruben Vargas * Small tweak to flow type Signed-off-by: Joe Farro * Rename showChildrenStatus attribute from SpanTreeOffset to showChildrenIcon Signed-off-by: Ruben Vargas --- .../TracePage/TraceTimelineViewer/SpanDetailRow.js | 2 +- .../TracePage/TraceTimelineViewer/SpanDetailRow.test.js | 2 +- .../TracePage/TraceTimelineViewer/SpanTreeOffset.js | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.js b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.js index 2c1e6583aa..3ac9f115d0 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.js +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.js @@ -65,7 +65,7 @@ export default class SpanDetailRow extends React.PureComponent - + ', () => { }); it('renders the span tree offset', () => { - const spanTreeOffset = ; + const spanTreeOffset = ; expect(wrapper.contains(spanTreeOffset)).toBe(true); }); diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js index 133c08b4a7..9bd0971886 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js @@ -37,6 +37,7 @@ type SpanTreeOffsetPropsType = { onClick: ?() => void, removeHoverIndentGuideId: string => void, span: Span, + showChildrenIcon: boolean, }; export class UnconnectedSpanTreeOffset extends React.PureComponent { @@ -46,6 +47,7 @@ export class UnconnectedSpanTreeOffset extends React.PureComponent : ); + const icon = + showChildrenIcon && hasChildren && (childrenVisible ? : ); return ( {this.ancestorIds.map(ancestorId => (