Include the NAT IP for a Device if one exists

This commit is contained in:
Jeremy Stretch 2016-04-27 11:17:29 -04:00
parent 57f6d45ee7
commit df54a4242a

View File

@ -93,6 +93,8 @@
<a href="{% url 'ipam:ipaddress' pk=device.primary_ip.pk %}">{{ device.primary_ip.address.ip }}</a>
{% if device.primary_ip.nat_inside %}
<span>(NAT for {{ device.primary_ip.nat_inside.address.ip }})</span>
{% elif device.primary_ip.nat_outside %}
<span>(NAT: {{ device.primary_ip.nat_outside.address.ip }})</span>
{% endif %}
{% else %}
<span class="text-muted">Not defined</span>