From dec00cdb552793d91d5a5e83fbb57d29b3206c16 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 28 Sep 2016 12:24:33 -0400 Subject: [PATCH] Closes #481: Require interface creation before trying to assign an IP to a device --- netbox/templates/dcim/device.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index cd05a93db..d59660855 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -186,18 +186,23 @@ {% include 'dcim/inc/_ipaddress.html' %} {% endfor %} - {% else %} + {% elif interfaces or mgmt_interfaces %}
- None found + None assigned +
+ {% else %} +
+ Create an interface to assign an IP.
{% endif %} {% if perms.ipam.add_ipaddress %} - + {% if interfaces or mgmt_interfaces %} + + {% endif %} {% endif %}