mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-09 01:49:35 -06:00
feat(ipam): Add ContactsColumnMixin to ServiceTable
Enhance `ServiceTable` by incorporating `ContactsColumnMixin` for better contact management. Updates the fields to include `contacts`. Fixes #20567
This commit is contained in:
parent
531ea34207
commit
a4868f894d
@ -3,6 +3,7 @@ import django_tables2 as tables
|
|||||||
|
|
||||||
from ipam.models import *
|
from ipam.models import *
|
||||||
from netbox.tables import NetBoxTable, columns
|
from netbox.tables import NetBoxTable, columns
|
||||||
|
from tenancy.tables import ContactsColumnMixin
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'ServiceTable',
|
'ServiceTable',
|
||||||
@ -35,7 +36,7 @@ class ServiceTemplateTable(NetBoxTable):
|
|||||||
default_columns = ('pk', 'name', 'protocol', 'ports', 'description')
|
default_columns = ('pk', 'name', 'protocol', 'ports', 'description')
|
||||||
|
|
||||||
|
|
||||||
class ServiceTable(NetBoxTable):
|
class ServiceTable(ContactsColumnMixin, NetBoxTable):
|
||||||
name = tables.Column(
|
name = tables.Column(
|
||||||
verbose_name=_('Name'),
|
verbose_name=_('Name'),
|
||||||
linkify=True
|
linkify=True
|
||||||
@ -60,7 +61,7 @@ class ServiceTable(NetBoxTable):
|
|||||||
class Meta(NetBoxTable.Meta):
|
class Meta(NetBoxTable.Meta):
|
||||||
model = Service
|
model = Service
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'id', 'name', 'parent', 'protocol', 'ports', 'ipaddresses', 'description', 'comments', 'tags',
|
'pk', 'id', 'name', 'parent', 'protocol', 'ports', 'ipaddresses', 'description', 'contacts', 'comments',
|
||||||
'created', 'last_updated',
|
'tags', 'created', 'last_updated',
|
||||||
)
|
)
|
||||||
default_columns = ('pk', 'name', 'parent', 'protocol', 'ports', 'description')
|
default_columns = ('pk', 'name', 'parent', 'protocol', 'ports', 'description')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user