@industry-theme/principal-view-panels 0.11.38 → 0.11.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraceExpansion.d.ts","sourceRoot":"","sources":["../../src/components/TraceExpansion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzG,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAsBD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"TraceExpansion.d.ts","sourceRoot":"","sources":["../../src/components/TraceExpansion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzG,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAsBD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8TxD,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -100362,13 +100362,47 @@ const TraceExpansion = ({
|
|
|
100362
100362
|
...span,
|
|
100363
100363
|
depth: getDepth(span.spanId)
|
|
100364
100364
|
}));
|
|
100365
|
-
|
|
100366
|
-
const
|
|
100367
|
-
|
|
100368
|
-
const
|
|
100369
|
-
const
|
|
100370
|
-
|
|
100371
|
-
|
|
100365
|
+
const buildHierarchicalOrder = (spans2) => {
|
|
100366
|
+
const result = [];
|
|
100367
|
+
const spanById = new Map(spans2.map((s2) => [s2.spanId, s2]));
|
|
100368
|
+
const childrenOf = /* @__PURE__ */ new Map();
|
|
100369
|
+
for (const span of spans2) {
|
|
100370
|
+
const parentId = span.parentSpanId;
|
|
100371
|
+
if (!childrenOf.has(parentId)) {
|
|
100372
|
+
childrenOf.set(parentId, []);
|
|
100373
|
+
}
|
|
100374
|
+
childrenOf.get(parentId).push(span);
|
|
100375
|
+
}
|
|
100376
|
+
for (const children2 of childrenOf.values()) {
|
|
100377
|
+
children2.sort((a, b) => {
|
|
100378
|
+
const timeDiff = a.timestamp - b.timestamp;
|
|
100379
|
+
if (timeDiff !== 0) return timeDiff;
|
|
100380
|
+
const indexA = spanIndexMap.get(a.spanId) ?? Infinity;
|
|
100381
|
+
const indexB = spanIndexMap.get(b.spanId) ?? Infinity;
|
|
100382
|
+
return indexA - indexB;
|
|
100383
|
+
});
|
|
100384
|
+
}
|
|
100385
|
+
const addSpanAndChildren = (span) => {
|
|
100386
|
+
result.push(span);
|
|
100387
|
+
const children2 = childrenOf.get(span.spanId) || [];
|
|
100388
|
+
for (const child of children2) {
|
|
100389
|
+
addSpanAndChildren(child);
|
|
100390
|
+
}
|
|
100391
|
+
};
|
|
100392
|
+
const rootSpans = spans2.filter((s2) => !s2.parentSpanId || !spanById.has(s2.parentSpanId));
|
|
100393
|
+
rootSpans.sort((a, b) => {
|
|
100394
|
+
const timeDiff = a.timestamp - b.timestamp;
|
|
100395
|
+
if (timeDiff !== 0) return timeDiff;
|
|
100396
|
+
const indexA = spanIndexMap.get(a.spanId) ?? Infinity;
|
|
100397
|
+
const indexB = spanIndexMap.get(b.spanId) ?? Infinity;
|
|
100398
|
+
return indexA - indexB;
|
|
100399
|
+
});
|
|
100400
|
+
for (const root2 of rootSpans) {
|
|
100401
|
+
addSpanAndChildren(root2);
|
|
100402
|
+
}
|
|
100403
|
+
return result;
|
|
100404
|
+
};
|
|
100405
|
+
return buildHierarchicalOrder(spansWithDepth);
|
|
100372
100406
|
}, [trace.scenarioMatches, trace.storyboardMatches, trace.unmatchedSpans, spanIndexMap]);
|
|
100373
100407
|
const hasAnyMatches = sortedSpans.length > 0;
|
|
100374
100408
|
return /* @__PURE__ */ jsxs(
|