Closes #8080: Link to NAT IPs for device/VM primary IPs

This commit is contained in:
jeremystretch
2021-12-15 08:28:58 -05:00
parent d1e8c06d36
commit cdc73d4f56
4 changed files with 39 additions and 38 deletions

View File

@@ -87,7 +87,7 @@
<th scope="row">NAT (inside)</th>
<td>
{% if object.nat_inside %}
<a href="{% url 'ipam:ipaddress' pk=object.nat_inside.pk %}">{{ object.nat_inside }}</a>
<a href="{{ object.nat_inside.get_absolute_url }}">{{ object.nat_inside }}</a>
{% if object.nat_inside.assigned_object %}
(<a href="{{ object.nat_inside.assigned_object.parent_object.get_absolute_url }}">{{ object.nat_inside.assigned_object.parent_object }}</a>)
{% endif %}
@@ -100,7 +100,7 @@
<th scope="row">NAT (outside)</th>
<td>
{% if object.nat_outside %}
<a href="{% url 'ipam:ipaddress' pk=object.nat_outside.pk %}">{{ object.nat_outside }}</a>
<a href="{{ object.nat_outside.get_absolute_url }}">{{ object.nat_outside }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}