-
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 #1512: Added a view to search for an IP address being assigned…
… to an interface
- Loading branch information
1 parent
e1d655c
commit a0bb7b0
Showing
7 changed files
with
132 additions
and
5 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 |
---|---|---|
@@ -1,4 +1,16 @@ | ||
{% load helpers %} | ||
|
||
<ul class="nav nav-tabs" style="margin-bottom: 20px"> | ||
<li role="presentation"{% if active_tab == 'add' %} class="active"{% endif %}><a href="{% url 'ipam:ipaddress_add' %}">Individual</a></li> | ||
<li role="presentation"{% if active_tab == 'bulk_add' %} class="active"{% endif %}><a href="{% url 'ipam:ipaddress_bulk_add' %}">Bulk</a></li> | ||
<li role="presentation"{% if active_tab == 'add' %} class="active"{% endif %}> | ||
<a href="{% url 'ipam:ipaddress_add' %}{% querystring request %}">New IP</a> | ||
</li> | ||
{% if 'interface' in request.GET %} | ||
<li role="presentation"{% if active_tab == 'assign' %} class="active"{% endif %}> | ||
<a href="{% url 'ipam:ipaddress_assign' %}{% querystring request %}">Assign IP</a> | ||
</li> | ||
{% else %} | ||
<li role="presentation"{% if active_tab == 'bulk_add' %} class="active"{% endif %}> | ||
<a href="{% url 'ipam:ipaddress_bulk_add' %}{% querystring request %}">Bulk Create</a> | ||
</li> | ||
{% endif %} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% extends 'utilities/obj_edit.html' %} | ||
{% load static from staticfiles %} | ||
{% load form_helpers %} | ||
{% load helpers %} | ||
|
||
{% block content %} | ||
<form action="{% querystring request %}" method="post" class="form form-horizontal"> | ||
{% csrf_token %} | ||
{% for field in form.hidden_fields %} | ||
{{ field }} | ||
{% endfor %} | ||
<div class="row"> | ||
<div class="col-md-6 col-md-offset-3"> | ||
<h3>Assign an IP Address</h3> | ||
{% include 'ipam/inc/ipadress_edit_header.html' with active_tab='assign' %} | ||
{% if form.non_field_errors %} | ||
<div class="panel panel-danger"> | ||
<div class="panel-heading"><strong>Errors</strong></div> | ||
<div class="panel-body"> | ||
{{ form.non_field_errors }} | ||
</div> | ||
</div> | ||
{% endif %} | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"><strong>Select IP Address</strong></div> | ||
<div class="panel-body"> | ||
{% render_field form.vrf %} | ||
{% render_field form.address %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-6 col-md-offset-3 text-right"> | ||
<button type="submit" class="btn btn-primary">Search</button> | ||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a> | ||
</div> | ||
</div> | ||
</form> | ||
{% if table %} | ||
<div class="row"> | ||
<div class="col-md-10 col-md-offset-1" style="margin-top: 20px"> | ||
<h3>Search Results</h3> | ||
{% include 'utilities/obj_table.html' with table_template='panel_table.html' %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% endblock %} |
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