Skip to content

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

feat: add cluster edge type — orange dashed, for Proxmox cluster links

Pouzor003410028614
diff --git a/frontend/src/components/canvas/edges/index.tsx b/frontend/src/components/canvas/edges/index.tsx
index 2a934ef..f234982 100644
--- a/frontend/src/components/canvas/edges/index.tsx
+++ b/frontend/src/components/canvas/edges/index.tsx
@@ -21,6 +21,7 @@ const EDGE_STYLES: Record<EdgeType, React.CSSProperties> = {
iot: { stroke: '#e3b341', strokeWidth: 1.5, strokeDasharray: '2 4' },
vlan: { strokeWidth: 2.5 },
virtual: { stroke: '#8b949e', strokeWidth: 1, strokeDasharray: '4 4' },
+ cluster: { stroke: '#ff6e00', strokeWidth: 2.5, strokeDasharray: '8 3' },
}
export function HomelableEdge({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data, selected }: EdgeProps<Edge<EdgeData>>) {
diff --git a/frontend/src/types/__tests__/types.test.ts b/frontend/src/types/__tests__/types.test.ts
index c8685c6..094254d 100644
--- a/frontend/src/types/__tests__/types.test.ts
+++ b/frontend/src/types/__tests__/types.test.ts
@@ -28,7 +28,7 @@ describe('STATUS_COLORS', () => {
describe('EDGE_TYPE_LABELS', () => {
it('has an entry for every edge type', () => {
- const expectedTypes = ['ethernet', 'wifi', 'iot', 'vlan', 'virtual']
+ const expectedTypes = ['ethernet', 'wifi', 'iot', 'vlan', 'virtual', 'cluster']
expectedTypes.forEach((t) => {
expect(EDGE_TYPE_LABELS).toHaveProperty(t)
})
diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts
index 43d7003..f3146fd 100644
--- a/frontend/src/types/index.ts
+++ b/frontend/src/types/index.ts
@@ -11,7 +11,7 @@ export type NodeType =
| 'ap'
| 'generic'
-export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual'
+export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual' | 'cluster'
export type NodeStatus = 'online' | 'offline' | 'pending' | 'unknown'
@@ -83,4 +83,5 @@ export const EDGE_TYPE_LABELS: Record<EdgeType, string> = {
iot: 'IoT / Zigbee',
vlan: 'VLAN',
virtual: 'Virtual',
+ cluster: 'Cluster',
}
diff --git a/frontend/src/utils/edgeColors.ts b/frontend/src/utils/edgeColors.ts
index 893dcfb..e395c25 100644
--- a/frontend/src/utils/edgeColors.ts
+++ b/frontend/src/utils/edgeColors.ts
@@ -6,4 +6,5 @@ export const EDGE_DEFAULT_COLORS: Record<EdgeType, string> = {
iot: '#e3b341',
vlan: '#00d4ff',
virtual: '#8b949e',
+ cluster: '#ff6e00',
}