diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index bd1570827..52656a505 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -366,6 +366,10 @@ table.component-list td.subtable td { padding-bottom: 6px; padding-top: 6px; } +table.interface-ips th { + font-size: 80%; + font-weight: normal; +} /* Reports */ table.reports td.method { diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 4984dad95..8a8bf5086 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -762,9 +762,9 @@ $(".interface-toggle").click(function() { $('button.toggle-ips').click(function() { var selected = $(this).attr('selected'); if (selected) { - $('#interfaces_table tr.ipaddress').hide(); + $('#interfaces_table tr.ipaddresses').hide(); } else { - $('#interfaces_table tr.ipaddress').show(); + $('#interfaces_table tr.ipaddresses').show(); } $(this).attr('selected', !selected); $(this).children('span').toggleClass('glyphicon-check glyphicon-unchecked'); diff --git a/netbox/templates/dcim/inc/interface.html b/netbox/templates/dcim/inc/interface.html index 33e30b126..b254794df 100644 --- a/netbox/templates/dcim/inc/interface.html +++ b/netbox/templates/dcim/inc/interface.html @@ -131,56 +131,82 @@ {% endif %} -{% for ip in iface.ip_addresses.all %} -
IP Address | +Status/Role | +VRF | +Description | ++ |
---|---|---|---|---|
- {{ ip.description }} - | + {# IP address #} ++ {{ ip }} + | - {# Buttons #} -- {% if perms.ipam.change_ipaddress %} - - - - {% endif %} - {% if perms.ipam.delete_ipaddress %} - - - - {% endif %} - | -+ {% if device.primary_ip4 == ip or device.primary_ip6 == ip %} + Primary + {% endif %} + {{ ip.get_status_display }} + {% if ip.role %} + {{ ip.get_role_display }} + {% endif %} + | + + {# VRF #} ++ {% if ip.vrf %} + {{ ip.vrf.name }} + {% else %} + Global + {% endif %} + | + + {# Description #} ++ {% if ip.description %} + {{ ip.description }} + {% else %} + — + {% endif %} + | + + {# Buttons #} ++ {% if perms.ipam.change_ipaddress %} + + + + {% endif %} + {% if perms.ipam.delete_ipaddress %} + + + + {% endif %} + | + + + {% endfor %} +