Skip to content

Use HTMX to render device status/config/LLDP views #8152

@jeremystretch

Description

@jeremystretch

Proposed Changes

There are three subviews available under the device view which employ NAPALM to poll a live device:

  • Status
  • LLDP neighbors
  • Configuration

These views leverage the /napalm/ endpoint under the REST API endpoint for devices to fetch this live data. Javascript handles the application of the received data to the DOM for presentation to the user.

This issue proposes two major changes:

  • Relocate the NAPALM logic outside of the REST API view
  • Update the UI views to call NAPALM directly, rather than employing REST API calls from the client

Justification

Processing the returned NAPALM data within the UI view affords us considerably more flexibility over what to do with the data, and greatly simplifies client side requirements. By moving this logic under the UI view, we obviate the need for the three standalone Javascript modules (status.js, lldp.js, and config.js) that exist today.

Additionally, relocating the NAPALM connection logic outside of the REST API view should make for cleaner code, however that isn't dependent on this overall change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs milestoneAwaiting prioritization for inclusion with a future NetBox releasetype: featureIntroduction of new functionality to the application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions