Skip to content

Commit c031bec

Browse files
committed
reapply client id change
1 parent 5a437a7 commit c031bec

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/ott-vis-panel/src/components/TreeDisplay.tsx

+9-8
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,12 @@ function buildRoomSubtree(room: Room, region: string): TreeNode {
7777
id: room.name,
7878
region: region,
7979
group: "room",
80-
children: Array.from({ length: room.clients }, (_, index) => {
81-
return {
82-
id: `${room.name}-${index}`,
83-
region: region,
84-
group: "client",
85-
children: [],
86-
};
87-
}),
80+
children: room.clients.map(c => ({
81+
id: c.id,
82+
region: region,
83+
group: "client",
84+
children: [],
85+
})),
8886
};
8987
return roomNode;
9088
}
@@ -667,6 +665,9 @@ const TreeDisplay: React.FC<TreeDisplayProps> = ({
667665
const eventBus = useEventBus();
668666
useEffect(() => {
669667
const sub = eventBus.subscribe(event => {
668+
if (event.direction !== "rx") {
669+
return;
670+
}
670671
const node = d3.select(`[data-nodeid="${event.node_id}"]`);
671672
if (node.empty()) {
672673
return;

0 commit comments

Comments
 (0)