mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-04 06:16:23 -06:00
Add contacts field to ip addresses table view #20692
This commit is contained in:
committed by
Jeremy Stretch
parent
4eff4d6a4a
commit
2aefb3af73
@@ -5,7 +5,7 @@ from django_tables2.utils import Accessor
|
|||||||
|
|
||||||
from ipam.models import *
|
from ipam.models import *
|
||||||
from netbox.tables import NetBoxTable, columns
|
from netbox.tables import NetBoxTable, columns
|
||||||
from tenancy.tables import TenancyColumnsMixin, TenantColumn
|
from tenancy.tables import ContactsColumnMixin, TenancyColumnsMixin, TenantColumn
|
||||||
from .template_code import *
|
from .template_code import *
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
@@ -308,7 +308,7 @@ class IPRangeTable(TenancyColumnsMixin, NetBoxTable):
|
|||||||
# IPAddresses
|
# IPAddresses
|
||||||
#
|
#
|
||||||
|
|
||||||
class IPAddressTable(TenancyColumnsMixin, NetBoxTable):
|
class IPAddressTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
|
||||||
address = tables.TemplateColumn(
|
address = tables.TemplateColumn(
|
||||||
template_code=IPADDRESS_LINK,
|
template_code=IPADDRESS_LINK,
|
||||||
verbose_name=_('IP Address')
|
verbose_name=_('IP Address')
|
||||||
@@ -365,7 +365,7 @@ class IPAddressTable(TenancyColumnsMixin, NetBoxTable):
|
|||||||
model = IPAddress
|
model = IPAddress
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'id', 'address', 'vrf', 'status', 'role', 'tenant', 'tenant_group', 'nat_inside', 'nat_outside',
|
'pk', 'id', 'address', 'vrf', 'status', 'role', 'tenant', 'tenant_group', 'nat_inside', 'nat_outside',
|
||||||
'assigned', 'dns_name', 'description', 'comments', 'tags', 'created', 'last_updated',
|
'assigned', 'dns_name', 'description', 'comments', 'contacts', 'tags', 'created', 'last_updated',
|
||||||
)
|
)
|
||||||
default_columns = (
|
default_columns = (
|
||||||
'pk', 'address', 'vrf', 'status', 'role', 'tenant', 'assigned', 'dns_name', 'description',
|
'pk', 'address', 'vrf', 'status', 'role', 'tenant', 'assigned', 'dns_name', 'description',
|
||||||
|
|||||||
Reference in New Issue
Block a user