-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #1945: Implemented a VLAN members view
- Loading branch information
1 parent
4acd8e1
commit 38a2082
Showing
7 changed files
with
131 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<div class="row"> | ||
<div class="col-sm-8 col-md-9"> | ||
<ol class="breadcrumb"> | ||
<li><a href="{% url 'ipam:vlan_list' %}">VLANs</a></li> | ||
{% if vlan.site %} | ||
<li><a href="{% url 'ipam:vlan_list' %}?site={{ vlan.site.slug }}">{{ vlan.site }}</a></li> | ||
{% endif %} | ||
{% if vlan.group %} | ||
<li><a href="{% url 'ipam:vlan_list' %}?group={{ vlan.group.slug }}">{{ vlan.group }}</a></li> | ||
{% endif %} | ||
<li>{{ vlan }}</li> | ||
</ol> | ||
</div> | ||
<div class="col-sm-4 col-md-3"> | ||
<form action="{% url 'ipam:vlan_list' %}" method="get"> | ||
<div class="input-group"> | ||
<input type="text" name="q" class="form-control" placeholder="Search VLANs" /> | ||
<span class="input-group-btn"> | ||
<button type="submit" class="btn btn-primary"> | ||
<span class="fa fa-search" aria-hidden="true"></span> | ||
</button> | ||
</span> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="pull-right"> | ||
{% if perms.ipam.change_vlan %} | ||
<a href="{% url 'ipam:vlan_edit' pk=vlan.pk %}" class="btn btn-warning"> | ||
<span class="fa fa-pencil" aria-hidden="true"></span> | ||
Edit this VLAN | ||
</a> | ||
{% endif %} | ||
{% if perms.ipam.delete_vlan %} | ||
<a href="{% url 'ipam:vlan_delete' pk=vlan.pk %}" class="btn btn-danger"> | ||
<span class="fa fa-trash" aria-hidden="true"></span> | ||
Delete this VLAN | ||
</a> | ||
{% endif %} | ||
</div> | ||
<h1>{% block title %}VLAN {{ vlan.display_name }}{% endblock %}</h1> | ||
{% include 'inc/created_updated.html' with obj=vlan %} | ||
<ul class="nav nav-tabs" style="margin-bottom: 20px"> | ||
<li role="presentation"{% if active_tab == 'vlan' %} class="active"{% endif %}><a href="{% url 'ipam:vlan' pk=vlan.pk %}">VLAN</a></li> | ||
<li role="presentation"{% if active_tab == 'members' %} class="active"{% endif %}><a href="{% url 'ipam:vlan_members' pk=vlan.pk %}">Members <span class="badge">{{ vlan.get_members.count }}</span></a></li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% extends '_base.html' %} | ||
|
||
{% block title %}{{ vlan }} - Members{% endblock %} | ||
|
||
{% block content %} | ||
{% include 'ipam/inc/vlan_header.html' with active_tab='members' %} | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
{% include 'utilities/obj_table.html' with table=members_table table_template='panel_table.html' heading='VLAN Members' parent=vlan %} | ||
</div> | ||
</div> | ||
{% endblock %} |