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

This commit is contained in:
Pouzor
2026-03-08 11:26:42 +01:00
parent a63e248427
commit 0034100286
4 changed files with 5 additions and 2 deletions
@@ -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>>) {
+1 -1
View File
@@ -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)
})
+2 -1
View File
@@ -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',
}
+1
View File
@@ -6,4 +6,5 @@ export const EDGE_DEFAULT_COLORS: Record<EdgeType, string> = {
iot: '#e3b341',
vlan: '#00d4ff',
virtual: '#8b949e',
cluster: '#ff6e00',
}