forked from netbox-community/netbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netbox-community#6905: Add prefix-vlan assignment view
- Loading branch information
Showing
7 changed files
with
158 additions
and
0 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,22 @@ | ||
{% load helpers %} | ||
|
||
<ul class="nav nav-tabs px-3"> | ||
<li class="nav-item"> | ||
<a | ||
class="nav-link {% if active_tab == 'add' %}active{% endif %}" | ||
href="{% url 'ipam:prefix_add' %}{% querystring request %}" | ||
> | ||
{% if obj.pk %}Edit{% else %}Create{% endif %} | ||
</a> | ||
</li> | ||
{% if 'vlan' in request.GET %} | ||
<li class="nav-item"> | ||
<a | ||
class="nav-link {% if active_tab == 'assign' %}active{% endif %}" | ||
href="{% url 'ipam:prefix_assign' %}{% querystring request %}" | ||
> | ||
Assign Prefix | ||
</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,46 @@ | ||
{% extends 'generic/object_edit.html' %} | ||
{% load static %} | ||
{% load form_helpers %} | ||
{% load helpers %} | ||
|
||
{% block title %}Assign a Prefix{% endblock title %} | ||
|
||
{% block tabs %} | ||
{% include 'ipam/inc/prefix_edit_header.html' with active_tab='assign' %} | ||
{% endblock %} | ||
|
||
{% block form %} | ||
<form action="{% querystring request %}" method="post" class="form form-horizontal"> | ||
{% csrf_token %} | ||
{% for field in form.hidden_fields %} | ||
{{ field }} | ||
{% endfor %} | ||
<div class="row mb-3"> | ||
<div class="col col-md-8 offset-md-2"> | ||
<div class="field-group"> | ||
<h6>Select Prefix</h6> | ||
{% render_field form.site_id %} | ||
{% render_field form.vrf_id %} | ||
{% render_field form.q %} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row mb-3"> | ||
<div class="col col-md-8 offset-md-2 text-end"> | ||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a> | ||
<button type="submit" class="btn btn-primary">Search</button> | ||
</div> | ||
</div> | ||
</form> | ||
{% if table %} | ||
<div class="row mb-3"> | ||
<div class="col col-md-12"> | ||
<h3>Search Results</h3> | ||
{% include 'utilities/obj_table.html' %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% endblock form %} | ||
|
||
{% block buttons %} | ||
{% endblock buttons%} |
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 'generic/object_edit.html' %} | ||
{% load static %} | ||
{% load form_helpers %} | ||
{% load helpers %} | ||
|
||
{% block tabs %} | ||
{% include 'ipam/inc/prefix_edit_header.html' with active_tab='add' %} | ||
{% endblock tabs %} |