Skip to content

Incorrect row colors in LLDP Neighbors tab #7300

@pwlodawi

Description

@pwlodawi

NetBox version

v3.0.2

Python version

3.8

Steps to Reproduce

  1. Configure devices/interfaces similar to shown below
  2. Open LLDP Neighbors tab
    Screenshot from 2021-09-18 13-27-56

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:

  1. 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 ?
  2. 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 ?
    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 implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions