Self-hosted homelab infrastructure visualizer — interactive network diagram with live status monitoring
TypeScript diagramhomelabhomelab-infrastructure-observabilitynetworkproxmox-veself-hostedzigbeezwavezwave-js
feat: add CPL / Powerline node type with PlugZap icon
Pouzor220d831cf10b
diff --git a/frontend/src/components/canvas/nodes/index.tsx b/frontend/src/components/canvas/nodes/index.tsxindex 1543835..4b83423 100644--- a/frontend/src/components/canvas/nodes/index.tsx+++ b/frontend/src/components/canvas/nodes/index.tsx@@ -1,7 +1,7 @@import { type NodeProps, type Node } from '@xyflow/react'import {Globe, Router, Network, Server, Layers, Box, Container,- HardDrive, Cpu, Wifi, Circle, Cctv, Printer, Monitor,+ HardDrive, Cpu, Wifi, Circle, Cctv, Printer, Monitor, PlugZap,} from 'lucide-react'import { BaseNode } from './BaseNode'import type { NodeData } from '@/types'@@ -21,4 +21,5 @@ export const ApNode = (props: N) => <BaseNode {...props} icon={Wifi} />export const CameraNode = (props: N) => <BaseNode {...props} icon={Cctv} />export const PrinterNode = (props: N) => <BaseNode {...props} icon={Printer} />export const ComputerNode = (props: N) => <BaseNode {...props} icon={Monitor} />+export const CplNode = (props: N) => <BaseNode {...props} icon={PlugZap} />export const GenericNode = (props: N) => <BaseNode {...props} icon={Circle} />diff --git a/frontend/src/components/canvas/nodes/nodeTypes.ts b/frontend/src/components/canvas/nodes/nodeTypes.tsindex 517c540..ea757b3 100644--- a/frontend/src/components/canvas/nodes/nodeTypes.ts+++ b/frontend/src/components/canvas/nodes/nodeTypes.ts@@ -1,4 +1,4 @@-import { IspNode, RouterNode, SwitchNode, ServerNode, VmNode, LxcNode, NasNode, IotNode, ApNode, CameraNode, PrinterNode, ComputerNode, GenericNode } from './index'+import { IspNode, RouterNode, SwitchNode, ServerNode, VmNode, LxcNode, NasNode, IotNode, ApNode, CameraNode, PrinterNode, ComputerNode, CplNode, GenericNode } from './index'import { ProxmoxGroupNode } from './ProxmoxGroupNode'export const nodeTypes = {@@ -15,5 +15,6 @@ export const nodeTypes = {camera: CameraNode,printer: PrinterNode,computer: ComputerNode,+ cpl: CplNode,generic: GenericNode,}diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.tsindex b7a1d3e..1311c5b 100644--- a/frontend/src/types/index.ts+++ b/frontend/src/types/index.ts@@ -12,6 +12,7 @@ export type NodeType =| 'camera'| 'printer'| 'computer'+ | 'cpl'| 'generic'export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual' | 'cluster'@@ -73,6 +74,7 @@ export const NODE_TYPE_LABELS: Record<NodeType, string> = {camera: 'Camera',printer: 'Printer',computer: 'Computer',+ cpl: 'CPL / Powerline',generic: 'Generic Device',}diff --git a/frontend/src/utils/nodeIcons.ts b/frontend/src/utils/nodeIcons.tsindex d63058b..a22c227 100644--- a/frontend/src/utils/nodeIcons.ts+++ b/frontend/src/utils/nodeIcons.ts@@ -18,7 +18,7 @@ import {// CommunicationsMail, MessageSquare, Phone,// Misc devices- Printer, Smartphone, Search, Filter, BookOpen,+ Printer, Smartphone, Search, Filter, BookOpen, PlugZap,} from 'lucide-react'import type { LucideIcon } from 'lucide-react'@@ -45,6 +45,7 @@ export const ICON_REGISTRY: IconEntry[] = [{ key: 'monitor', label: 'Workstation', category: 'Infrastructure', icon: Monitor },{ key: 'smartphone', label: 'Phone / Mobile', category: 'Infrastructure', icon: Smartphone },{ key: 'printer', label: 'Printer', category: 'Infrastructure', icon: Printer },+ { key: 'plugzap', label: 'CPL / Powerline', category: 'Infrastructure', icon: PlugZap },// --- Media ---{ key: 'play', label: 'Jellyfin / Emby', category: 'Media', icon: Play },