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

Closes #6874: Add tenant assignment for locations

This commit is contained in:
jeremystretch
2021-10-07 15:46:21 -04:00
parent 18c3bb673f
commit 5a6190e321
11 changed files with 82 additions and 19 deletions

View File

@@ -103,6 +103,7 @@ class LocationTable(BaseTable):
site = tables.Column(
linkify=True
)
tenant = TenantColumn()
rack_count = LinkedCountColumn(
viewname='dcim:rack_list',
url_params={'location_id': 'pk'},
@@ -120,5 +121,5 @@ class LocationTable(BaseTable):
class Meta(BaseTable.Meta):
model = Location
fields = ('pk', 'name', 'site', 'rack_count', 'device_count', 'description', 'slug', 'actions')
default_columns = ('pk', 'name', 'site', 'rack_count', 'device_count', 'description', 'actions')
fields = ('pk', 'name', 'site', 'tenant', 'rack_count', 'device_count', 'description', 'slug', 'actions')
default_columns = ('pk', 'name', 'site', 'tenant', 'rack_count', 'device_count', 'description', 'actions')