This commit is contained in:
Fine 2024-12-03 18:04:46 +08:00
parent 8c92c628a4
commit 844591a6f9

View File

@ -52,7 +52,7 @@ limitations under the License. -->
if (!ebpfStore.analyzeTrees.length) { if (!ebpfStore.analyzeTrees.length) {
return (stackTree.value = null); return (stackTree.value = null);
} }
const root: StackElement = { let root: StackElement = {
parentId: "0", parentId: "0",
originId: "1", originId: "1",
name: "Virtual Root", name: "Virtual Root",
@ -67,8 +67,9 @@ limitations under the License. -->
}; };
countRange(); countRange();
if (props.type === ComponentType) { if (props.type === ComponentType) {
const root = processTree(ebpfStore.analyzeTrees[0].elements); const elements = processTree(ebpfStore.analyzeTrees[0].elements);
stackTree.value = root; stackTree.value = elements;
root = { ...root, ...elements };
} else { } else {
for (const tree of ebpfStore.analyzeTrees) { for (const tree of ebpfStore.analyzeTrees) {
const ele = processTree(tree.elements); const ele = processTree(tree.elements);