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

adds parent to inventory item table #14113

This commit is contained in:
Abhimanyu Saharan
2023-11-08 22:42:58 +05:30
committed by Jeremy Stretch
parent b0f2de5bd7
commit 94858ac13f

View File

@@ -937,6 +937,9 @@ class InventoryItemTable(DeviceComponentTable):
discovered = columns.BooleanColumn(
verbose_name=_('Discovered'),
)
parent = tables.LinkColumn(
verbose_name=_('Parent'),
)
tags = columns.TagColumn(
url_name='dcim:inventoryitem_list'
)
@@ -945,7 +948,7 @@ class InventoryItemTable(DeviceComponentTable):
class Meta(NetBoxTable.Meta):
model = models.InventoryItem
fields = (
'pk', 'id', 'name', 'device', 'component', 'label', 'role', 'manufacturer', 'part_id', 'serial',
'pk', 'id', 'name', 'device', 'parent', 'component', 'label', 'role', 'manufacturer', 'part_id', 'serial',
'asset_tag', 'description', 'discovered', 'tags', 'created', 'last_updated',
)
default_columns = (