[PR #10448] [MERGED] 9654 device weight #13631

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10448
Author: @arthanson
Created: 9/23/2022
Status: Merged
Merged: 9/30/2022
Merged by: @jeremystretch

Base: featureHead: 9654-device-weight


📝 Commits (10+)

  • 81f0992 9654 add weight fields to devices
  • f55cd63 9654 add weight fields to devices
  • 36ed75d 9654 add weight fields to devices
  • 15ad2ab 9654 add weight fields to devices
  • e21f485 9654 add weight fields to devices
  • d0bed83 9654 add weight fields to devices
  • 4f75d1e 9654 add weight fields to devices
  • 9675ea6 9654 add weight fields to devices
  • bb16c98 9654 add weight fields to devices
  • 6b55d88 9654 add weight fields to devices

📊 Changes

24 files changed (+397 additions, -57 deletions)

View changed files

📝 docs/models/dcim/devicetype.md (+4 -0)
📝 docs/models/dcim/moduletype.md (+4 -0)
📝 docs/models/dcim/rack.md (+4 -0)
📝 netbox/dcim/api/serializers.py (+10 -6)
📝 netbox/dcim/choices.py (+18 -0)
📝 netbox/dcim/filtersets.py (+3 -3)
📝 netbox/dcim/forms/bulk_edit.py (+38 -16)
📝 netbox/dcim/forms/filtersets.py (+24 -0)
📝 netbox/dcim/forms/models.py (+12 -5)
📝 netbox/dcim/graphql/types.py (+9 -0)
netbox/dcim/migrations/0163_rack_devicetype_moduletype_weights.py (+58 -0)
📝 netbox/dcim/models/devices.py (+19 -5)
netbox/dcim/models/mixins.py (+45 -0)
📝 netbox/dcim/models/racks.py (+21 -3)
📝 netbox/dcim/tables/devicetypes.py (+6 -2)
📝 netbox/dcim/tables/modules.py (+6 -1)
📝 netbox/dcim/tables/racks.py (+8 -3)
📝 netbox/dcim/tables/template_code.py (+5 -0)
📝 netbox/dcim/tests/test_filtersets.py (+33 -9)
📝 netbox/templates/dcim/devicetype.html (+10 -0)

...and 4 more files

📄 Description

Fixes: #9654

Adds device weight to DeviceType, ModuleType and Rack. Adds edit fields on edit forms, shows total weight on rack detail.

Monosnap Add a new device type | NetBox 2022-09-23 10-47-46
Monosnap Rack R201 | NetBox 2022-09-23 10-47-20


🔄 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/10448 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 9/23/2022 **Status:** ✅ Merged **Merged:** 9/30/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `9654-device-weight` --- ### 📝 Commits (10+) - [`81f0992`](https://github.com/netbox-community/netbox/commit/81f0992acec72b90e3940546744c2afa894de4f9) 9654 add weight fields to devices - [`f55cd63`](https://github.com/netbox-community/netbox/commit/f55cd6388ada7ec07004c4ded0fba3b6e478ac01) 9654 add weight fields to devices - [`36ed75d`](https://github.com/netbox-community/netbox/commit/36ed75d51f38472c20444389c03f26edaf3d3e8c) 9654 add weight fields to devices - [`15ad2ab`](https://github.com/netbox-community/netbox/commit/15ad2ab8d22d94c03fab2a0a4de7b42e97050f7e) 9654 add weight fields to devices - [`e21f485`](https://github.com/netbox-community/netbox/commit/e21f4854b87b25aa24c374afc496b465e74f34e0) 9654 add weight fields to devices - [`d0bed83`](https://github.com/netbox-community/netbox/commit/d0bed830d78ed17a366ef098391ecfc8356c32d7) 9654 add weight fields to devices - [`4f75d1e`](https://github.com/netbox-community/netbox/commit/4f75d1e605fe07f3d6e8d7db82aba4a2f8d4c204) 9654 add weight fields to devices - [`9675ea6`](https://github.com/netbox-community/netbox/commit/9675ea616ea00df1cb3063bcabf8c3448b1cb1af) 9654 add weight fields to devices - [`bb16c98`](https://github.com/netbox-community/netbox/commit/bb16c989ac62d0bc98e1593f5ebbce0b9c1ed6b3) 9654 add weight fields to devices - [`6b55d88`](https://github.com/netbox-community/netbox/commit/6b55d887910424e28750bafaa07393587f88a406) 9654 add weight fields to devices ### 📊 Changes **24 files changed** (+397 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `docs/models/dcim/devicetype.md` (+4 -0) 📝 `docs/models/dcim/moduletype.md` (+4 -0) 📝 `docs/models/dcim/rack.md` (+4 -0) 📝 `netbox/dcim/api/serializers.py` (+10 -6) 📝 `netbox/dcim/choices.py` (+18 -0) 📝 `netbox/dcim/filtersets.py` (+3 -3) 📝 `netbox/dcim/forms/bulk_edit.py` (+38 -16) 📝 `netbox/dcim/forms/filtersets.py` (+24 -0) 📝 `netbox/dcim/forms/models.py` (+12 -5) 📝 `netbox/dcim/graphql/types.py` (+9 -0) ➕ `netbox/dcim/migrations/0163_rack_devicetype_moduletype_weights.py` (+58 -0) 📝 `netbox/dcim/models/devices.py` (+19 -5) ➕ `netbox/dcim/models/mixins.py` (+45 -0) 📝 `netbox/dcim/models/racks.py` (+21 -3) 📝 `netbox/dcim/tables/devicetypes.py` (+6 -2) 📝 `netbox/dcim/tables/modules.py` (+6 -1) 📝 `netbox/dcim/tables/racks.py` (+8 -3) 📝 `netbox/dcim/tables/template_code.py` (+5 -0) 📝 `netbox/dcim/tests/test_filtersets.py` (+33 -9) 📝 `netbox/templates/dcim/devicetype.html` (+10 -0) _...and 4 more files_ </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WE BE CLOSED AUTOMATICALLY. Specify your assigned issue number on the line below. --> ### Fixes: #9654 <!-- Please include a summary of the proposed changes below. --> Adds device weight to DeviceType, ModuleType and Rack. Adds edit fields on edit forms, shows total weight on rack detail. ![Monosnap Add a new device type | NetBox 2022-09-23 10-47-46](https://user-images.githubusercontent.com/99642/192027081-22df967e-a56d-47de-aae1-72cbd02b4fa0.png) ![Monosnap Rack R201 | NetBox 2022-09-23 10-47-20](https://user-images.githubusercontent.com/99642/192027086-56a9bb6f-1985-4c17-953f-58e78c510fd9.png) --- <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:19:58 +01:00
adam closed this issue 2025-12-29 23:19:58 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13631