mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 02:06:42 -06:00
Fixes #435: Added a "add prefix" button to the VLAN view
This commit is contained in:
parent
04c9ebd46d
commit
ac2aa7ea89
@ -373,7 +373,7 @@ class PrefixEditView(PermissionRequiredMixin, ObjectEditView):
|
|||||||
permission_required = 'ipam.change_prefix'
|
permission_required = 'ipam.change_prefix'
|
||||||
model = Prefix
|
model = Prefix
|
||||||
form_class = forms.PrefixForm
|
form_class = forms.PrefixForm
|
||||||
fields_initial = ['site', 'vrf', 'prefix']
|
fields_initial = ['vrf', 'tenant', 'site', 'prefix', 'vlan']
|
||||||
cancel_url = 'ipam:prefix_list'
|
cancel_url = 'ipam:prefix_list'
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,6 +125,14 @@
|
|||||||
<strong>Prefixes</strong>
|
<strong>Prefixes</strong>
|
||||||
</div>
|
</div>
|
||||||
{% render_table prefix_table %}
|
{% render_table prefix_table %}
|
||||||
|
{% if perms.ipam.add_prefix %}
|
||||||
|
<div class="panel-footer text-right">
|
||||||
|
<a href="{% url 'ipam:prefix_add' %}?{% if vlan.tenant %}tenant={{ vlan.tenant.pk }}&{% endif %}site={{ vlan.site.pk }}&vlan={{ vlan.pk }}" class="btn btn-primary btn-xs">
|
||||||
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||||
|
Add a prefix
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user