Include inventory items on primary device view #3948

Closed
opened 2025-12-29 18:32:13 +01:00 by adam · 5 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 5, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.9
  • NetBox version: 2.9-beta1

Proposed Functionality

Show inventory items on the primary device view, in a table similar to how other components are now displayed.

inventory_tab

Use Case

There is no real need for a separate view, and merging it into the primary device view avoids minor bugs like #4951.

Database Changes

None

External Dependencies

None

Originally created by @jeremystretch on GitHub (Aug 5, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.6.9 * NetBox version: 2.9-beta1 ### Proposed Functionality Show inventory items on the primary device view, in a table similar to how other components are now displayed. ![inventory_tab](https://user-images.githubusercontent.com/13487278/89418959-c7c78380-d6fe-11ea-86b1-ac7ef484f05c.png) ### Use Case There is no real need for a separate view, and merging it into the primary device view avoids minor bugs like #4951. ### Database Changes None ### External Dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 18:32:13 +01:00
adam closed this issue 2025-12-29 18:32:13 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 5, 2020):

I recall now why we've kept it as a separate view: the parent field on InventoryItem is a regular ForeignKey, not an MPTT field, so constructing the hierarchy of nested items is rather inefficient. #1846 was opened a long time ago for this work, but it has yet to be implemented. Now might actually be a good time to take it on, though I haven't yet dug into how involved the migration will be.

@jeremystretch commented on GitHub (Aug 5, 2020): I recall now why we've kept it as a separate view: the `parent` field on InventoryItem is a regular ForeignKey, not an MPTT field, so constructing the hierarchy of nested items is rather inefficient. #1846 was opened a long time ago for this work, but it has yet to be implemented. Now might actually be a good time to take it on, though I haven't yet dug into how involved the migration will be.
Author
Owner

@a31amit commented on GitHub (Aug 5, 2020):

While merging into the primary device view can be good to avoid such minor bugs. But I personally vote to keep inventory items tab separately where my thoughts are aligned with ease of use/view inventory items. Especially when you have a few custom links added.

with this, when I currently view the inventory tab and wanted to open custom links, these are mostly on the same screen. As part of user experience, it's very easy to open those links, especially when the decision to open links depends on what data is in inventory. Such as links to purchase requests app /other applications.

With proposed functionality, inventory items go very below to Device page, where you can't which server you are adding items can lead to mis-update information if working on multiple pages. Also to view any links, users have to go all the way to top or scroll back to open those links.

Other than this, the inventory items tab currently can be more customized if the user wanted to display any other information, which either not included with core netbox or maybe instance/needs depends, if this is moved, users might not have the choice to that.

@a31amit commented on GitHub (Aug 5, 2020): While merging into the primary device view can be good to avoid such minor bugs. But I personally vote to keep inventory items tab separately where my thoughts are aligned with ease of use/view inventory items. Especially when you have a few custom links added. with this, when I currently view the inventory tab and wanted to open custom links, these are mostly on the same screen. As part of user experience, it's very easy to open those links, especially when the decision to open links depends on what data is in inventory. Such as links to purchase requests app /other applications. With proposed functionality, inventory items go very below to Device page, where you can't which server you are adding items can lead to mis-update information if working on multiple pages. Also to view any links, users have to go all the way to top or scroll back to open those links. Other than this, the inventory items tab currently can be more customized if the user wanted to display any other information, which either not included with core netbox or maybe instance/needs depends, if this is moved, users might not have the choice to that.
Author
Owner

@jeremystretch commented on GitHub (Aug 6, 2020):

Blocked by #1846

@jeremystretch commented on GitHub (Aug 6, 2020): Blocked by #1846
Author
Owner

@jeremystretch commented on GitHub (Sep 18, 2020):

@a31amit if your concern is primarily just being able to view custom links and the object table at the same time, we can move the device details into a separate sub-tab alongside the components. This would address the UX issue for all components, not just inventory items.

Screenshot_2020-09-18 MyDevice1 - NetBox

@jeremystretch commented on GitHub (Sep 18, 2020): @a31amit if your concern is primarily just being able to view custom links and the object table at the same time, we can move the device details into a separate sub-tab alongside the components. This would address the UX issue for all components, not just inventory items. ![Screenshot_2020-09-18 MyDevice1 - NetBox](https://user-images.githubusercontent.com/13487278/93615337-415ebc80-f9a1-11ea-91fd-117f8841d137.png)
Author
Owner

@a31amit commented on GitHub (Sep 19, 2020):

@jeremystretch Thanks, This resolves my concerns. Since it doesn't seem to include any breaking changes, would be happy to see this in the next release of netbox rather wait for the 2.10 version.

@a31amit commented on GitHub (Sep 19, 2020): @jeremystretch Thanks, This resolves my concerns. Since it doesn't seem to include any breaking changes, would be happy to see this in the next release of netbox rather wait for the 2.10 version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3948