Self-hosted homelab infrastructure visualizer — interactive network diagram with live status monitoring
TypeScript diagramhomelabhomelab-infrastructure-observabilitynetworkproxmox-veself-hostedzigbeezwavezwave-js
feat: add printer and computer node types with icons
Pouzor3312742f4c9a
diff --git a/frontend/src/components/canvas/nodes/index.tsx b/frontend/src/components/canvas/nodes/index.tsxindex 21ef288..1543835 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,+ HardDrive, Cpu, Wifi, Circle, Cctv, Printer, Monitor,} from 'lucide-react'import { BaseNode } from './BaseNode'import type { NodeData } from '@/types'@@ -18,5 +18,7 @@ export const LxcNode = (props: N) => <BaseNode {...props} icon={Container} /export const NasNode = (props: N) => <BaseNode {...props} icon={HardDrive} />export const IotNode = (props: N) => <BaseNode {...props} icon={Cpu} />export const ApNode = (props: N) => <BaseNode {...props} icon={Wifi} />-export const CameraNode = (props: N) => <BaseNode {...props} icon={Cctv} />-export const GenericNode = (props: N) => <BaseNode {...props} icon={Circle} />+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 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 1a670e7..517c540 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, GenericNode } from './index'+import { IspNode, RouterNode, SwitchNode, ServerNode, VmNode, LxcNode, NasNode, IotNode, ApNode, CameraNode, PrinterNode, ComputerNode, GenericNode } from './index'import { ProxmoxGroupNode } from './ProxmoxGroupNode'export const nodeTypes = {@@ -13,5 +13,7 @@ export const nodeTypes = {iot: IotNode,ap: ApNode,camera: CameraNode,+ printer: PrinterNode,+ computer: ComputerNode,generic: GenericNode,}diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.tsindex 4c2cc19..b7a1d3e 100644--- a/frontend/src/types/index.ts+++ b/frontend/src/types/index.ts@@ -10,6 +10,8 @@ export type NodeType =| 'iot'| 'ap'| 'camera'+ | 'printer'+ | 'computer'| 'generic'export type EdgeType = 'ethernet' | 'wifi' | 'iot' | 'vlan' | 'virtual' | 'cluster'@@ -69,6 +71,8 @@ export const NODE_TYPE_LABELS: Record<NodeType, string> = {iot: 'IoT Device',ap: 'Access Point',camera: 'Camera',+ printer: 'Printer',+ computer: 'Computer',generic: 'Generic Device',}