From 0034100286142ddfff2a78ae6e94a4f02f52d69a Mon Sep 17 00:00:00 2001 From: Pouzor Date: Sun, 8 Mar 2026 11:26:42 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20add=20cluster=20edge=20type=20=E2=80=94?= =?UTF-8?q?=20orange=20dashed,=20for=20Proxmox=20cluster=20links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/edges/index.tsx | 1 + frontend/src/types/__tests__/types.test.ts | 2 +- frontend/src/types/index.ts | 3 ++- frontend/src/utils/edgeColors.ts | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) 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 = { 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>) { 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 = { 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 = { iot: '#e3b341', vlan: '#00d4ff', virtual: '#8b949e', + cluster: '#ff6e00', }