Skip to content

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

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

Closed
jeremystretch opened this issue Dec 22, 2021 · 2 comments
Closed

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

jeremystretch opened this issue Dec 22, 2021 · 2 comments
Labels
needs milestone Awaiting prioritization for inclusion with a future NetBox release type: feature Introduction of new functionality to the application

Comments

@jeremystretch
Copy link
Member

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.

@jeremystretch jeremystretch added type: housekeeping Changes to the application which do not directly impact the end user status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 22, 2021
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application and removed type: housekeeping Changes to the application which do not directly impact the end user status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jan 14, 2022
@github-actions
Copy link
Contributor

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 github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Mar 16, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation pending closure Requires immediate attention to avoid being closed for inactivity labels Apr 6, 2022
@jeremystretch jeremystretch self-assigned this Apr 6, 2022
@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: accepted This issue has been accepted for implementation labels May 12, 2022
@jeremystretch jeremystretch removed their assignment May 12, 2022
@jeremystretch
Copy link
Member Author

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

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs milestone Awaiting prioritization for inclusion with a future NetBox release type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant