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

add columns for each model table that has contacts

This commit is contained in:
Alex Gittings
2022-03-09 17:35:25 +00:00
parent 412c1df15a
commit 27dab262de
8 changed files with 53 additions and 14 deletions

View File

@ -75,6 +75,9 @@ class RackTable(BaseTable):
orderable=False,
verbose_name='Power'
)
contacts = tables.ManyToManyColumn(
linkify_item=True
)
tags = TagColumn(
url_name='dcim:rack_list'
)
@ -92,7 +95,7 @@ class RackTable(BaseTable):
fields = (
'pk', 'id', 'name', 'site', 'location', 'status', 'facility_id', 'tenant', 'role', 'serial', 'asset_tag',
'type', 'width', 'outer_width', 'outer_depth', 'u_height', 'comments', 'device_count', 'get_utilization',
'get_power_utilization', 'tags', 'created', 'last_updated',
'get_power_utilization', 'contacts', 'tags', 'created', 'last_updated',
)
default_columns = (
'pk', 'name', 'site', 'location', 'status', 'facility_id', 'tenant', 'role', 'u_height', 'device_count',