mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 10:16:42 -06:00
Add manufacturer column to DeviceTable
This commit is contained in:
parent
779837389b
commit
d69ec7f8e4
@ -137,6 +137,10 @@ class DeviceTable(BaseTable):
|
|||||||
device_role = ColoredLabelColumn(
|
device_role = ColoredLabelColumn(
|
||||||
verbose_name='Role'
|
verbose_name='Role'
|
||||||
)
|
)
|
||||||
|
manufacturer = tables.Column(
|
||||||
|
accessor=Accessor('device_type__manufacturer'),
|
||||||
|
linkify=True
|
||||||
|
)
|
||||||
device_type = tables.Column(
|
device_type = tables.Column(
|
||||||
linkify=True,
|
linkify=True,
|
||||||
verbose_name='Type'
|
verbose_name='Type'
|
||||||
@ -180,12 +184,13 @@ class DeviceTable(BaseTable):
|
|||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = Device
|
model = Device
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'name', 'status', 'tenant', 'device_role', 'device_type', 'platform', 'serial', 'asset_tag', 'site',
|
'pk', 'name', 'status', 'tenant', 'device_role', 'manufacturer', 'device_type', 'platform', 'serial',
|
||||||
'location', 'rack', 'position', 'face', 'primary_ip', 'primary_ip4', 'primary_ip6', 'cluster',
|
'asset_tag', 'site', 'location', 'rack', 'position', 'face', 'primary_ip', 'primary_ip4', 'primary_ip6',
|
||||||
'virtual_chassis', 'vc_position', 'vc_priority', 'tags',
|
'cluster', 'virtual_chassis', 'vc_position', 'vc_priority', 'tags',
|
||||||
)
|
)
|
||||||
default_columns = (
|
default_columns = (
|
||||||
'pk', 'name', 'status', 'tenant', 'site', 'location', 'rack', 'device_role', 'device_type', 'primary_ip',
|
'pk', 'name', 'status', 'tenant', 'site', 'location', 'rack', 'device_role', 'manufacturer', 'device_type',
|
||||||
|
'primary_ip',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user