mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #971: Implement VLANGroup VLANs view to show available VLANs within a group
This commit is contained in:
committed by
Jeremy Stretch
parent
475e0e6c1e
commit
33e45a5292
14
netbox/templates/ipam/inc/vlangroup_header.html
Normal file
14
netbox/templates/ipam/inc/vlangroup_header.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="pull-right">
|
||||
{% if perms.ipam.add_vlan and first_available_vlan %}
|
||||
<a href="{% url 'ipam:vlan_add' %}?vid={{ first_available_vlan }}&group={{ vlan_group.pk }}{% if vlan_group.site %}&site={{ vlan_group.site.pk }}{% endif %}" class="btn btn-success">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i> Add a VLAN
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_vlangroup %}
|
||||
<a href="{% url 'ipam:vlangroup_edit' pk=vlan_group.pk %}" class="btn btn-warning">
|
||||
<span class="fa fa-pencil" aria-hidden="true"></span>
|
||||
Edit this VLAN Group
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{{ vlan_group }}</h1>
|
24
netbox/templates/ipam/vlangroup_vlans.html
Normal file
24
netbox/templates/ipam/vlangroup_vlans.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends '_base.html' %}
|
||||
|
||||
{% block title %}{{ vlan_group }} - VLANs{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:vlangroup_list' %}">VLAN Groups</a></li>
|
||||
{% if vlan_group.site %}
|
||||
<li><a href="{% url 'dcim:site' slug=vlan_group.site.slug %}">{{ vlan_group.site }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ vlan_group }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'ipam/inc/vlangroup_header.html' %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'utilities/obj_table.html' with table=vlan_table table_template='panel_table.html' heading='VLANs' bulk_edit_url='ipam:vlan_bulk_edit' bulk_delete_url='ipam:vlan_bulk_delete' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user