[PR #18636] [MERGED] Fixes: #18584 Add rack types column to manufacturers table #15405

Closed
opened 2025-12-30 00:21:44 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18636
Author: @renatoalmeidaoliveira
Created: 2/13/2025
Status: Merged
Merged: 2/18/2025
Merged by: @jeremystretch

Base: mainHead: 18584-rack-types-column


📝 Commits (2)

  • 88cb474 Add racktype_count annotation to list view queryset, create the LinkedCountColumn in ManufacturerTable
  • 54d0bba Add Manufacturer field to RackTypeFilterForm

📊 Changes

3 files changed (+11 additions, -5 deletions)

View changed files

📝 netbox/dcim/forms/filtersets.py (+1 -1)
📝 netbox/dcim/tables/devicetypes.py (+9 -4)
📝 netbox/dcim/views.py (+1 -0)

📄 Description

Fixes: #18584 Add rack types column to manufacturers table

  • Add Add racktype_count annotation to list view queryset
  • create the LinkedCountColumn in ManufacturerTable

The result is the following image
image

Aditional Thougts:

  • The issue makes the following statement:

Currently, users can assign manufacturers when creating rack types; however, there isn’t a straightforward way to view or filter these rack types by manufacturer within the interface.

  • IMO only adding the Rack Types Collumn in the Manufacturer List View isn't enougth to solve the user issue.
  • Looking at RackTypeFilterForm code the manufacturer_id field are defined but since it isn't referenced in any FieldSet the user are unable to select a Manufacturer to the filter.
  • That's a really quick fix but sligtly outside the issue scope, so let me know if I should add the manufacturer_id field inside some filterset
  • The Rack Type FilterSet seens the best option.

🔄 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/18636 **Author:** [@renatoalmeidaoliveira](https://github.com/renatoalmeidaoliveira) **Created:** 2/13/2025 **Status:** ✅ Merged **Merged:** 2/18/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `18584-rack-types-column` --- ### 📝 Commits (2) - [`88cb474`](https://github.com/netbox-community/netbox/commit/88cb4745179bb4e697f071c374d3d5c4c00fa790) Add racktype_count annotation to list view queryset, create the LinkedCountColumn in ManufacturerTable - [`54d0bba`](https://github.com/netbox-community/netbox/commit/54d0bbad60ea86783102cc16081a59a156b2a949) Add Manufacturer field to RackTypeFilterForm ### 📊 Changes **3 files changed** (+11 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/forms/filtersets.py` (+1 -1) 📝 `netbox/dcim/tables/devicetypes.py` (+9 -4) 📝 `netbox/dcim/views.py` (+1 -0) </details> ### 📄 Description ### Fixes: #18584 Add rack types column to manufacturers table * Add Add racktype_count annotation to list view queryset * create the LinkedCountColumn in ManufacturerTable The result is the following image ![image](https://github.com/user-attachments/assets/3c231853-162f-485e-88ab-f2c645fb935f) ### Aditional Thougts: * The issue makes the following statement: > Currently, users can assign manufacturers when creating rack types; however, there isn’t a straightforward way to view or filter these rack types by manufacturer within the interface. * IMO only adding the `Rack Types` Collumn in the `Manufacturer` List View isn't enougth to solve the user issue. * Looking at [RackTypeFilterForm](https://github.com/netbox-community/netbox/blob/f8022040b245790796a82b38a67570335a320b74/netbox/dcim/forms/filtersets.py#L302) code the `manufacturer_id` field are defined but since it isn't referenced in any FieldSet the user are unable to select a `Manufacturer` to the filter. * That's a really quick fix but sligtly outside the issue scope, so let me know if I should add the `manufacturer_id` field inside some filterset * The `Rack Type` FilterSet seens the best option. --- <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-30 00:21:44 +01:00
adam closed this issue 2025-12-30 00:21:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15405