Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect row colors in LLDP Neighbors tab #7300

Closed
pwlodawi opened this issue Sep 18, 2021 · 0 comments
Closed

Incorrect row colors in LLDP Neighbors tab #7300

pwlodawi opened this issue Sep 18, 2021 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@pwlodawi
Copy link

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');
    }
    .
@pwlodawi pwlodawi added the type: bug A confirmed report of unexpected behavior in the application label Sep 18, 2021
@pwlodawi pwlodawi changed the title Incorrect rows numbering in LLDP Neighbors tab Incorrect row colors in LLDP Neighbors tab Sep 20, 2021
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Sep 20, 2021
@thatmattlove thatmattlove added status: revisions needed This issue requires additional information to be actionable and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 15, 2021
@thatmattlove thatmattlove self-assigned this Oct 15, 2021
@thatmattlove thatmattlove added status: accepted This issue has been accepted for implementation and removed status: revisions needed This issue requires additional information to be actionable labels Oct 15, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants