1- from django .utils .translation import gettext_lazy as _
21import django_tables2 as tables
32from django .utils .safestring import mark_safe
3+ from django .utils .translation import gettext_lazy as _
44from django_tables2 .utils import Accessor
55
66from ipam .models import *
@@ -58,7 +58,7 @@ class Meta(NetBoxTable.Meta):
5858# Aggregates
5959#
6060
61- class AggregateTable (TenancyColumnsMixin , NetBoxTable ):
61+ class AggregateTable (TenancyColumnsMixin , ContactsColumnMixin , NetBoxTable ):
6262 prefix = tables .Column (
6363 linkify = True ,
6464 verbose_name = _ ('Aggregate' ),
@@ -93,7 +93,7 @@ class Meta(NetBoxTable.Meta):
9393 model = Aggregate
9494 fields = (
9595 'pk' , 'id' , 'prefix' , 'rir' , 'tenant' , 'tenant_group' , 'child_count' , 'utilization' , 'date_added' ,
96- 'description' , 'comments' , 'tags' , 'created' , 'last_updated' ,
96+ 'description' , 'contacts' , ' comments' , 'tags' , 'created' , 'last_updated' ,
9797 )
9898 default_columns = ('pk' , 'prefix' , 'rir' , 'tenant' , 'child_count' , 'utilization' , 'date_added' , 'description' )
9999
@@ -154,7 +154,7 @@ class PrefixUtilizationColumn(columns.UtilizationColumn):
154154 """
155155
156156
157- class PrefixTable (TenancyColumnsMixin , NetBoxTable ):
157+ class PrefixTable (TenancyColumnsMixin , ContactsColumnMixin , NetBoxTable ):
158158 prefix = columns .TemplateColumn (
159159 verbose_name = _ ('Prefix' ),
160160 template_code = PREFIX_LINK_WITH_DEPTH ,
@@ -237,8 +237,8 @@ class Meta(NetBoxTable.Meta):
237237 model = Prefix
238238 fields = (
239239 'pk' , 'id' , 'prefix' , 'prefix_flat' , 'status' , 'children' , 'vrf' , 'utilization' , 'tenant' , 'tenant_group' ,
240- 'scope' , 'scope_type' , 'vlan_group' , 'vlan' , 'role' , 'is_pool' , 'mark_utilized' , 'description' , 'comments ' ,
241- 'tags' , 'created' , 'last_updated' ,
240+ 'scope' , 'scope_type' , 'vlan_group' , 'vlan' , 'role' , 'is_pool' , 'mark_utilized' , 'description' , 'contacts ' ,
241+ 'comments' , ' tags' , 'created' , 'last_updated' ,
242242 )
243243 default_columns = (
244244 'pk' , 'prefix' , 'status' , 'children' , 'vrf' , 'utilization' , 'tenant' , 'scope' , 'vlan' , 'role' ,
@@ -252,7 +252,7 @@ class Meta(NetBoxTable.Meta):
252252#
253253# IP ranges
254254#
255- class IPRangeTable (TenancyColumnsMixin , NetBoxTable ):
255+ class IPRangeTable (TenancyColumnsMixin , ContactsColumnMixin , NetBoxTable ):
256256 start_address = tables .Column (
257257 verbose_name = _ ('Start address' ),
258258 linkify = True
@@ -293,8 +293,8 @@ class Meta(NetBoxTable.Meta):
293293 model = IPRange
294294 fields = (
295295 'pk' , 'id' , 'start_address' , 'end_address' , 'size' , 'vrf' , 'status' , 'role' , 'tenant' , 'tenant_group' ,
296- 'mark_populated' , 'mark_utilized' , 'utilization' , 'description' , 'comments ' , 'tags ' , 'created ' ,
297- 'last_updated' ,
296+ 'mark_populated' , 'mark_utilized' , 'utilization' , 'description' , 'contacts ' , 'comments ' , 'tags ' ,
297+ 'created' , ' last_updated' ,
298298 )
299299 default_columns = (
300300 'pk' , 'start_address' , 'end_address' , 'size' , 'vrf' , 'status' , 'role' , 'tenant' , 'description' ,
0 commit comments