Skip to content

feat: port type categorization (network/power/console) #276

@ggfevans

Description

@ggfevans

Parent Epic

Part of #71 (Network Interface Visualization and Connectivity)

Summary

Categorize port types for distinct visualization and filtering.

Port Categories

Category Examples Visual Treatment
Network 1000base-t, sfp+, qsfp28 Circles, type-colored
Power C14, C13, NEMA Squares, orange/yellow
Console Serial, USB Triangles, gray

Implementation

type PortCategory = 'network' | 'power' | 'console';

function getPortCategory(type: string): PortCategory {
  if (type.includes('base') || type.includes('sfp') || type.includes('qsfp')) {
    return 'network';
  }
  if (type.includes('iec') || type.includes('nema') || type.includes('power')) {
    return 'power';
  }
  if (type.includes('usb') || type.includes('serial') || type.includes('de-9')) {
    return 'console';
  }
  return 'network'; // default
}

Acceptance Criteria

  • Add getPortCategory utility function
  • Categorize all InterfaceType values
  • Categorize PowerPort types
  • Categorize ConsolePort types
  • Use category for visual styling
  • Allow filtering by category

UI Features

  • Toggle visibility by category (show/hide network, power, console)
  • Legend shows category icons and colors
  • Filter in port list/search

Dependencies

References

  • NetBox port type organization

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions