Skip to content

Self-hosted homelab infrastructure visualizer — interactive network diagram with live status monitoring

fix: show all explicit edges including proxmox-to-child links

Pouzor409e6fd6b911
diff --git a/frontend/src/components/canvas/CanvasContainer.tsx b/frontend/src/components/canvas/CanvasContainer.tsx
index d8c877b..2a4114e 100644
--- a/frontend/src/components/canvas/CanvasContainer.tsx
+++ b/frontend/src/components/canvas/CanvasContainer.tsx
@@ -1,4 +1,4 @@
-import { useCallback, useMemo } from 'react'
+import { useCallback } from 'react'
import {
ReactFlow,
Background,
@@ -39,28 +39,12 @@ export function CanvasContainer({ onConnect: onConnectProp, onEdgeDoubleClick }:
onEdgeDoubleClick?.(edge)
}, [onEdgeDoubleClick])
- // Hide edges between a container-mode proxmox and its direct children
- const visibleEdges = useMemo(() => {
- const containerIds = new Set(
- nodes
- .filter((n) => n.type === 'proxmox' && n.data.container_mode !== false)
- .map((n) => n.id)
- )
- const childParentMap = new Map(
- nodes.filter((n) => n.data.parent_id).map((n) => [n.id, n.data.parent_id as string])
- )
- return (edges as Edge<EdgeData>[]).filter((e) => {
- if (containerIds.has(e.source) && childParentMap.get(e.target) === e.source) return false
- if (containerIds.has(e.target) && childParentMap.get(e.source) === e.target) return false
- return true
- })
- }, [nodes, edges])
return (
<div className="w-full h-full">
<ReactFlow
nodes={nodes}
- edges={visibleEdges}
+ edges={edges}
onNodesChange={onNodesChange}
onEdgesChange={onEdgesChange}
onConnect={onConnectProp}