How It Works¶
For each Device Type you create a DeviceView object (at Plugins → Device Views → Add) with either a YAML layout or a legacy CSS layout.
When you visit a device of that type, the plugin:
- Looks up the DeviceView for the device's type
- Collects all interfaces, front ports, rear ports, and console ports from the device
- Derives a
stylenamefor each port (see below) - Renders the layout using the configured render mode (CSS Grid or SVG)
- Applies port status colours based on connection state
Port / Interface name → stylename¶
Each interface and port is mapped to a stylename used as the CSS grid-area name (and SVG data-stylename attribute). The derivation rules are:
| Interface name | Stylename |
|---|---|
GigabitEthernet0/0/1 |
gigabitethernet0-1 |
TenGigabitEthernet1/1/4 |
tengigabitethernet1-4 |
GigabitEthernet0/1 |
gigabitethernet-1 |
Management0 |
management-0 |
eth0 |
eth-0 |
1 (numeric only) |
p1 |
Rules:
- Names are lowercased
- For the 3-part Cisco format
Type{dev}/{module}/{port}, stylename istype{module}-{port} - For the 2-part format
Type{dev}/{port}, stylename istype-{port} - All other names: non-alphanumeric/dot characters replaced with
- - Purely numeric stylenames are prefixed with
p - Virtual and LAG interfaces are skipped
Render modes¶
A DeviceView has a Render Mode field:
| Mode | Description |
|---|---|
css (default) |
CSS Grid renderer — works with both YAML and legacy CSS layouts |
svg |
SVG renderer — requires a YAML layout; produces a scalable <svg> element |
See SVG Renderer for full details on SVG mode.