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

netbox-community#10055 - Add template for NAT Outside

Fixes 'ipam.IPAddress.None' text
This commit is contained in:
atownson
2022-08-18 16:18:29 -05:00
committed by GitHub
parent a687aa1de6
commit 3f40e15ed5

View File

@ -56,6 +56,12 @@ VRF_LINK = """
{% endif %}
"""
NAT_OUTSIDE_LINK = """
{% if record.nat_outside.count > 0 %}
{% for nat in record.nat_outside.all %}<a href="{{ nat.get_absolute_url }}">{{ nat.address.ip }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
{% endif %}
"""
#
# RIRs
@ -360,8 +366,8 @@ class IPAddressTable(TenancyColumnsMixin, NetBoxTable):
orderable=False,
verbose_name='NAT (Inside)'
)
nat_outside = tables.Column(
linkify=True,
nat_outside = tables.TemplateColumn(
template_code=NAT_OUTSIDE_LINK,
orderable=False,
verbose_name='NAT (Outside)'
)