mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-06 10:05:05 +00:00
update
This commit is contained in:
parent
176a7fd769
commit
f74074d737
@ -238,25 +238,26 @@ limitations under the License. -->
|
|||||||
fixSpansSize.value = fixSpans.length;
|
fixSpansSize.value = fixSpans.length;
|
||||||
for (const id of Object.keys(segmentGroup)) {
|
for (const id of Object.keys(segmentGroup)) {
|
||||||
const currentSegment = segmentGroup[id].sort((a: Span, b: Span) => b.parentSpanId - a.parentSpanId);
|
const currentSegment = segmentGroup[id].sort((a: Span, b: Span) => b.parentSpanId - a.parentSpanId);
|
||||||
for (const s of currentSegment) {
|
for (const span of currentSegment) {
|
||||||
const index = currentSegment.findIndex((i: Span) => i.spanId === s.parentSpanId);
|
const index = currentSegment.findIndex((i: Span) => i.spanId === span.parentSpanId);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
if (
|
if (
|
||||||
(currentSegment[index].isBroken && currentSegment[index].parentSpanId === -1) ||
|
(currentSegment[index].isBroken && currentSegment[index].parentSpanId === -1) ||
|
||||||
!currentSegment[index].isBroken
|
!currentSegment[index].isBroken
|
||||||
) {
|
) {
|
||||||
currentSegment[index].children.push(s);
|
currentSegment[index].children.push(span);
|
||||||
currentSegment[index].children.sort((a: Span, b: Span) => a.spanId - b.spanId);
|
currentSegment[index].children.sort((a: Span, b: Span) => a.spanId - b.spanId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s.isBroken) {
|
if (span.isBroken) {
|
||||||
const children = props.data.filter((span: Span) =>
|
const children = props.data.filter((span: Span) =>
|
||||||
span.refs.find(
|
span.refs.find(
|
||||||
(d) => d.traceId === s.traceId && d.parentSegmentId === s.segmentId && d.parentSpanId === s.spanId,
|
(d) =>
|
||||||
|
d.traceId === span.traceId && d.parentSegmentId === span.segmentId && d.parentSpanId === span.spanId,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (children.length) {
|
if (children.length) {
|
||||||
s.children.push(...children);
|
span.children.push(...children);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user