Browse Source

Closes #661: Display relevant IP addressing when viewing a circuit

Jeremy Stretch 8 years ago
parent
commit
dc186a57cd
1 changed files with 15 additions and 0 deletions
  1. 15 0
      netbox/templates/circuits/circuit.html

+ 15 - 0
netbox/templates/circuits/circuit.html

@@ -132,6 +132,21 @@
                     </td>
                 </tr>
                 <tr>
+                    <td>IP Addressing</td>
+                    <td>
+                        {% if circuit.interface %}
+                            {% for ip in circuit.interface.ip_addresses.all %}
+                                {% if not forloop.first %}<br />{% endif %}
+                                <a href="{% url 'ipam:ipaddress' pk=ip.pk %}">{{ ip }}</a> ({{ ip.vrf|default:"Global" }})
+                            {% empty %}
+                                <span class="text-muted">None</span>
+                            {% endfor %}
+                        {% else %}
+                            <span class="text-muted">N/A</span>
+                        {% endif %}
+                    </td>
+                </tr>
+                <tr>
                     <td>Cross-Connect</td>
                     <td>
                         {% if circuit.xconnect_id %}