Introduced an object import template

This commit is contained in:
Jeremy Stretch 2017-05-03 15:41:36 -04:00
parent 3c631902e1
commit 79089cc47e
16 changed files with 626 additions and 771 deletions

View File

@ -1,72 +1,57 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Circuit Import{% endblock %} {% block title %}Circuit Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Circuit Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Circuit ID</td>
<div class="col-md-6"> <td>Alphanumeric circuit identifier</td>
<h4>CSV Format</h4> <td>IC-603122</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>Provider</td>
<th>Field</th> <td>Name of circuit provider</td>
<th>Description</th> <td>TeliaSonera</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>Type</td>
<tbody> <td>Circuit type</td>
<tr> <td>Transit</td>
<td>Circuit ID</td> </tr>
<td>Alphanumeric circuit identifier</td> <tr>
<td>IC-603122</td> <td>Tenant</td>
</tr> <td>Name of tenant (optional)</td>
<tr> <td>Strickland Propane</td>
<td>Provider</td> </tr>
<td>Name of circuit provider</td> <tr>
<td>TeliaSonera</td> <td>Install Date</td>
</tr> <td>Date in YYYY-MM-DD format (optional)</td>
<tr> <td>2016-02-23</td>
<td>Type</td> </tr>
<td>Circuit type</td> <tr>
<td>Transit</td> <td>Commit rate</td>
</tr> <td>Commited rate in Kbps (optional)</td>
<tr> <td>2000</td>
<td>Tenant</td> </tr>
<td>Name of tenant (optional)</td> <tr>
<td>Strickland Propane</td> <td>Description</td>
</tr> <td>Short description (optional)</td>
<tr> <td>Primary for voice</td>
<td>Install Date</td> </tr>
<td>Date in YYYY-MM-DD format (optional)</td> </tbody>
<td>2016-02-23</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>IC-603122,TeliaSonera,Transit,Strickland Propane,2016-02-23,2000,Primary for voice</pre>
<td>Commit rate</td>
<td>Commited rate in Kbps (optional)</td>
<td>2000</td>
</tr>
<tr>
<td>Description</td>
<td>Short description (optional)</td>
<td>Primary for voice</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>IC-603122,TeliaSonera,Transit,Strickland Propane,2016-02-23,2000,Primary for voice</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,62 +1,47 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Provider Import{% endblock %} {% block title %}Provider Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Provider Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Name</td>
<div class="col-md-6"> <td>Provider's proper name</td>
<h4>CSV Format</h4> <td>Level 3</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>Slug</td>
<th>Field</th> <td>URL-friendly name</td>
<th>Description</th> <td>level3</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>ASN</td>
<tbody> <td>Autonomous system number (optional)</td>
<tr> <td>3356</td>
<td>Name</td> </tr>
<td>Provider's proper name</td> <tr>
<td>Level 3</td> <td>Account</td>
</tr> <td>Account number (optional)</td>
<tr> <td>08931544</td>
<td>Slug</td> </tr>
<td>URL-friendly name</td> <tr>
<td>level3</td> <td>Portal URL</td>
</tr> <td>Customer service portal URL (optional)</td>
<tr> <td>https://mylevel3.net</td>
<td>ASN</td> </tr>
<td>Autonomous system number (optional)</td> </tbody>
<td>3356</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>Level 3,level3,3356,08931544,https://mylevel3.net</pre>
<td>Account</td>
<td>Account number (optional)</td>
<td>08931544</td>
</tr>
<tr>
<td>Portal URL</td>
<td>Customer service portal URL (optional)</td>
<td>https://mylevel3.net</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>Level 3,level3,3356,08931544,https://mylevel3.net</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,63 +1,47 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Console Connections Import{% endblock %} {% block title %}Console Connections Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Console Connections Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<div class="col-md-12 text-right"> </tr>
<button type="submit" class="btn btn-primary">Submit</button> </thead>
</div> <tbody>
</div> <tr>
</form> <td>Console server</td>
</div> <td>Device name or {ID}</td>
<div class="col-md-6"> <td>abc1-cs3</td>
<h4>CSV Format</h4> </tr>
<table class="table"> <tr>
<thead> <td>Console server port</td>
<tr> <td>Full CS port name</td>
<th>Field</th> <td>Port 35</td>
<th>Description</th> </tr>
<th>Example</th> <tr>
</tr> <td>Device</td>
</thead> <td>Device name or {ID}</td>
<tbody> <td>abc1-switch7</td>
<tr> </tr>
<td>Console server</td> <tr>
<td>Device name or {ID}</td> <td>Console Port</td>
<td>abc1-cs3</td> <td>Console port name</td>
</tr> <td>Console</td>
<tr> </tr>
<td>Console server port</td> <tr>
<td>Full CS port name</td> <td>Connection Status</td>
<td>Port 35</td> <td>"planned" or "connected"</td>
</tr> <td>planned</td>
<tr> </tr>
<td>Device</td> </tbody>
<td>Device name or {ID}</td> </table>
<td>abc1-switch7</td> <h4>Example</h4>
</tr> <pre>abc1-cs3,Port 35,abc1-switch7,Console,planned</pre>
<tr>
<td>Console Port</td>
<td>Console port name</td>
<td>Console</td>
</tr>
<tr>
<td>Connection Status</td>
<td>"planned" or "connected"</td>
<td>planned</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>abc1-cs3,Port 35,abc1-switch7,Console,planned</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -12,8 +12,12 @@
{% csrf_token %} {% csrf_token %}
{% render_form form %} {% render_form form %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary">Submit</button> <div class="col-md-12 text-right">
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> <button type="submit" class="btn btn-primary">Submit</button>
{% if return_url %}
<a href="{% url return_url %}" class="btn btn-default">Cancel</a>
{% endif %}
</div>
</div> </div>
</form> </form>
<h4>CSV Format</h4> <h4>CSV Format</h4>

View File

@ -12,8 +12,12 @@
{% csrf_token %} {% csrf_token %}
{% render_form form %} {% render_form form %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary">Submit</button> <div class="col-md-12 text-right">
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> <button type="submit" class="btn btn-primary">Submit</button>
{% if return_url %}
<a href="{% url return_url %}" class="btn btn-default">Cancel</a>
{% endif %}
</div>
</div> </div>
</form> </form>
<h4>CSV Format</h4> <h4>CSV Format</h4>

View File

@ -1,71 +1,47 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Interface Connections Import{% endblock %} {% block title %}Interface Connections Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Interface Connections Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
{% if form.non_field_errors %} <tr>
<div class="panel panel-danger"> <th>Field</th>
<div class="panel-heading"><strong>Errors</strong></div> <th>Description</th>
<div class="panel-body"> <th>Example</th>
{{ form.non_field_errors }} </tr>
</div> </thead>
</div> <tbody>
{% endif %} <tr>
<form action="." method="post" class="form"> <td>Device A</td>
{% csrf_token %} <td>Device name or {ID}</td>
{% render_form form %} <td>abc1-core1</td>
<div class="form-group"> </tr>
<div class="col-md-12 text-right"> <tr>
<button type="submit" class="btn btn-primary">Submit</button> <td>Interface A</td>
</div> <td>Interface name</td>
</div> <td>xe-0/0/6</td>
</form> </tr>
</div> <tr>
<div class="col-md-6"> <td>Device B</td>
<h4>CSV Format</h4> <td>Device name or {ID}</td>
<table class="table"> <td>abc1-switch7</td>
<thead> </tr>
<tr> <tr>
<th>Field</th> <td>Interface B</td>
<th>Description</th> <td>Interface name</td>
<th>Example</th> <td>xe-0/0/0</td>
</tr> </tr>
</thead> <tr>
<tbody> <td>Connection Status</td>
<tr> <td>"planned" or "connected"</td>
<td>Device A</td> <td>planned</td>
<td>Device name or {ID}</td> </tr>
<td>abc1-core1</td> </tbody>
</tr> </table>
<tr> <h4>Example</h4>
<td>Interface A</td> <pre>abc1-core1,xe-0/0/6,abc1-switch7,xe-0/0/0,planned</pre>
<td>Interface name</td>
<td>xe-0/0/6</td>
</tr>
<tr>
<td>Device B</td>
<td>Device name or {ID}</td>
<td>abc1-switch7</td>
</tr>
<tr>
<td>Interface B</td>
<td>Interface name</td>
<td>xe-0/0/0</td>
</tr>
<tr>
<td>Connection Status</td>
<td>"planned" or "connected"</td>
<td>planned</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>abc1-core1,xe-0/0/6,abc1-switch7,xe-0/0/0,planned</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,63 +1,47 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Power Connections Import{% endblock %} {% block title %}Power Connections Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Power Connections Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<div class="col-md-12 text-right"> </tr>
<button type="submit" class="btn btn-primary">Submit</button> </thead>
</div> <tbody>
</div> <tr>
</form> <td>PDU</td>
</div> <td>Device name or {ID}</td>
<div class="col-md-6"> <td>abc1-pdu1</td>
<h4>CSV Format</h4> </tr>
<table class="table"> <tr>
<thead> <td>Power Outlet</td>
<tr> <td>Power outlet name</td>
<th>Field</th> <td>AC4</td>
<th>Description</th> </tr>
<th>Example</th> <tr>
</tr> <td>Device</td>
</thead> <td>Device name or {ID}</td>
<tbody> <td>abc1-switch7</td>
<tr> </tr>
<td>PDU</td> <tr>
<td>Device name or {ID}</td> <td>Power Port</td>
<td>abc1-pdu1</td> <td>Power port name</td>
</tr> <td>PSU0</td>
<tr> </tr>
<td>Power Outlet</td> <tr>
<td>Power outlet name</td> <td>Connection Status</td>
<td>AC4</td> <td>"planned" or "connected"</td>
</tr> <td>connected</td>
<tr> </tr>
<td>Device</td> </tbody>
<td>Device name or {ID}</td> </table>
<td>abc1-switch7</td> <h4>Example</h4>
</tr> <pre>abc1-pdu1,AC4,abc1-switch7,PSU0,connected</pre>
<tr>
<td>Power Port</td>
<td>Power port name</td>
<td>PSU0</td>
</tr>
<tr>
<td>Connection Status</td>
<td>"planned" or "connected"</td>
<td>connected</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>abc1-pdu1,AC4,abc1-switch7,PSU0,connected</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,87 +1,72 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Rack Import{% endblock %} {% block title %}Rack Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Rack Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Site</td>
<div class="col-md-6"> <td>Name of the assigned site</td>
<h4>CSV Format</h4> <td>DC-4</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>Group</td>
<th>Field</th> <td>Rack group name (optional)</td>
<th>Description</th> <td>Cage 1400</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>Name</td>
<tbody> <td>Internal rack name</td>
<tr> <td>R101</td>
<td>Site</td> </tr>
<td>Name of the assigned site</td> <tr>
<td>DC-4</td> <td>Facility ID</td>
</tr> <td>Rack ID assigned by the facility (optional)</td>
<tr> <td>J12.100</td>
<td>Group</td> </tr>
<td>Rack group name (optional)</td> <tr>
<td>Cage 1400</td> <td>Tenant</td>
</tr> <td>Name of tenant (optional)</td>
<tr> <td>Pied Piper</td>
<td>Name</td> </tr>
<td>Internal rack name</td> <tr>
<td>R101</td> <td>Role</td>
</tr> <td>Functional role (optional)</td>
<tr> <td>Compute</td>
<td>Facility ID</td> </tr>
<td>Rack ID assigned by the facility (optional)</td> <tr>
<td>J12.100</td> <td>Type</td>
</tr> <td>Rack type (optional)</td>
<tr> <td>4-post cabinet</td>
<td>Tenant</td> </tr>
<td>Name of tenant (optional)</td> <tr>
<td>Pied Piper</td> <td>Width</td>
</tr> <td>Rail-to-rail width (19 or 23 inches)</td>
<tr> <td>19</td>
<td>Role</td> </tr>
<td>Functional role (optional)</td> <tr>
<td>Compute</td> <td>Height</td>
</tr> <td>Height in rack units</td>
<tr> <td>42</td>
<td>Type</td> </tr>
<td>Rack type (optional)</td> <tr>
<td>4-post cabinet</td> <td>Descending units</td>
</tr> <td>Units are numbered top-to-bottom</td>
<tr> <td>False</td>
<td>Width</td> </tr>
<td>Rail-to-rail width (19 or 23 inches)</td> </tbody>
<td>19</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>DC-4,Cage 1400,R101,J12.100,Pied Piper,Compute,4-post cabinet,19,42,False</pre>
<td>Height</td>
<td>Height in rack units</td>
<td>42</td>
</tr>
<tr>
<td>Descending units</td>
<td>Units are numbered top-to-bottom</td>
<td>False</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>DC-4,Cage 1400,R101,J12.100,Pied Piper,Compute,4-post cabinet,19,42,False</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,57 +1,42 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Aggregate Import{% endblock %} {% block title %}Aggregate Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Aggregate Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Prefix</td>
<div class="col-md-6"> <td>IPv4 or IPv6 network</td>
<h4>CSV Format</h4> <td>172.16.0.0/12</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>RIR</td>
<th>Field</th> <td>Name of RIR</td>
<th>Description</th> <td>RFC 1918</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>Date Added</td>
<tbody> <td>Date in YYYY-MM-DD format (optional)</td>
<tr> <td>2016-02-23</td>
<td>Prefix</td> </tr>
<td>IPv4 or IPv6 network</td> <tr>
<td>172.16.0.0/12</td> <td>Description</td>
</tr> <td>Short description (optional)</td>
<tr> <td>Private IPv4 space</td>
<td>RIR</td> </tr>
<td>Name of RIR</td> </tbody>
<td>RFC 1918</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>172.16.0.0/12,RFC 1918,2016-02-23,Private IPv4 space</pre>
<td>Date Added</td>
<td>Date in YYYY-MM-DD format (optional)</td>
<td>2016-02-23</td>
</tr>
<tr>
<td>Description</td>
<td>Short description (optional)</td>
<td>Private IPv4 space</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>172.16.0.0/12,RFC 1918,2016-02-23,Private IPv4 space</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,77 +1,62 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}IP Address Import{% endblock %} {% block title %}IP Address Import{% endblock %}
{% block content %} {% block instructions %}
<h1>IP Address Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Address</td>
<div class="col-md-6"> <td>IPv4 or IPv6 address</td>
<h4>CSV Format</h4> <td>192.0.2.42/24</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>VRF</td>
<th>Field</th> <td>VRF route distinguisher (optional)</td>
<th>Description</th> <td>65000:123</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>Tenant</td>
<tbody> <td>Name of tenant (optional)</td>
<tr> <td>ABC01</td>
<td>Address</td> </tr>
<td>IPv4 or IPv6 address</td> <tr>
<td>192.0.2.42/24</td> <td>Status</td>
</tr> <td>Current status</td>
<tr> <td>Active</td>
<td>VRF</td> </tr>
<td>VRF route distinguisher (optional)</td> <tr>
<td>65000:123</td> <td>Device</td>
</tr> <td>Device name (optional)</td>
<tr> <td>switch12</td>
<td>Tenant</td> </tr>
<td>Name of tenant (optional)</td> <tr>
<td>ABC01</td> <td>Interface</td>
</tr> <td>Interface name (optional)</td>
<tr> <td>ge-0/0/31</td>
<td>Status</td> </tr>
<td>Current status</td> <tr>
<td>Active</td> <td>Is Primary</td>
</tr> <td>If "true", IP will be primary for device (optional)</td>
<tr> <td>True</td>
<td>Device</td> </tr>
<td>Device name (optional)</td> <tr>
<td>switch12</td> <td>Description</td>
</tr> <td>Short description (optional)</td>
<tr> <td>Management IP</td>
<td>Interface</td> </tr>
<td>Interface name (optional)</td> </tbody>
<td>ge-0/0/31</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>192.0.2.42/24,65000:123,ABC01,Active,switch12,ge-0/0/31,True,Management IP</pre>
<td>Is Primary</td>
<td>If "true", IP will be primary for device (optional)</td>
<td>True</td>
</tr>
<tr>
<td>Description</td>
<td>Short description (optional)</td>
<td>Management IP</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>192.0.2.42/24,65000:123,ABC01,Active,switch12,ge-0/0/31,True,Management IP</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,87 +1,72 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Prefix Import{% endblock %} {% block title %}Prefix Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Prefix Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Prefix</td>
<div class="col-md-6"> <td>IPv4 or IPv6 network</td>
<h4>CSV Format</h4> <td>192.168.42.0/24</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>VRF</td>
<th>Field</th> <td>VRF route distinguisher (optional)</td>
<th>Description</th> <td>65000:123</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>Tenant</td>
<tbody> <td>Name of tenant (optional)</td>
<tr> <td>ABC01</td>
<td>Prefix</td> </tr>
<td>IPv4 or IPv6 network</td> <tr>
<td>192.168.42.0/24</td> <td>Site</td>
</tr> <td>Name of assigned site (optional)</td>
<tr> <td>HQ</td>
<td>VRF</td> </tr>
<td>VRF route distinguisher (optional)</td> <tr>
<td>65000:123</td> <td>VLAN Group</td>
</tr> <td>Name of group for VLAN selection (optional)</td>
<tr> <td>Customers</td>
<td>Tenant</td> </tr>
<td>Name of tenant (optional)</td> <tr>
<td>ABC01</td> <td>VLAN ID</td>
</tr> <td>Numeric VLAN ID (optional)</td>
<tr> <td>801</td>
<td>Site</td> </tr>
<td>Name of assigned site (optional)</td> <tr>
<td>HQ</td> <td>Status</td>
</tr> <td>Current status</td>
<tr> <td>Active</td>
<td>VLAN Group</td> </tr>
<td>Name of group for VLAN selection (optional)</td> <tr>
<td>Customers</td> <td>Role</td>
</tr> <td>Functional role (optional)</td>
<tr> <td>Customer</td>
<td>VLAN ID</td> </tr>
<td>Numeric VLAN ID (optional)</td> <tr>
<td>801</td> <td>Is a pool</td>
</tr> <td>True if all IPs are considered usable</td>
<tr> <td>False</td>
<td>Status</td> </tr>
<td>Current status</td> <tr>
<td>Active</td> <td>Description</td>
</tr> <td>Short description (optional)</td>
<tr> <td>7th floor WiFi</td>
<td>Role</td> </tr>
<td>Functional role (optional)</td> </tbody>
<td>Customer</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>192.168.42.0/24,65000:123,ABC01,HQ,Customers,801,Active,Customer,False,7th floor WiFi</pre>
<td>Is a pool</td>
<td>True if all IPs are considered usable</td>
<td>False</td>
</tr>
<tr>
<td>Description</td>
<td>Short description (optional)</td>
<td>7th floor WiFi</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>192.168.42.0/24,65000:123,ABC01,HQ,Customers,801,Active,Customer,False,7th floor WiFi</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,77 +1,62 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}VLAN Import{% endblock %} {% block title %}VLAN Import{% endblock %}
{% block content %} {% block instructions %}
<h1>VLAN Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Site</td>
<div class="col-md-6"> <td>Name of assigned site</td>
<h4>CSV Format</h4> <td>LAS2</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>Group</td>
<th>Field</th> <td>Name of VLAN group (optional)</td>
<th>Description</th> <td>Backend Network</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>ID</td>
<tbody> <td>Configured VLAN ID</td>
<tr> <td>1400</td>
<td>Site</td> </tr>
<td>Name of assigned site</td> <tr>
<td>LAS2</td> <td>Name</td>
</tr> <td>Configured VLAN name</td>
<tr> <td>Cameras</td>
<td>Group</td> </tr>
<td>Name of VLAN group (optional)</td> <tr>
<td>Backend Network</td> <td>Tenant</td>
</tr> <td>Name of tenant (optional)</td>
<tr> <td>Internal</td>
<td>ID</td> </tr>
<td>Configured VLAN ID</td> <tr>
<td>1400</td> <td>Status</td>
</tr> <td>Current status</td>
<tr> <td>Active</td>
<td>Name</td> </tr>
<td>Configured VLAN name</td> <tr>
<td>Cameras</td> <td>Role</td>
</tr> <td>Functional role (optional)</td>
<tr> <td>Security</td>
<td>Tenant</td> </tr>
<td>Name of tenant (optional)</td> <tr>
<td>Internal</td> <td>Description</td>
</tr> <td>Short description (optional)</td>
<tr> <td>Security team only</td>
<td>Status</td> </tr>
<td>Current status</td> </tbody>
<td>Active</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>LAS2,Backend Network,1400,Cameras,Internal,Active,Security,Security team only</pre>
<td>Role</td>
<td>Functional role (optional)</td>
<td>Security</td>
</tr>
<tr>
<td>Description</td>
<td>Short description (optional)</td>
<td>Security team only</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>LAS2,Backend Network,1400,Cameras,Internal,Active,Security,Security team only</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,62 +1,47 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}VRF Import{% endblock %} {% block title %}VRF Import{% endblock %}
{% block content %} {% block instructions %}
<h1>VRF Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Name</td>
<div class="col-md-6"> <td>Name of VRF</td>
<h4>CSV Format</h4> <td>Customer_ABC</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>RD</td>
<th>Field</th> <td>Route distinguisher</td>
<th>Description</th> <td>65000:123456</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>Tenant</td>
<tbody> <td>Name of tenant (optional)</td>
<tr> <td>ABC01</td>
<td>Name</td> </tr>
<td>Name of VRF</td> <tr>
<td>Customer_ABC</td> <td>Enforce uniqueness</td>
</tr> <td>Prevent duplicate prefixes/IP addresses</td>
<tr> <td>True</td>
<td>RD</td> </tr>
<td>Route distinguisher</td> <tr>
<td>65000:123456</td> <td>Description</td>
</tr> <td>Short description (optional)</td>
<tr> <td>Native VRF for customer ABC</td>
<td>Tenant</td> </tr>
<td>Name of tenant (optional)</td> </tbody>
<td>ABC01</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>Customer_ABC,65000:123456,ABC01,True,Native VRF for customer ABC</pre>
<td>Enforce uniqueness</td>
<td>Prevent duplicate prefixes/IP addresses</td>
<td>True</td>
</tr>
<tr>
<td>Description</td>
<td>Short description (optional)</td>
<td>Native VRF for customer ABC</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>Customer_ABC,65000:123456,ABC01,True,Native VRF for customer ABC</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -20,10 +20,14 @@
<form action="." method="post" class="form"> <form action="." method="post" class="form">
{% csrf_token %} {% csrf_token %}
{% render_form form %} {% render_form form %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary">Submit</button> <div class="col-md-12 text-right">
<a href="{{ return_url }}" class="btn btn-default">Cancel</a> <button type="submit" class="btn btn-primary">Submit</button>
</div> {% if return_url %}
<a href="{% url return_url %}" class="btn btn-default">Cancel</a>
{% endif %}
</div>
</div>
</form> </form>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">

View File

@ -1,57 +1,42 @@
{% extends '_base.html' %} {% extends 'utilities/obj_import.html' %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load form_helpers %} {% load form_helpers %}
{% block title %}Tenant Import{% endblock %} {% block title %}Tenant Import{% endblock %}
{% block content %} {% block instructions %}
<h1>Tenant Import</h1> <h4>CSV Format</h4>
<div class="row"> <table class="table">
<div class="col-md-6"> <thead>
<form action="." method="post" class="form"> <tr>
{% csrf_token %} <th>Field</th>
{% render_form form %} <th>Description</th>
<div class="form-group"> <th>Example</th>
<button type="submit" class="btn btn-primary">Submit</button> </tr>
<a href="{% url return_url %}" class="btn btn-default">Cancel</a> </thead>
</div> <tbody>
</form> <tr>
</div> <td>Name</td>
<div class="col-md-6"> <td>Tenant name</td>
<h4>CSV Format</h4> <td>WIDG01</td>
<table class="table"> </tr>
<thead> <tr>
<tr> <td>Slug</td>
<th>Field</th> <td>URL-friendly name</td>
<th>Description</th> <td>widg01</td>
<th>Example</th> </tr>
</tr> <tr>
</thead> <td>Group</td>
<tbody> <td>Tenant group (optional)</td>
<tr> <td>Customers</td>
<td>Name</td> </tr>
<td>Tenant name</td> <tr>
<td>WIDG01</td> <td>Description</td>
</tr> <td>Long-form name or other text (optional)</td>
<tr> <td>Widgets Inc.</td>
<td>Slug</td> </tr>
<td>URL-friendly name</td> </tbody>
<td>widg01</td> </table>
</tr> <h4>Example</h4>
<tr> <pre>WIDG01,widg01,Customers,Widgets Inc.</pre>
<td>Group</td>
<td>Tenant group (optional)</td>
<td>Customers</td>
</tr>
<tr>
<td>Description</td>
<td>Long-form name or other text (optional)</td>
<td>Widgets Inc.</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>WIDG01,widg01,Customers,Widgets Inc.</pre>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -0,0 +1,34 @@
{% extends '_base.html' %}
{% load render_table from django_tables2 %}
{% load form_helpers %}
{% block content %}
<h1>{% block title %}{% endblock %}</h1>
<div class="row">
<div class="col-md-6">
{% 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 %}
<form action="." method="post" class="form">
{% csrf_token %}
{% render_form form %}
<div class="form-group">
<div class="col-md-12 text-right">
<button type="submit" class="btn btn-primary">Submit</button>
{% if return_url %}
<a href="{% url return_url %}" class="btn btn-default">Cancel</a>
{% endif %}
</div>
</div>
</form>
</div>
<div class="col-md-6">
{% block instructions %}{% endblock %}
</div>
</div>
{% endblock %}