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

Closed
opened 2025-12-29 19:33:12 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (Dec 22, 2021).

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.

Originally created by @jeremystretch on GitHub (Dec 22, 2021). ### 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.
adam added the type: featureneeds milestone labels 2025-12-29 19:33:12 +01:00
adam closed this issue 2025-12-29 19:33:12 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 16, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Mar 16, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Sep 30, 2022):

Closing this out, to be revisited once NetBox's NAPALM proxy functionality has been moved to a plugin per #10520.

@jeremystretch commented on GitHub (Sep 30, 2022): Closing this out, to be revisited once NetBox's NAPALM proxy functionality has been moved to a plugin per #10520.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5824