diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index b0e67269c..bc1b6ae8f 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -220,6 +220,36 @@ {% endif %} + + OOB IPv4 + + {% if object.oob_ip4 %} + {{ object.oob_ip4.address.ip }} + {% if object.oob_ip4.nat_inside %} + (NAT for {{ object.oob_ip4.nat_inside.address.ip }}) + {% elif object.oob_ip4.nat_outside.exists %} + (NAT: {% for nat in object.oob_ip4.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %}) + {% endif %} + {% else %} + {{ ''|placeholder }} + {% endif %} + + + + OOB IPv6 + + {% if object.oob_ip6 %} + {{ object.oob_ip6.address.ip }} + {% if object.oob_ip6.nat_inside %} + (NAT for {{ object.oob_ip6.nat_inside.address.ip }}) + {% elif object.oob_ip6.nat_outside.exists %} + (NAT: {% for nat in object.oob_ip6.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %}) + {% endif %} + {% else %} + {{ ''|placeholder }} + {% endif %} + + {% if object.cluster %} Cluster diff --git a/netbox/templates/dcim/device_edit.html b/netbox/templates/dcim/device_edit.html index 17780b513..3963928ab 100644 --- a/netbox/templates/dcim/device_edit.html +++ b/netbox/templates/dcim/device_edit.html @@ -66,6 +66,8 @@ {% if object.pk %} {% render_field form.primary_ip4 %} {% render_field form.primary_ip6 %} + {% render_field form.oob_ip4 %} + {% render_field form.oob_ip6 %} {% endif %}