[PR #12675] [CLOSED] Leverage HTMX to simplify rendering of Circuit Termination Form #14028

Closed
opened 2025-12-29 23:22:07 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12675
Author: @dhenschen
Created: 5/22/2023
Status: Closed

Base: developHead: 11891-leverage-htmx-for-circuit-termination-edit


📝 Commits (2)

  • dffb6fa Leverage HTMX to semplify rendering of Circuit Termination Form
  • d35acf0 Clean CircuitTerminationForm data to avoid model ValidationErrors

📊 Changes

7 files changed (+68 additions, -62 deletions)

View changed files

📝 netbox/circuits/choices.py (+10 -0)
📝 netbox/circuits/forms/model_forms.py (+34 -4)
netbox/circuits/migrations/0043_circuittermination_termination_type.py (+18 -0)
📝 netbox/circuits/models/circuits.py (+5 -0)
📝 netbox/circuits/tests/test_views.py (+1 -0)
📝 netbox/circuits/views.py (+0 -1)
netbox/templates/circuits/circuittermination_edit.html (+0 -57)

📄 Description

Draft: Summary

Associated with issue #11891

This Pull Request adds a new dropdown selection that allows uses to specify if they want a circuit terminated to a site or provider network. This changes the form submission and ensures only the site or provider network are submitted as part of the form. Previously both were submitted.

Screenshots

image

image

image

TODO

  • BUG: When selecting an option in the port speed dropdown after changing the "Termination Type" causes a new tab to be opened
  • Add Tests for edge cases (may be manual steps in PR)
  • Ensure database migration correctly selects either site or provider network for existing database entries.
  • On form clean, possibly remove any configuration of the non-specified termination type (i.e. if site type remove provider network)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/12675 **Author:** [@dhenschen](https://github.com/dhenschen) **Created:** 5/22/2023 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `11891-leverage-htmx-for-circuit-termination-edit` --- ### 📝 Commits (2) - [`dffb6fa`](https://github.com/netbox-community/netbox/commit/dffb6fa329548fba4ef4eb5e6bd931c62dfb6de1) Leverage HTMX to semplify rendering of Circuit Termination Form - [`d35acf0`](https://github.com/netbox-community/netbox/commit/d35acf0a013edc67918d8d83f164165918141246) Clean CircuitTerminationForm data to avoid model ValidationErrors ### 📊 Changes **7 files changed** (+68 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/choices.py` (+10 -0) 📝 `netbox/circuits/forms/model_forms.py` (+34 -4) ➕ `netbox/circuits/migrations/0043_circuittermination_termination_type.py` (+18 -0) 📝 `netbox/circuits/models/circuits.py` (+5 -0) 📝 `netbox/circuits/tests/test_views.py` (+1 -0) 📝 `netbox/circuits/views.py` (+0 -1) ➖ `netbox/templates/circuits/circuittermination_edit.html` (+0 -57) </details> ### 📄 Description ## Draft: Summary Associated with issue #11891 This Pull Request adds a new dropdown selection that allows uses to specify if they want a circuit terminated to a site or provider network. This changes the form submission and ensures only the site or provider network are submitted as part of the form. Previously both were submitted. ## Screenshots ![image](https://github.com/netbox-community/netbox/assets/11417982/242aa957-88eb-46fa-bc69-88092e6c57c9) ![image](https://github.com/netbox-community/netbox/assets/11417982/00a056db-708a-40f0-b230-16ca29839fc8) ![image](https://github.com/netbox-community/netbox/assets/11417982/c866b250-a6c5-487b-a3a3-26eea6a13892) ## TODO - [ ] BUG: When selecting an option in the port speed dropdown after changing the "Termination Type" causes a new tab to be opened - [ ] Add Tests for edge cases (may be manual steps in PR) - [ ] Ensure database migration correctly selects either site or provider network for existing database entries. - [x] On form clean, possibly remove any configuration of the non-specified termination type (i.e. if site type remove provider network) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:22:07 +01:00
adam closed this issue 2025-12-29 23:22:07 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14028