mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 10:16:42 -06:00
Closes #481: Require interface creation before trying to assign an IP to a device
This commit is contained in:
parent
30c7c2d359
commit
dec00cdb55
@ -186,18 +186,23 @@
|
|||||||
{% include 'dcim/inc/_ipaddress.html' %}
|
{% include 'dcim/inc/_ipaddress.html' %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% elif interfaces or mgmt_interfaces %}
|
||||||
<div class="panel-body text-muted">
|
<div class="panel-body text-muted">
|
||||||
None found
|
None assigned
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="panel-body">
|
||||||
|
<a href="{% url 'dcim:interface_add' pk=device.pk %}">Create an interface</a> to assign an IP.
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.ipam.add_ipaddress %}
|
{% if perms.ipam.add_ipaddress %}
|
||||||
<div class="panel-footer text-right">
|
{% if interfaces or mgmt_interfaces %}
|
||||||
<a href="{% url 'dcim:ipaddress_assign' pk=device.pk %}" class="btn btn-xs btn-primary">
|
<div class="panel-footer text-right">
|
||||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
<a href="{% url 'dcim:ipaddress_assign' pk=device.pk %}" class="btn btn-xs btn-primary">
|
||||||
Assign IP address
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Assign IP address
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
Loading…
Reference in New Issue
Block a user