-
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 #211: Allow device assignment and removal from IP address view
- Loading branch information
1 parent
f44a322
commit e22eafc
Showing
8 changed files
with
182 additions
and
7 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
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,56 @@ | ||
{% extends '_base.html' %} | ||
{% load static from staticfiles %} | ||
{% load form_helpers %} | ||
|
||
{% block title %}Assign IP Address{% endblock %} | ||
|
||
{% block content %} | ||
<form action="." method="post" class="form form-horizontal"> | ||
{% csrf_token %} | ||
<div class="row"> | ||
<div class="col-md-6 col-md-offset-3"> | ||
{% 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>Assign IP Address {{ ipaddress }} ({% if ipaddress.vrf %}VRF {{ ipaddress.vrf }}{% else %}Global Table{% endif %})</strong> | ||
</div> | ||
<div class="panel-body"> | ||
<ul class="nav nav-tabs" role="tablist"> | ||
<li role="presentation" class="active"><a href="#search" aria-controls="search" role="tab" data-toggle="tab">Search</a></li> | ||
<li role="presentation"><a href="#select" aria-controls="home" role="tab" data-toggle="tab">Select</a></li> | ||
</ul> | ||
<div class="tab-content"> | ||
<div class="tab-pane active" id="search"> | ||
{% render_field form.livesearch %} | ||
</div> | ||
<div class="tab-pane" id="select"> | ||
{% render_field form.site %} | ||
{% render_field form.rack %} | ||
{% render_field form.device %} | ||
</div> | ||
</div> | ||
{% render_field form.interface %} | ||
{% render_field form.set_as_primary %} | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<div class="col-md-9 col-md-offset-3"> | ||
<button type="submit" name="_assign" class="btn btn-primary">Assign</button> | ||
<a href="{{ cancel_url }}" class="btn btn-default">Cancel</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
{% endblock %} | ||
|
||
{% block javascript %} | ||
<script src="{% static 'js/livesearch.js' %}"></script> | ||
{% 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
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,8 @@ | ||
{% extends 'utilities/confirmation_form.html' %} | ||
{% load form_helpers %} | ||
|
||
{% block title %}Remove {{ ipaddress }} from {{ ipaddress.interface }}?{% endblock %} | ||
|
||
{% block message %} | ||
<p>Are you sure you want to remove this IP address from <strong>{{ ipaddress.interface.device }} {{ ipaddress.interface }}</strong>?</p> | ||
{% endblock %} |