[PR #11952] [MERGED] Closes #10054: Implement advanced UI controls for object selection #13874

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/11952
Author: @jeremystretch
Created: 3/10/2023
Status: Merged
Merged: 3/13/2023
Merged by: @jeremystretch

Base: featureHead: 10054-ui-object-selectors


📝 Commits (10+)

  • 9336670 WIP
  • 48cb203 WIP
  • f83352f WIP
  • 967df9d Make object selector functional
  • 15ed9b7 Replace extraneous form fields with selector widgets
  • e04c62a Merge branch 'feature' into 10054-ui-object-selectors
  • ce1ef8a Avoid overlap with filterset field names
  • cf014db Show checkmarks next to visibile filters
  • ae21067 Update results automatically when searching
  • 44079ef Include selector for device/VM component parent fields

📊 Changes

24 files changed (+276 additions, -601 deletions)

View changed files

📝 netbox/circuits/forms/model_forms.py (+6 -34)
📝 netbox/dcim/forms/model_forms.py (+42 -296)
📝 netbox/ipam/forms/model_forms.py (+19 -154)
📝 netbox/netbox/urls.py (+4 -1)
netbox/netbox/views/htmx.py (+56 -0)
📝 netbox/project-static/dist/netbox.js (+9 -9)
📝 netbox/project-static/dist/netbox.js.map (+2 -2)
📝 netbox/project-static/src/htmx.ts (+2 -1)
netbox/project-static/src/objectSelector.ts (+32 -0)
📝 netbox/templates/circuits/circuittermination_edit.html (+0 -3)
📝 netbox/templates/dcim/device_edit.html (+0 -4)
📝 netbox/templates/dcim/rack_edit.html (+0 -2)
📝 netbox/templates/generic/object_edit.html (+4 -0)
netbox/templates/htmx/object_selector.html (+32 -0)
netbox/templates/htmx/object_selector_results.html (+13 -0)
📝 netbox/templates/inc/htmx_modal.html (+1 -1)
📝 netbox/templates/ipam/ipaddress_edit.html (+0 -5)
📝 netbox/templates/ipam/l2vpntermination_edit.html (+0 -3)
📝 netbox/templates/ipam/vlan_edit.html (+0 -3)
📝 netbox/utilities/forms/fields/dynamic.py (+21 -3)

...and 4 more files

📄 Description

Fixes: #10054

  • Introduce the ObjectSelectorView HTMX view & supporting TypeScript
  • Add the selector keyword argument on DynamicModelChoiceField
  • Enable the advanced selector on relevant model form fields
  • Remove all form fields that exist solely to assist in filtering objects

🔄 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/11952 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/10/2023 **Status:** ✅ Merged **Merged:** 3/13/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `10054-ui-object-selectors` --- ### 📝 Commits (10+) - [`9336670`](https://github.com/netbox-community/netbox/commit/9336670fec5faedeb0b80818a520d591205924b2) WIP - [`48cb203`](https://github.com/netbox-community/netbox/commit/48cb2036e96a4f3eecec7fa90275dc3331fb8512) WIP - [`f83352f`](https://github.com/netbox-community/netbox/commit/f83352f2c51d627d1d134d5e51ab4ddb176c5d8b) WIP - [`967df9d`](https://github.com/netbox-community/netbox/commit/967df9d9b1c5e1015450d09f0c4aaecad8f80bb9) Make object selector functional - [`15ed9b7`](https://github.com/netbox-community/netbox/commit/15ed9b7492f6ea70b16fa322e4b24f4f3744ca97) Replace extraneous form fields with selector widgets - [`e04c62a`](https://github.com/netbox-community/netbox/commit/e04c62ada3cabddf4e52d9afbaf57b5e95708b1f) Merge branch 'feature' into 10054-ui-object-selectors - [`ce1ef8a`](https://github.com/netbox-community/netbox/commit/ce1ef8aa7066092d0cc9e62e088474f8ce338ab0) Avoid overlap with filterset field names - [`cf014db`](https://github.com/netbox-community/netbox/commit/cf014db67ed66aab7670e194d6db78495bc8c4f6) Show checkmarks next to visibile filters - [`ae21067`](https://github.com/netbox-community/netbox/commit/ae210672fbf22165f9aca6c0d3005c4aaf23d507) Update results automatically when searching - [`44079ef`](https://github.com/netbox-community/netbox/commit/44079efd1925e8b1c94e14cff9169ae91e3d8ba5) Include selector for device/VM component parent fields ### 📊 Changes **24 files changed** (+276 additions, -601 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/forms/model_forms.py` (+6 -34) 📝 `netbox/dcim/forms/model_forms.py` (+42 -296) 📝 `netbox/ipam/forms/model_forms.py` (+19 -154) 📝 `netbox/netbox/urls.py` (+4 -1) ➕ `netbox/netbox/views/htmx.py` (+56 -0) 📝 `netbox/project-static/dist/netbox.js` (+9 -9) 📝 `netbox/project-static/dist/netbox.js.map` (+2 -2) 📝 `netbox/project-static/src/htmx.ts` (+2 -1) ➕ `netbox/project-static/src/objectSelector.ts` (+32 -0) 📝 `netbox/templates/circuits/circuittermination_edit.html` (+0 -3) 📝 `netbox/templates/dcim/device_edit.html` (+0 -4) 📝 `netbox/templates/dcim/rack_edit.html` (+0 -2) 📝 `netbox/templates/generic/object_edit.html` (+4 -0) ➕ `netbox/templates/htmx/object_selector.html` (+32 -0) ➕ `netbox/templates/htmx/object_selector_results.html` (+13 -0) 📝 `netbox/templates/inc/htmx_modal.html` (+1 -1) 📝 `netbox/templates/ipam/ipaddress_edit.html` (+0 -5) 📝 `netbox/templates/ipam/l2vpntermination_edit.html` (+0 -3) 📝 `netbox/templates/ipam/vlan_edit.html` (+0 -3) 📝 `netbox/utilities/forms/fields/dynamic.py` (+21 -3) _...and 4 more files_ </details> ### 📄 Description ### Fixes: #10054 - Introduce the `ObjectSelectorView` HTMX view & supporting TypeScript - Add the `selector` keyword argument on DynamicModelChoiceField - Enable the advanced selector on relevant model form fields - Remove all form fields that exist solely to assist in filtering objects --- <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:21:17 +01:00
adam closed this issue 2025-12-29 23:21:17 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13874