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

fix: Fixes javascript error for LLDP neighbor view #5515

Merged
merged 4 commits into from Apr 2, 2024

Conversation

abates
Copy link
Contributor

@abates abates commented Apr 1, 2024

The vanilla javascript rewrite of the LLDP neighbors view introduced a bug where an LLDP neighbor with a matching row (but no configured device) will raise an exception. This commit fixes that issue.

What's Changed

The recent LLDP view changes (in #5346) introduced a javascript bug. If the LLDP information returned includes a neighbor for a matching interface, but Nautobot has no configured device for that interface, then no DOM nodes match the query selectors for data attributes. Since no nodes match, no attributes can be looked up and an exception is thrown. This fix wraps all of the attribute lookups in a function that always returns a string (empty if not found).

Screenshots

No screenshots as the UI hasn't changed.

TODO

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • Documentation Updates (when adding/changing features)
  • Example App Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

The vanilla javascript rewrite of the LLDP neighbors view introduced a bug where an LLDP neighbor with a matching row (but no configured device) will raise an exception. This commit fixes that issue.
Co-authored-by: Hanlin Miao <46973263+HanlinMiao@users.noreply.github.com>
@glennmatthews glennmatthews merged commit 46eb6b0 into nautobot:develop Apr 2, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants