1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#7846: Show assigned component (if any) when creating inventory item

This commit is contained in:
jeremystretch
2021-12-28 14:06:20 -05:00
parent e9910d1fe2
commit 21356b487a
5 changed files with 44 additions and 7 deletions

View File

@@ -781,6 +781,8 @@ class InventoryItemTable(DeviceComponentTable):
linkify=True
)
component = tables.Column(
accessor=Accessor('component'),
orderable=False,
linkify=True
)
discovered = BooleanColumn()
@@ -792,8 +794,8 @@ class InventoryItemTable(DeviceComponentTable):
class Meta(BaseTable.Meta):
model = InventoryItem
fields = (
'pk', 'id', 'name', 'device', 'label', 'role', 'manufacturer', 'part_id', 'serial', 'asset_tag',
'component', 'description', 'discovered', 'tags',
'pk', 'id', 'name', 'device', 'component', 'label', 'role', 'manufacturer', 'part_id', 'serial',
'asset_tag', 'description', 'discovered', 'tags',
)
default_columns = (
'pk', 'name', 'device', 'label', 'role', 'manufacturer', 'part_id', 'serial', 'asset_tag',