-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.0.2
Python version
3.8
Steps to Reproduce
Expected Behavior
First row is given "danger" class because configured interface name doesn't match LLDP interface name.
Observed Behavior
First row gets "success" class despite interface names don't match.
I see two issues here:
- When interface has label configured column "Configured Interface" has format "name (label)" which never matches interface name from LLDP. Shouldn' t label part be removed before comparing to LLDP data ?
- Interface comparison in line 54 never takes effect because of comparison in line 57. Effectively, "danger" class is used only if device names don't match. I'm not sure if it intended behavior. If so, what is interface comparison in line 54 for ?
.netbox/netbox/project-static/src/device/lldp.ts
Lines 50 to 61 in 27c0e6d
if (!isTruthy(cDevice) && isTruthy(nDevice)) { row.classList.add('info'); } else if ( (cDevice === nDevice || cChassis === nDevice) && cInterfaceShort === nInterface ) { row.classList.add('success'); } else if (cDevice === nDevice || cChassis === nDevice) { row.classList.add('success'); } else { row.classList.add('danger'); }
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
