Skip to content

Allow modifying the assigned component for InventoryItems in the UI #11156

@kkthxbye-code

Description

@kkthxbye-code

NetBox version

v3.3.9

Feature type

Change to existing functionality

Proposed functionality

Currently it is possible to change the assigned component of an InventoryItem via. the API. It is however not possible to change the associated InventoryItem via. the UI. This means that the only way to create the association is by going to the component details view and clicking "Add Inventory Item". It is not possible to change the relationship afterwards and it is not possible to remove the relationship either.

A component field should be added to InventoryItem form to allow changing the associated component. The challenge is that the component field is a generic foreign key to any of the component types, so we need to figure out a slick way to present this to the user. We do it the following way for IP assignment currently:

image

However as there are currently 7 types of device components that support associating an InventoryItem, this might be a little much in the UI.

Use case

Changing the associated component might be useful adding the inventoryitem after the component has been added to the device. There might also be times where a component should be removed but the inventory item should stay. Similarly it might be useful to change the associated component, if an SFP is moved to another port for example.

Lastly it will allow the user to do in the UI what is already possible in the API.

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions