Skip to content

Commit a4868f8

Browse files
pheusjeremystretch
authored andcommitted
feat(ipam): Add ContactsColumnMixin to ServiceTable
Enhance `ServiceTable` by incorporating `ContactsColumnMixin` for better contact management. Updates the fields to include `contacts`. Fixes #20567
1 parent 531ea34 commit a4868f8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

netbox/ipam/tables/services.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from ipam.models import *
55
from netbox.tables import NetBoxTable, columns
6+
from tenancy.tables import ContactsColumnMixin
67

78
__all__ = (
89
'ServiceTable',
@@ -35,7 +36,7 @@ class Meta(NetBoxTable.Meta):
3536
default_columns = ('pk', 'name', 'protocol', 'ports', 'description')
3637

3738

38-
class ServiceTable(NetBoxTable):
39+
class ServiceTable(ContactsColumnMixin, NetBoxTable):
3940
name = tables.Column(
4041
verbose_name=_('Name'),
4142
linkify=True
@@ -60,7 +61,7 @@ class ServiceTable(NetBoxTable):
6061
class Meta(NetBoxTable.Meta):
6162
model = Service
6263
fields = (
63-
'pk', 'id', 'name', 'parent', 'protocol', 'ports', 'ipaddresses', 'description', 'comments', 'tags',
64-
'created', 'last_updated',
64+
'pk', 'id', 'name', 'parent', 'protocol', 'ports', 'ipaddresses', 'description', 'contacts', 'comments',
65+
'tags', 'created', 'last_updated',
6566
)
6667
default_columns = ('pk', 'name', 'parent', 'protocol', 'ports', 'description')

0 commit comments

Comments
 (0)