mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-05 11:46:50 -06:00
Merge v2.5 work
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load helpers %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
@@ -95,33 +95,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Install Date</td>
|
||||
<td>
|
||||
{% if circuit.install_date %}
|
||||
{{ circuit.install_date }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ circuit.install_date|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Commit Rate</td>
|
||||
<td>
|
||||
{% if circuit.commit_rate %}
|
||||
{{ circuit.commit_rate|humanize_speed }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ circuit.commit_rate|humanize_speed|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if circuit.description %}
|
||||
{{ circuit.description }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ circuit.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
@@ -41,9 +41,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{% render_field form.site %}
|
||||
{% render_field form.rack %}
|
||||
{% render_field form.device %}
|
||||
{% render_field form.interface %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
@@ -71,6 +68,7 @@
|
||||
</div>
|
||||
{% render_field form.xconnect_id %}
|
||||
{% render_field form.pp_info %}
|
||||
{% render_field form.description %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,10 +39,27 @@
|
||||
<tr>
|
||||
<td>Termination</td>
|
||||
<td>
|
||||
{% if termination.interface %}
|
||||
<a href="{% url 'dcim:device' pk=termination.interface.device.pk %}">{{ termination.interface.device }}</a>
|
||||
<i class="fa fa-angle-right"></i> {{ termination.interface }}
|
||||
{% if termination.cable %}
|
||||
{% if perms.dcim.delete_cable %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'dcim:cable_delete' pk=termination.cable.pk %}?return_url={{ termination.circuit.get_absolute_url }}" title="Remove cable" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i> Disconnect
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ termination.cable.get_absolute_url }}">{{ termination.cable }}</a>
|
||||
{% if termination.connected_endpoint %}
|
||||
to <a href="{% url 'dcim:device' pk=termination.connected_endpoint.device.pk %}">{{ termination.connected_endpoint.device }}</a>
|
||||
<i class="fa fa-angle-right"></i> {{ termination.connected_endpoint }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if perms.circuits.add_cable %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk %}?return_url={{ circuit.get_absolute_url }}" class="btn btn-success btn-xs" title="Connect">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i> Connect
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<span class="text-muted">Not defined</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
@@ -61,37 +78,29 @@
|
||||
<tr>
|
||||
<td>IP Addressing</td>
|
||||
<td>
|
||||
{% if termination.interface %}
|
||||
{% for ip in termination.interface.ip_addresses.all %}
|
||||
{% if termination.connected_endpoint %}
|
||||
{% for ip in termination.connected_endpoint.ip_addresses.all %}
|
||||
{% if not forloop.first %}<br />{% endif %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=ip.pk %}">{{ ip }}</a> ({{ ip.vrf|default:"Global" }})
|
||||
{% empty %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cross-Connect</td>
|
||||
<td>
|
||||
{% if termination.xconnect_id %}
|
||||
{{ termination.xconnect_id }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ termination.xconnect_id|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Patch Panel/Port</td>
|
||||
<td>
|
||||
{% if termination.pp_info %}
|
||||
{{ termination.pp_info }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ termination.pp_info|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ termination.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% else %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block title %}{{ provider }}{% endblock %}
|
||||
@@ -67,23 +67,11 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>ASN</td>
|
||||
<td>
|
||||
{% if provider.asn %}
|
||||
{{ provider.asn }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ provider.asn|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Account</td>
|
||||
<td>
|
||||
{% if provider.account %}
|
||||
{{ provider.account }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ provider.account|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Customer Portal</td>
|
||||
@@ -91,29 +79,17 @@
|
||||
{% if provider.portal_url %}
|
||||
<a href="{{ provider.portal_url }}">{{ provider.portal_url }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NOC Contact</td>
|
||||
<td>
|
||||
{% if provider.noc_contact %}
|
||||
{{ provider.noc_contact|linebreaksbr }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ provider.noc_contact|linebreaksbr|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin Contact</td>
|
||||
<td>
|
||||
{% if provider.admin_contact %}
|
||||
{{ provider.admin_contact|linebreaksbr }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ provider.admin_contact|linebreaksbr|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Circuits</td>
|
||||
@@ -205,7 +181,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'inc/graphs_modal.html' %}
|
||||
{% include 'inc/modal.html' with modal_name='graphs' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% block title %}Disconnect {{ obj_type_plural|bettertitle }}{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to disconnect all {{ selected_objects|length }} of these {{ obj_type_plural }} on <strong>{{ device }}</strong>?</p>
|
||||
<p>Are you sure you want to disconnect these {{ selected_objects|length }} {{ obj_type_plural }}?</p>
|
||||
<ul>
|
||||
{% for obj in selected_objects %}
|
||||
<li>{{ obj }}</li>
|
||||
|
||||
94
netbox/templates/dcim/cable.html
Normal file
94
netbox/templates/dcim/cable.html
Normal file
@@ -0,0 +1,94 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'dcim:cable_list' %}">Cables</a></li>
|
||||
<li>{{ cable }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{% if perms.dcim.change_cable %}
|
||||
<a href="{% url 'dcim:cable_edit' pk=cable.pk %}" class="btn btn-warning">
|
||||
<span class="fa fa-pencil" aria-hidden="true"></span> Edit this cable
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_cable %}
|
||||
<a href="{% url 'dcim:cable_delete' pk=cable.pk %}" class="btn btn-danger">
|
||||
<span class="fa fa-trash" aria-hidden="true"></span> Delete this cable
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}Cable {{ cable }}{% endblock %}</h1>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ cable.get_absolute_url }}">Cable</a>
|
||||
</li>
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'dcim:cable_changelog' pk=cable.pk %}">Changelog</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Cable</strong>
|
||||
</div>
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td>{{ cable.get_type_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>{{ cable.get_status_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Label</td>
|
||||
<td>{{ cable.label|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color</td>
|
||||
<td>
|
||||
{% if cable.color %}
|
||||
<span class="label color-block" style="background-color: #{{ cable.color }}"> </span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Length</td>
|
||||
<td>
|
||||
{% if cable.length %}
|
||||
{{ cable.length }} {{ cable.get_length_unit_display }}
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Termination A</strong>
|
||||
</div>
|
||||
{% include 'dcim/inc/cable_termination.html' with termination=cable.termination_a %}
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Termination B</strong>
|
||||
</div>
|
||||
{% include 'dcim/inc/cable_termination.html' with termination=cable.termination_b %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
158
netbox/templates/dcim/cable_connect.html
Normal file
158
netbox/templates/dcim/cable_connect.html
Normal file
@@ -0,0 +1,158 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static %}
|
||||
{% load helpers %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<form action="." method="post" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% for field in form.hidden_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
{% if form.non_field_errors %}
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading"><strong>Errors</strong></div>
|
||||
<div class="panel-body">
|
||||
{{ form.non_field_errors }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% with termination_a=form.instance.termination_a %}
|
||||
<h3>{% block title %}Connect {{ termination_a.device }} {{ termination_a }}{% endblock %}</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-center">
|
||||
<strong>A Side</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if termination_a.device %}
|
||||
{# Device component #}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Site</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a.device.site }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Rack</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a.device.rack|default:"None" }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Device</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a.device }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Type</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a|model_name|capfirst }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Name</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{# Circuit termination #}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Site</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a.site }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Provider</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a.circuit.provider }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Circuit</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a.circuit.cid }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Side</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ termination_a.term_side }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 text-center" style="padding-top: 90px;">
|
||||
<i class="fa fa-exchange fa-4x"></i>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-center">
|
||||
<strong>B Side</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.termination_b_site %}
|
||||
{% render_field form.termination_b_rack %}
|
||||
{% render_field form.termination_b_device %}
|
||||
</div>
|
||||
</div>
|
||||
{% render_field form.termination_b_type %}
|
||||
{% render_field form.termination_b_id %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><strong>Cable</strong></div>
|
||||
<div class="panel-body">
|
||||
{% render_field form.status %}
|
||||
{% render_field form.type %}
|
||||
{% render_field form.label %}
|
||||
{% render_field form.color %}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="id_length">{{ form.length.label }}</label>
|
||||
<div class="col-md-6">
|
||||
{{ form.length }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{{ form.length_unit }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 text-center">
|
||||
<button type="submit" name="_update" class="btn btn-primary">Connect</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/livesearch.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
23
netbox/templates/dcim/cable_edit.html
Normal file
23
netbox/templates/dcim/cable_edit.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends 'utilities/obj_edit.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block form %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><strong>Cable</strong></div>
|
||||
<div class="panel-body">
|
||||
{% render_field form.type %}
|
||||
{% render_field form.status %}
|
||||
{% render_field form.label %}
|
||||
{% render_field form.color %}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="id_length">{{ form.length.label }}</label>
|
||||
<div class="col-md-6">
|
||||
{{ form.length }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{{ form.length_unit }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
20
netbox/templates/dcim/cable_list.html
Normal file
20
netbox/templates/dcim/cable_list.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load buttons %}
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right">
|
||||
{% if perms.dcim.add_cable %}
|
||||
{% import_button 'dcim:cable_import' %}
|
||||
{% endif %}
|
||||
{% export_button content_type %}
|
||||
</div>
|
||||
<h1>{% block title %}Cables{% endblock %}</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{% include 'utilities/obj_table.html' with bulk_edit_url='dcim:cable_bulk_edit' bulk_delete_url='dcim:cable_bulk_delete' %}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{% include 'inc/search_panel.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
48
netbox/templates/dcim/cable_trace.html
Normal file
48
netbox/templates/dcim/cable_trace.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block header %}
|
||||
<h1>{% block title %}Cable Trace for {{ obj }}{% endblock %}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-1 text-center">
|
||||
<h4>Near End</h4>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-3 text-center">
|
||||
<h4>Far End</h4>
|
||||
</div>
|
||||
</div>
|
||||
{% for near_end, cable, far_end in trace %}
|
||||
<div class="row">
|
||||
<div class="col-md-1 text-right">
|
||||
<h3>{{ forloop.counter }}</h3>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{% include 'dcim/inc/cable_trace_end.html' with end=near_end %}
|
||||
</div>
|
||||
<div class="col-md-3 text-center">
|
||||
{% if cable %}
|
||||
<h4>
|
||||
<a href="{% url 'dcim:cable' pk=cable.pk %}">
|
||||
{% if cable.label %}<code>{{ cable.label }}</code>{% else %}Cable #{{ cable.pk }}{% endif %}
|
||||
</a>
|
||||
</h4>
|
||||
{{ cable.get_status_display }}<br />
|
||||
{{ cable.get_type_display|default:"" }}
|
||||
{% if cable.length %}- {{ cable.length }}{{ cable.get_length_unit_display }}{% endif %}
|
||||
<span class="label color-block center-block" style="background-color: #{{ cable.color }}"> </span>
|
||||
{% else %}
|
||||
<h4 class="text-muted">No Cable</h4>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{% if far_end %}
|
||||
{% include 'dcim/inc/cable_trace_end.html' with end=far_end %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if not forloop.last %}<hr />{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -3,9 +3,6 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right">
|
||||
{% if perms.dcim.change_consoleport %}
|
||||
{% import_button 'dcim:console_connections_import' %}
|
||||
{% endif %}
|
||||
{% export_button content_type %}
|
||||
</div>
|
||||
<h1>{% block title %}Console Connections{% endblock %}</h1>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<form action="." 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">
|
||||
{% 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">{% block title %}Connect {{ consoleport.device }} {{ consoleport }}{% endblock %}</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.console_server %}
|
||||
</div>
|
||||
</div>
|
||||
{% render_field form.cs_port %}
|
||||
{% render_field form.connection_status %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<button type="submit" name="_update" class="btn btn-primary">Connect</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/livesearch.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,8 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Disconnect console port {{ consoleport }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to disconnect this console port from {{ consoleport.cs_port.device }} {{ consoleport.cs_port }}?</p>
|
||||
{% endblock %}
|
||||
@@ -1,55 +0,0 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<form action="." 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">
|
||||
{% 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">{% block title %}Connect {{ consoleserverport.device }} {{ consoleserverport }}{% endblock %}</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.port %}
|
||||
{% render_field form.connection_status %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<button type="submit" name="_update" class="btn btn-primary">Connect</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/livesearch.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,8 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Disconnect {{ consoleserverport.device }} {{ consoleserverport }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to disconnect {{ consoleserverport.connected_console.device }} {{ consoleserverport.connected_console }} from this port?</p>
|
||||
{% endblock %}
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block title %}{{ device }}{% endblock %}
|
||||
@@ -35,6 +35,21 @@
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{% if perms.dcim.change_device %}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Components <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% if perms.dcim.add_consoleport %}<li><a href="{% url 'dcim:consoleport_add' pk=device.pk %}">Console Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_consoleserverport %}<li><a href="{% url 'dcim:consoleserverport_add' pk=device.pk %}">Console Server Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_powerport %}<li><a href="{% url 'dcim:powerport_add' pk=device.pk %}">Power Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_poweroutlet %}<li><a href="{% url 'dcim:poweroutlet_add' pk=device.pk %}">Power Outlets</a></li>{% endif %}
|
||||
{% if perms.dcim.add_interface %}<li><a href="{% url 'dcim:interface_add' pk=device.pk %}">Interfaces</a></li>{% endif %}
|
||||
{% if perms.dcim.add_frontport %}<li><a href="{% url 'dcim:frontport_add' pk=device.pk %}">Front Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_rearport %}<li><a href="{% url 'dcim:rearport_add' pk=device.pk %}">Rear Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_devicebay %}<li><a href="{% url 'dcim:devicebay_add' pk=device.pk %}">Device Bays</a></li>{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<a href="{% url 'dcim:device_edit' pk=device.pk %}" class="btn btn-warning">
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
|
||||
Edit this device
|
||||
@@ -127,7 +142,7 @@
|
||||
{% elif device.rack and device.device_type.u_height %}
|
||||
<span class="label label-warning">Not racked</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -153,23 +168,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serial Number</td>
|
||||
<td>
|
||||
{% if device.serial %}
|
||||
<span>{{ device.serial }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><span>{{ device.serial|placeholder }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset Tag</td>
|
||||
<td>
|
||||
{% if device.asset_tag %}
|
||||
<span>{{ device.asset_tag }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><span>{{ device.asset_tag|placeholder }}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -251,7 +254,7 @@
|
||||
<span>(NAT: {{ device.primary_ip4.nat_outside.address.ip }})</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -266,7 +269,7 @@
|
||||
<span>(NAT: {{ device.primary_ip6.nat_outside.address.ip }})</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -300,55 +303,35 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Console / Power</strong>
|
||||
</div>
|
||||
<table class="table table-hover panel-body component-list">
|
||||
{% for cp in console_ports %}
|
||||
{% include 'dcim/inc/consoleport.html' %}
|
||||
{% empty %}
|
||||
{% if device.device_type.console_port_templates.exists %}
|
||||
<tr>
|
||||
<td colspan="6" class="alert-warning">
|
||||
<i class="fa fa-fw fa-warning"></i> No console ports defined
|
||||
{% if perms.dcim.add_consoleport %}
|
||||
<a href="{% url 'dcim:consoleport_add' pk=device.pk %}" class="btn btn-primary btn-xs pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for pp in power_ports %}
|
||||
{% include 'dcim/inc/powerport.html' %}
|
||||
{% empty %}
|
||||
{% if device.device_type.power_port_templates.exists %}
|
||||
<tr>
|
||||
<td colspan="6" class="alert-warning">
|
||||
<i class="fa fa-fw fa-warning"></i> No power ports defined
|
||||
{% if perms.dcim.add_powerport %}
|
||||
<a href="{% url 'dcim:powerport_add' pk=device.pk %}" class="btn btn-primary btn-xs pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if perms.dcim.add_interface or perms.dcim.add_consoleport or perms.dcim.add_powerport %}
|
||||
<div class="panel-footer text-right">
|
||||
{% if perms.dcim.add_consoleport %}
|
||||
<a href="{% url 'dcim:consoleport_add' pk=device.pk %}" class="btn btn-xs btn-primary">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add console port
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_powerport %}
|
||||
<a href="{% url 'dcim:powerport_add' pk=device.pk %}" class="btn btn-xs btn-primary">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add power port
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if console_ports or power_ports %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Console / Power</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<table class="table table-hover panel-body component-list">
|
||||
{% for cp in console_ports %}
|
||||
{% include 'dcim/inc/consoleport.html' %}
|
||||
{% endfor %}
|
||||
{% for pp in power_ports %}
|
||||
{% include 'dcim/inc/powerport.html' %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if perms.dcim.add_interface or perms.dcim.add_consoleport or perms.dcim.add_powerport %}
|
||||
<div class="panel-footer text-right">
|
||||
{% if perms.dcim.add_consoleport %}
|
||||
<a href="{% url 'dcim:consoleport_add' pk=device.pk %}" class="btn btn-xs btn-primary">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add console port
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_powerport %}
|
||||
<a href="{% url 'dcim:powerport_add' pk=device.pk %}" class="btn btn-xs btn-primary">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add power port
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@@ -501,7 +484,7 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if interfaces or device.device_type.is_network_device %}
|
||||
{% if interfaces %}
|
||||
{% if perms.dcim.change_interface or perms.dcim.delete_interface %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
@@ -527,6 +510,7 @@
|
||||
<th>Description</th>
|
||||
<th>MTU</th>
|
||||
<th>Mode</th>
|
||||
<th>Cable</th>
|
||||
<th colspan="2">Connection</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@@ -534,10 +518,6 @@
|
||||
<tbody>
|
||||
{% for iface in interfaces %}
|
||||
{% include 'dcim/inc/interface.html' %}
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="9" class="text-center text-muted">— No interfaces defined —</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -550,8 +530,8 @@
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if interfaces and perms.dcim.delete_interfaceconnection %}
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:interface_bulk_disconnect' pk=device.pk %}" class="btn btn-danger btn-xs">
|
||||
{% if interfaces and perms.dcim.change_interface %}
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:interface_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -574,7 +554,7 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if cs_ports or device.device_type.is_console_server %}
|
||||
{% if consoleserverports %}
|
||||
{% if perms.dcim.delete_consoleserverport %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
@@ -590,30 +570,27 @@
|
||||
<th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th>
|
||||
{% endif %}
|
||||
<th>Name</th>
|
||||
<th>Cable</th>
|
||||
<th colspan="2">Connection</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for csp in cs_ports %}
|
||||
{% for csp in consoleserverports %}
|
||||
{% include 'dcim/inc/consoleserverport.html' %}
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-muted">— No console server ports defined —</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-footer">
|
||||
{% if cs_ports and perms.dcim.change_consoleport %}
|
||||
{% if consoleserverports and perms.dcim.change_consoleport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleserverport_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleserverport_bulk_disconnect' pk=device.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleserverport_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if cs_ports and perms.dcim.delete_consoleserverport %}
|
||||
{% if consoleserverports and perms.dcim.delete_consoleserverport %}
|
||||
<button type="submit" formaction="{% url 'dcim:consoleserverport_bulk_delete' pk=device.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
|
||||
</button>
|
||||
@@ -632,7 +609,7 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if power_outlets or device.device_type.is_pdu %}
|
||||
{% if poweroutlets %}
|
||||
{% if perms.dcim.delete_poweroutlet %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
@@ -648,30 +625,27 @@
|
||||
<th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th>
|
||||
{% endif %}
|
||||
<th>Name</th>
|
||||
<th>Cable</th>
|
||||
<th colspan="2">Connection</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for po in power_outlets %}
|
||||
{% for po in poweroutlets %}
|
||||
{% include 'dcim/inc/poweroutlet.html' %}
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-muted">— No power outlets defined —</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-footer">
|
||||
{% if power_outlets and perms.dcim.change_powerport %}
|
||||
{% if poweroutlets and perms.dcim.change_powerport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:poweroutlet_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' pk=device.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if power_outlets and perms.dcim.delete_poweroutlet %}
|
||||
{% if poweroutlets and perms.dcim.delete_poweroutlet %}
|
||||
<button type="submit" formaction="{% url 'dcim:poweroutlet_bulk_delete' pk=device.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
|
||||
</button>
|
||||
@@ -690,16 +664,123 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if front_ports %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Front Ports</strong>
|
||||
</div>
|
||||
<table class="table table-hover table-headings panel-body component-list">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if perms.dcim.change_frontport or perms.dcim.delete_frontport %}
|
||||
<th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th>
|
||||
{% endif %}
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Rear Port</th>
|
||||
<th>Position</th>
|
||||
<th>Description</th>
|
||||
<th>Connected Cable</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for frontport in front_ports %}
|
||||
{% include 'dcim/inc/frontport.html' %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-footer">
|
||||
{% if front_ports and perms.dcim.change_frontport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:frontport_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:frontport_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if front_ports and perms.dcim.delete_frontport %}
|
||||
<button type="submit" formaction="{% url 'dcim:frontport_bulk_delete' pk=device.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_frontport %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'dcim:frontport_add' pk=device.pk %}" class="btn btn-primary btn-xs">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add front ports
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if rear_ports %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Rear Ports</strong>
|
||||
</div>
|
||||
<table class="table table-hover table-headings panel-body component-list">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if perms.dcim.change_rearport or perms.dcim.delete_rearport %}
|
||||
<th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th>
|
||||
{% endif %}
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Positions</th>
|
||||
<th>Description</th>
|
||||
<th>Connected Cable</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for rearport in rear_ports %}
|
||||
{% include 'dcim/inc/rearport.html' %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-footer">
|
||||
{% if rear_ports and perms.dcim.change_rearport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:rearport_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:rearport_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if rear_ports and perms.dcim.delete_rearport %}
|
||||
<button type="submit" formaction="{% url 'dcim:rearport_bulk_delete' pk=device.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_rearport %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'dcim:rearport_add' pk=device.pk %}" class="btn btn-primary btn-xs">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add rear ports
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% include 'inc/graphs_modal.html' %}
|
||||
{% include 'inc/modal.html' with modal_name='graphs' %}
|
||||
{% include 'secrets/inc/private_key_modal.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script type="text/javascript">
|
||||
function toggleConnection(elem, api_url) {
|
||||
var url = netbox_api_path + api_url + elem.attr('data') + "/";
|
||||
function toggleConnection(elem) {
|
||||
var url = netbox_api_path + "dcim/cables/" + elem.attr('data') + "/";
|
||||
if (elem.hasClass('connected')) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
@@ -709,7 +790,7 @@ function toggleConnection(elem, api_url) {
|
||||
xhr.setRequestHeader("X-CSRFToken", "{{ csrf_token }}");
|
||||
},
|
||||
data: {
|
||||
'connection_status': 'False'
|
||||
'status': 'False'
|
||||
},
|
||||
context: this,
|
||||
success: function() {
|
||||
@@ -728,7 +809,7 @@ function toggleConnection(elem, api_url) {
|
||||
xhr.setRequestHeader("X-CSRFToken", "{{ csrf_token }}");
|
||||
},
|
||||
data: {
|
||||
'connection_status': 'True'
|
||||
'status': 'True'
|
||||
},
|
||||
context: this,
|
||||
success: function() {
|
||||
@@ -741,14 +822,8 @@ function toggleConnection(elem, api_url) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$(".consoleport-toggle").click(function() {
|
||||
return toggleConnection($(this), "dcim/console-ports/");
|
||||
});
|
||||
$(".powerport-toggle").click(function() {
|
||||
return toggleConnection($(this), "dcim/power-ports/");
|
||||
});
|
||||
$(".interface-toggle").click(function() {
|
||||
return toggleConnection($(this), "dcim/interface-connections/");
|
||||
$(".cable-toggle").click(function() {
|
||||
return toggleConnection($(this));
|
||||
});
|
||||
// Toggle the display of IP addresses under interfaces
|
||||
$('button.toggle-ips').click(function() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'dcim/device.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ device }} - Config{% endblock %}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends 'dcim/device.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block title %}{{ device }} - Inventory{% endblock %}
|
||||
|
||||
@@ -16,23 +17,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serial Number</td>
|
||||
<td>
|
||||
{% if device.serial %}
|
||||
<span>{{ device.serial }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><span>{{ device.serial|placeholder }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset Tag</td>
|
||||
<td>
|
||||
{% if device.asset_tag %}
|
||||
<span>{{ device.asset_tag }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><span>{{ device.asset_tag|placeholder }}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -22,15 +22,13 @@
|
||||
{% for iface in interfaces %}
|
||||
<tr id="{{ iface.name }}">
|
||||
<td>{{ iface }}</td>
|
||||
{% if iface.connection %}
|
||||
{% with iface.connected_interface as connected_iface %}
|
||||
<td class="configured_device" data="{{ connected_iface.device }}">
|
||||
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
|
||||
</td>
|
||||
<td class="configured_interface" data="{{ connected_iface }}">
|
||||
<span title="{{ connected_iface.get_form_factor_display }}">{{ connected_iface }}</span>
|
||||
</td>
|
||||
{% endwith %}
|
||||
{% if iface.connected_endpoint %}
|
||||
<td class="configured_device" data="{{ iface.connected_endpoint.device }}">
|
||||
<a href="{% url 'dcim:device' pk=iface.connected_endpoint.device.pk %}">{{ iface.connected_endpoint.device }}</a>
|
||||
</td>
|
||||
<td class="configured_interface" data="{{ iface.connected_endpoint }}">
|
||||
<span title="{{ iface.connected_endpoint.get_form_factor_display }}">{{ iface.connected_endpoint }}</span>
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2">None</td>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'dcim/device.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ device }} - Status{% endblock %}
|
||||
|
||||
|
||||
@@ -15,12 +15,27 @@
|
||||
</div>
|
||||
{% if perms.dcim.change_devicetype or perms.dcim.delete_devicetype %}
|
||||
<div class="pull-right">
|
||||
{% if perms.dcim.change_devicetype %}
|
||||
{% if perms.dcim.change_devicetype %}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Components <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% if perms.dcim.add_consoleporttemplate %}<li><a href="{% url 'dcim:devicetype_add_consoleport' pk=devicetype.pk %}">Console Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_consoleserverporttemplate %}<li><a href="{% url 'dcim:devicetype_add_consoleserverport' pk=devicetype.pk %}">Console Server Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_powerporttemplate %}<li><a href="{% url 'dcim:devicetype_add_powerport' pk=devicetype.pk %}">Power Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_poweroutlettemplate %}<li><a href="{% url 'dcim:devicetype_add_poweroutlet' pk=devicetype.pk %}">Power Outlets</a></li>{% endif %}
|
||||
{% if perms.dcim.add_interfacetemplate %}<li><a href="{% url 'dcim:devicetype_add_interface' pk=devicetype.pk %}">Interfaces</a></li>{% endif %}
|
||||
{% if perms.dcim.add_frontporttemplate %}<li><a href="{% url 'dcim:devicetype_add_frontport' pk=devicetype.pk %}">Front Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_rearporttemplate %}<li><a href="{% url 'dcim:devicetype_add_rearport' pk=devicetype.pk %}">Rear Ports</a></li>{% endif %}
|
||||
{% if perms.dcim.add_devicebaytemplate %}<li><a href="{% url 'dcim:devicetype_add_devicebay' pk=devicetype.pk %}">Device Bays</a></li>{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<a href="{% url 'dcim:devicetype_edit' pk=devicetype.pk %}" class="btn btn-warning">
|
||||
<span class="fa fa-pencil" aria-hidden="true"></span>
|
||||
Edit this device type
|
||||
<span class="fa fa-pencil" aria-hidden="true"></span>
|
||||
Edit this device type
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_devicetype %}
|
||||
<a href="{% url 'dcim:devicetype_delete' pk=devicetype.pk %}" class="btn btn-danger">
|
||||
<span class="fa fa-trash" aria-hidden="true"></span>
|
||||
@@ -43,7 +58,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Chassis</strong>
|
||||
@@ -62,13 +77,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part Number</td>
|
||||
<td>
|
||||
{% if devicetype.part_number %}
|
||||
{{ devicetype.part_number }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ devicetype.part_number|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Height (U)</td>
|
||||
@@ -85,8 +94,16 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Interface Ordering</td>
|
||||
<td>{{ devicetype.get_interface_ordering_display }}</td>
|
||||
<td>Parent/Child</td>
|
||||
<td>
|
||||
{% if devicetype.subdevice_role == True %}
|
||||
<label class="label label-primary">Parent</label>
|
||||
{% elif devicetype.subdevice_role == False %}
|
||||
<label class="label label-info">Child</label>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Instances</td>
|
||||
@@ -94,73 +111,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Function</strong>
|
||||
</div>
|
||||
<table class="table table-hover panel-body">
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
{% if devicetype.is_console_server %}
|
||||
<i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
|
||||
{% else %}
|
||||
<i class="glyphicon glyphicon-remove text-danger" title="No"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Console Server</strong><br />
|
||||
<small class="text-muted">This device {% if devicetype.is_console_server %}has{% else %}does not have{% endif %} console server ports</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
{% if devicetype.is_pdu %}
|
||||
<i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
|
||||
{% else %}
|
||||
<i class="glyphicon glyphicon-remove text-danger" title="No"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<strong>PDU</strong><br />
|
||||
<small class="text-muted">This device {% if devicetype.is_pdu %}has{% else %}does not have{% endif %} power outlets</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
{% if devicetype.is_network_device %}
|
||||
<i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
|
||||
{% else %}
|
||||
<i class="glyphicon glyphicon-remove text-danger" title="No"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Network Device</strong><br />
|
||||
<small class="text-muted">This device {% if devicetype.is_network_device %}has{% else %}does not have{% endif %} network interfaces</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
{% if devicetype.subdevice_role == True %}
|
||||
<label class="label label-primary">Parent</label>
|
||||
{% elif devicetype.subdevice_role == False %}
|
||||
<label class="label label-info">Child</label>
|
||||
{% else %}
|
||||
<label class="label label-default">None</label>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Parent/Child</strong><br />
|
||||
{% if devicetype.subdevice_role == True %}
|
||||
<small class="text-muted">This device has device bays for mounting child devices</small>
|
||||
{% elif devicetype.subdevice_role == False %}
|
||||
<small class="text-muted">This device can only be mounted in a parent device</small>
|
||||
{% else %}
|
||||
<small class="text-muted">This device does not have device bays</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'inc/custom_fields_panel.html' with obj=devicetype %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=devicetype.tags.all url='dcim:devicetype_list' %}
|
||||
<div class="panel panel-default">
|
||||
@@ -176,21 +128,53 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleport_table title='Console Ports' add_url='dcim:devicetype_add_consoleport' delete_url='dcim:devicetype_delete_consoleport' %}
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=powerport_table title='Power Ports' add_url='dcim:devicetype_add_powerport' delete_url='dcim:devicetype_delete_powerport' %}
|
||||
{% if devicetype.is_parent_device or devicebay_table.rows %}
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=devicebay_table title='Device Bays' add_url='dcim:devicetype_add_devicebay' delete_url='dcim:devicetype_delete_devicebay' %}
|
||||
{% endif %}
|
||||
{% if devicetype.is_network_device or interface_table.rows %}
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=interface_table title='Interfaces' add_url='dcim:devicetype_add_interface' edit_url='dcim:devicetype_bulkedit_interface' delete_url='dcim:devicetype_delete_interface' %}
|
||||
{% endif %}
|
||||
{% if devicetype.is_console_server or consoleserverport_table.rows %}
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleserverport_table title='Console Server Ports' add_url='dcim:devicetype_add_consoleserverport' delete_url='dcim:devicetype_delete_consoleserverport' %}
|
||||
{% endif %}
|
||||
{% if devicetype.is_pdu or poweroutlet_table.rows %}
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=poweroutlet_table title='Power Outlets' add_url='dcim:devicetype_add_poweroutlet' delete_url='dcim:devicetype_delete_poweroutlet' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if devicetype.consoleport_templates.exists or devicetype.powerport_templates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleport_table title='Console Ports' add_url='dcim:devicetype_add_consoleport' delete_url='dcim:devicetype_delete_consoleport' %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=powerport_table title='Power Ports' add_url='dcim:devicetype_add_powerport' delete_url='dcim:devicetype_delete_powerport' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.is_parent_device or devicebay_table.rows %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=devicebay_table title='Device Bays' add_url='dcim:devicetype_add_devicebay' delete_url='dcim:devicetype_delete_devicebay' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.consoleserverport_templates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleserverport_table title='Console Server Ports' add_url='dcim:devicetype_add_consoleserverport' delete_url='dcim:devicetype_delete_consoleserverport' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.poweroutlet_templates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=poweroutlet_table title='Power Outlets' add_url='dcim:devicetype_add_poweroutlet' delete_url='dcim:devicetype_delete_poweroutlet' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.interface_templates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=interface_table title='Interfacaes' add_url='dcim:devicetype_add_interface' delete_url='dcim:devicetype_delete_interface' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.frontport_templates.exists or devicetype.rearport_templates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=front_port_table title='Front Ports' add_url='dcim:devicetype_add_frontport' delete_url='dcim:devicetype_delete_frontport' %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=rear_port_table title='Rear Ports' add_url='dcim:devicetype_add_rearport' delete_url='dcim:devicetype_delete_rearport' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,15 +11,6 @@
|
||||
{% render_field form.part_number %}
|
||||
{% render_field form.u_height %}
|
||||
{% render_field form.is_full_depth %}
|
||||
{% render_field form.interface_ordering %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><strong>Function</strong></div>
|
||||
<div class="panel-body">
|
||||
{% render_field form.is_console_server %}
|
||||
{% render_field form.is_pdu %}
|
||||
{% render_field form.is_network_device %}
|
||||
{% render_field form.subdevice_role %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
36
netbox/templates/dcim/inc/cable_termination.html
Normal file
36
netbox/templates/dcim/inc/cable_termination.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% load helpers %}
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
{% if termination.device %}
|
||||
{# Device component #}
|
||||
<tr>
|
||||
<td>Device</td>
|
||||
<td>
|
||||
<a href="{{ termination.device.get_absolute_url }}">{{ termination.device }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td>
|
||||
{{ termination|model_name|capfirst }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Component</td>
|
||||
<td>{{ termination }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
{# Circuit termination #}
|
||||
<tr>
|
||||
<td>Provider</td>
|
||||
<td>
|
||||
<a href="{{ termination.circuit.provider.get_absolute_url }}">{{ termination.circuit.provider }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Circuit</td>
|
||||
<td>
|
||||
<a href="{{ termination.circuit.get_absolute_url }}">{{ termination.circuit }}</a> (Side {{ termination.term_side }})
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
16
netbox/templates/dcim/inc/cable_toggle_buttons.html
Normal file
16
netbox/templates/dcim/inc/cable_toggle_buttons.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% if perms.dcim.change_cable %}
|
||||
{% if cable.status %}
|
||||
<a href="#" class="btn btn-warning btn-xs cable-toggle connected" title="Mark planned" data="{{ cable.pk }}">
|
||||
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#" class="btn btn-success btn-xs cable-toggle" title="Mark installed" data="{{ cable.pk }}">
|
||||
<i class="fa fa-plug" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_cable %}
|
||||
<a href="{% url 'dcim:cable_delete' pk=cable.pk %}?return_url={{ device.get_absolute_url }}" title="Remove cable" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
27
netbox/templates/dcim/inc/cable_trace_end.html
Normal file
27
netbox/templates/dcim/inc/cable_trace_end.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% load helpers %}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-center">
|
||||
{% if end.device %}
|
||||
<strong><a href="{{ end.device.get_absolute_url }}">{{ end.device }}</a></strong>
|
||||
{% else %}
|
||||
<strong><a href="{{ end.circuit.get_absolute_url }}">{{ end.circuit }}</a></strong>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel-body text-center">
|
||||
{% if end.device %}
|
||||
{# Device component #}
|
||||
{% with model=end|model_name %}
|
||||
<strong>{{ model|bettertitle }} {{ end }}</strong><br />
|
||||
{% if model == 'interface' %}
|
||||
{{ end.get_form_factor_display }}
|
||||
{% elif model == 'front port' or model == 'rear port' %}
|
||||
{{ end.get_type_display }}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{# Circuit termination #}
|
||||
<strong>Side {{ end.term_side }}</strong>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,45 +1,49 @@
|
||||
<tr class="consoleport{% if cp.cs_port and not cp.connection_status %} info{% endif %}">
|
||||
<tr class="consoleport{% if cp.cable.status %} success{% elif cp.cable %} info{% endif %}">
|
||||
|
||||
{# Name #}
|
||||
<td>
|
||||
<i class="fa fa-fw fa-keyboard-o"></i> {{ cp }}
|
||||
</td>
|
||||
{% if cp.cs_port %}
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if cp.cable %}
|
||||
<a href="{{ cp.cable.get_absolute_url }}">{{ cp.cable }}</a>
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{# Connection #}
|
||||
{% if cp.connected_endpoint %}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=cp.cs_port.device.pk %}">{{ cp.cs_port.device }}</a>
|
||||
<a href="{% url 'dcim:device' pk=cp.connected_endpoint.device.pk %}">{{ cp.connected_endpoint.device }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ cp.cs_port }}
|
||||
{{ cp.connected_endpoint }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2">
|
||||
<span class="text-muted">Not connected</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Actions #}
|
||||
<td class="text-right">
|
||||
{% if cp.cable %}
|
||||
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=cp.cable %}
|
||||
{% elif perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:consoleport_connect' termination_a_id=cp.pk %}?return_url={{ device.get_absolute_url }}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_consoleport %}
|
||||
{% if cp.cs_port %}
|
||||
{% if cp.connection_status %}
|
||||
<a href="#" class="btn btn-warning btn-xs consoleport-toggle connected" title="Mark planned" data="{{ cp.pk }}">
|
||||
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#" class="btn btn-success btn-xs consoleport-toggle" title="Mark installed" data="{{ cp.pk }}">
|
||||
<i class="fa fa-plug" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:consoleport_disconnect' pk=cp.pk %}" title="Delete connection" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'dcim:consoleport_connect' pk=cp.pk %}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:consoleport_edit' pk=cp.pk %}" title="Edit port" class="btn btn-info btn-xs">
|
||||
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_consoleport %}
|
||||
{% if cp.cs_port %}
|
||||
{% if cp.connected_endpoint %}
|
||||
<button class="btn btn-danger btn-xs" disabled="disabled">
|
||||
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
||||
</button>
|
||||
|
||||
@@ -1,50 +1,56 @@
|
||||
<tr class="consoleserverport{% if csp.connected_console and not csp.connected_console.connection_status %} info{% endif %}">
|
||||
<tr class="consoleserverport{% if csp.cable.status %} success{% elif csp.cable %} info{% endif %}">
|
||||
|
||||
{# Checkbox #}
|
||||
{% if perms.dcim.change_consoleserverport or perms.dcim.delete_consoleserverport %}
|
||||
<td class="pk">
|
||||
<input name="pk" type="checkbox" value="{{ csp.pk }}" />
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Name #}
|
||||
<td>
|
||||
<i class="fa fa-fw fa-keyboard-o"></i> {{ csp }}
|
||||
</td>
|
||||
{% if csp.connected_console %}
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if csp.cable %}
|
||||
<a href="{{ csp.cable.get_absolute_url }}">{{ csp.cable }}</a>
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{# Connection #}
|
||||
{% if csp.connected_endpoint %}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=csp.connected_console.device.pk %}">{{ csp.connected_console.device }}</a>
|
||||
<a href="{% url 'dcim:device' pk=csp.connected_endpoint.device.pk %}">{{ csp.connected_endpoint.device }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ csp.connected_console }}
|
||||
{{ csp.connected_endpoint }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2">
|
||||
<span class="text-muted">Not connected</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Actions #}
|
||||
<td class="text-right">
|
||||
{% if csp.cable %}
|
||||
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=csp.cable %}
|
||||
{% elif perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:consoleserverport_connect' termination_a_id=csp.pk %}?return_url={{ device.get_absolute_url }}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_consoleserverport %}
|
||||
{% if csp.connected_console %}
|
||||
{% if csp.connected_console.connection_status %}
|
||||
<a href="#" class="btn btn-warning btn-xs consoleport-toggle connected" title="Mark planned" data="{{ csp.connected_console.pk }}">
|
||||
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#" class="btn btn-success btn-xs consoleport-toggle" title="Mark installed" data="{{ csp.connected_console.pk }}">
|
||||
<i class="fa fa-plug" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:consoleserverport_disconnect' pk=csp.pk %}" title="Delete connection" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'dcim:consoleserverport_connect' pk=csp.pk %}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:consoleserverport_edit' pk=csp.pk %}" title="Edit port" class="btn btn-info btn-xs">
|
||||
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_consoleserverport %}
|
||||
{% if csp.connected_console %}
|
||||
{% if csp.connected_endpoint %}
|
||||
<button class="btn btn-danger btn-xs" disabled="disabled">
|
||||
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
||||
</button>
|
||||
|
||||
55
netbox/templates/dcim/inc/frontport.html
Normal file
55
netbox/templates/dcim/inc/frontport.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{% load helpers %}
|
||||
<tr class="frontport{% if frontport.cable.status %} success{% elif frontport.cable %} info{% endif %}">
|
||||
|
||||
{# Checkbox #}
|
||||
{% if perms.dcim.change_frontport or perms.dcim.delete_frontport %}
|
||||
<td class="pk">
|
||||
<input name="pk" type="checkbox" value="{{ frontport.pk }}" />
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Name #}
|
||||
<td>
|
||||
<i class="fa fa-fw fa-square{% if not frontport.cable %}-o{% endif %}"></i> {{ frontport }}
|
||||
</td>
|
||||
|
||||
{# Type #}
|
||||
<td>{{ frontport.get_type_display }}</td>
|
||||
|
||||
{# Rear port #}
|
||||
<td>{{ frontport.rear_port }}</td>
|
||||
<td>{{ frontport.rear_port_position }}</td>
|
||||
|
||||
{# Description #}
|
||||
<td>{{ frontport.description|placeholder }}</td>
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if frontport.cable %}
|
||||
<a href="{{ frontport.cable.get_absolute_url }}">{{ frontport.cable }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Not connected</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{# Actions #}
|
||||
<td class="text-right">
|
||||
{% if frontport.cable %}
|
||||
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=frontport.cable %}
|
||||
{% elif perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:frontport_connect' termination_a_id=frontport.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-success btn-xs" title="Connect">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_frontport %}
|
||||
<a href="{% url 'dcim:frontport_edit' pk=frontport.pk %}?return_url={{ device.get_absolute_url }}" title="Edit port" class="btn btn-info btn-xs">
|
||||
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_frontport %}
|
||||
<a href="{% url 'dcim:frontport_delete' pk=frontport.pk %}?return_url={{ device.get_absolute_url }}" title="Delete port" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1,5 +1,5 @@
|
||||
{% load helpers %}
|
||||
<tr class="interface{% if not iface.enabled %} danger{% elif iface.connection and iface.connection.connection_status or iface.circuit_termination %} success{% elif iface.connection and not iface.connection.connection_status %} info{% elif iface.is_virtual %} warning{% endif %}" id="interface_{{ iface.name }}">
|
||||
<tr class="interface{% if not iface.enabled %} danger{% elif iface.cable.status %} success{% elif iface.cable %} info{% elif iface.is_virtual %} warning{% endif %}" id="iface_{{ iface.name }}">
|
||||
|
||||
{# Checkbox #}
|
||||
{% if perms.dcim.change_interface or perms.dcim.delete_interface %}
|
||||
@@ -8,8 +8,8 @@
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Icon/name/MAC #}
|
||||
<td>
|
||||
{# Icon and name #}
|
||||
<td class="text-nowrap">
|
||||
<span title="{{ iface.get_form_factor_display }}">
|
||||
<i class="fa fa-fw fa-{% if iface.mgmt_only %}wrench{% elif iface.is_lag %}align-justify{% elif iface.is_virtual %}circle{% elif iface.is_wireless %}wifi{% else %}exchange{% endif %}"></i>
|
||||
<a href="{{ iface.get_absolute_url }}">{{ iface }}</a>
|
||||
@@ -44,6 +44,18 @@
|
||||
{# 802.1Q mode #}
|
||||
<td>{{ iface.get_mode_display|default:"—" }}</td>
|
||||
|
||||
{# Cable #}
|
||||
<td class="text-nowrap">
|
||||
{% if iface.cable %}
|
||||
<a href="{{ iface.cable.get_absolute_url }}">{{ iface.cable }}</a>
|
||||
<a href="{% url 'dcim:interface_trace' pk=iface.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||
<i class="fa fa-share-alt" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{# Connection or type #}
|
||||
{% if iface.is_lag %}
|
||||
<td colspan="2" class="text-muted">
|
||||
@@ -60,30 +72,38 @@
|
||||
<td colspan="2" class="text-muted">Virtual interface</td>
|
||||
{% elif iface.is_wireless %}
|
||||
<td colspan="2" class="text-muted">Wireless interface</td>
|
||||
{% elif iface.connection %}
|
||||
{% with iface.connected_interface as connected_iface %}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'dcim:interface' pk=connected_iface.pk %}"><span title="{{ connected_iface.get_form_factor_display }}">{{ connected_iface }}</span></a>
|
||||
</td>
|
||||
{% endwith %}
|
||||
{% elif iface.circuit_termination %}
|
||||
{% with iface.circuit_termination.get_peer_termination as peer_termination %}
|
||||
<td colspan="2">
|
||||
<i class="fa fa-fw fa-globe" title="Circuit"></i>
|
||||
{% if peer_termination %}
|
||||
{% if peer_termination.interface %}
|
||||
<a href="{% url 'dcim:device' pk=peer_termination.interface.device.pk %}">{{ peer_termination.interface.device }}</a>
|
||||
(<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a>)
|
||||
{% else %}
|
||||
{% elif iface.connected_endpoint.name %}
|
||||
{# Connected to an Interface #}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=iface.connected_endpoint.device.pk %}">{{ iface.connected_endpoint.device }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'dcim:interface' pk=iface.connected_endpoint.pk %}"><span title="{{ iface.connected_endpoint.get_form_factor_display }}">{{ iface.connected_endpoint }}</span></a>
|
||||
</td>
|
||||
{% elif iface.connected_endpoint.term_side %}
|
||||
{# Connected to a CircuitTermination #}
|
||||
{% with iface.connected_endpoint.get_peer_termination as peer_termination %}
|
||||
{% if peer_termination %}
|
||||
{% if peer_termination.connected_endpoint %}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=peer_termination.connected_endpoint.device.pk %}">{{ peer_termination.connected_endpoint.device }}</a><br/>
|
||||
<small>via <i class="fa fa-fw fa-globe" title="Circuit"></i> <a href="{% url 'circuits:circuit' pk=iface.connected_endpoint.circuit_id %}">{{ iface.connected_endpoint.circuit }}</a></small>
|
||||
</td>
|
||||
<td>
|
||||
{{ peer_termination.connected_endpoint }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2">
|
||||
<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a>
|
||||
{% endif %}
|
||||
via
|
||||
via <i class="fa fa-fw fa-globe" title="Circuit"></i> <a href="{% url 'circuits:circuit' pk=iface.connected_endpoint.circuit_id %}">{{ iface.connected_endpoint.circuit }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<a href="{% url 'circuits:circuit' pk=iface.circuit_termination.circuit_id %}">{{ iface.circuit_termination.circuit }}</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2">
|
||||
<i class="fa fa-fw fa-globe" title="Circuit"></i>
|
||||
<a href="{% url 'circuits:circuit' pk=iface.connected_endpoint.circuit_id %}">{{ iface.connected_endpoint.circuit }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<td colspan="2">
|
||||
@@ -94,7 +114,7 @@
|
||||
{# Buttons #}
|
||||
<td class="text-right text-nowrap">
|
||||
{% if show_graphs %}
|
||||
{% if iface.circuit_termination or iface.connection %}
|
||||
{% if iface.connected_endpoint %}
|
||||
<button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#graphs_modal" data-obj="{{ device.name }} - {{ iface.name }}" data-url="{% url 'dcim-api:interface-graphs' pk=iface.pk %}" title="Show graphs">
|
||||
<i class="glyphicon glyphicon-signal" aria-hidden="true"></i>
|
||||
</button>
|
||||
@@ -106,32 +126,12 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_interface %}
|
||||
{% if not iface.is_virtual %}
|
||||
{% if iface.connection %}
|
||||
{% if iface.connection.connection_status %}
|
||||
<a href="#" class="btn btn-warning btn-xs interface-toggle connected" data="{{ iface.connection.pk }}" title="Mark planned">
|
||||
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#" class="btn btn-success btn-xs interface-toggle" data="{{ iface.connection.pk }}" title="Mark installed">
|
||||
<i class="fa fa-plug" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:interfaceconnection_delete' pk=iface.connection.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs" title="Disconnect">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% elif iface.circuit_termination and perms.circuits.change_circuittermination %}
|
||||
<button class="btn btn-warning btn-xs interface-toggle connected" disabled="disabled" title="Circuits cannot be marked as planned or connected">
|
||||
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
|
||||
</button>
|
||||
<a href="{% url 'circuits:circuittermination_edit' pk=iface.circuit_termination.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs" title="Edit circuit termination">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'dcim:interfaceconnection_add' pk=device.pk %}?interface_a={{ iface.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-success btn-xs" title="Connect">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if iface.cable %}
|
||||
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=iface.cable %}
|
||||
{% elif not iface.is_virtual and perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:interface_connect' termination_a_id=iface.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-success btn-xs" title="Connect">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% if iface.device_id %}{% url 'dcim:interface_edit' pk=iface.pk %}{% else %}{% url 'virtualization:interface_edit' pk=iface.pk %}{% endif %}?return_url={{ device.get_absolute_url }}" class="btn btn-info btn-xs" title="Edit interface">
|
||||
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
||||
@@ -160,7 +160,7 @@
|
||||
{% endif %}
|
||||
|
||||
{# IP addresses table #}
|
||||
<td colspan="8" style="padding: 0">
|
||||
<td colspan="9" style="padding: 0">
|
||||
<table class="table table-condensed interface-ips">
|
||||
<thead>
|
||||
<tr class="text-muted">
|
||||
|
||||
@@ -1,50 +1,56 @@
|
||||
<tr class="poweroutlet{% if po.connected_port and not po.connected_port.connection_status %} info{% endif %}">
|
||||
<tr class="poweroutlet{% if po.cable.status %} success{% elif po.cable %} info{% endif %}">
|
||||
|
||||
{# Checkbox #}
|
||||
{% if perms.dcim.change_poweroutlet or perms.dcim.delete_poweroutlet %}
|
||||
<td class="pk">
|
||||
<input name="pk" type="checkbox" value="{{ po.pk }}" />
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Name #}
|
||||
<td>
|
||||
<i class="fa fa-fw fa-bolt"></i> {{ po }}
|
||||
</td>
|
||||
{% if po.connected_port %}
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if po.cable %}
|
||||
<a href="{{ po.cable.get_absolute_url }}">{{ po.cable }}</a>
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{# Connection #}
|
||||
{% if po.connected_endpoint %}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=po.connected_port.device.pk %}">{{ po.connected_port.device }}</a>
|
||||
<a href="{% url 'dcim:device' pk=po.connected_endpoint.device.pk %}">{{ po.connected_endpoint.device }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ po.connected_port }}
|
||||
{{ po.connected_endpoint }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2">
|
||||
<span class="text-muted">Not connected</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Actions #}
|
||||
<td class="text-right">
|
||||
{% if po.cable %}
|
||||
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=po.cable %}
|
||||
{% elif perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:poweroutlet_connect' termination_a_id=po.pk %}?return_url={{ device.get_absolute_url }}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_poweroutlet %}
|
||||
{% if po.connected_port %}
|
||||
{% if po.connected_port.connection_status %}
|
||||
<a href="#" class="btn btn-warning btn-xs powerport-toggle connected" title="Mark planned" data="{{ po.connected_port.pk }}">
|
||||
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#" class="btn btn-success btn-xs powerport-toggle" title="Mark installed" data="{{ po.connected_port.pk }}">
|
||||
<i class="fa fa-plug" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:poweroutlet_disconnect' pk=po.pk %}" title="Delete connection" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'dcim:poweroutlet_connect' pk=po.pk %}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:poweroutlet_edit' pk=po.pk %}" title="Edit outlet" class="btn btn-info btn-xs">
|
||||
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_poweroutlet %}
|
||||
{% if po.connected_port %}
|
||||
{% if po.connected_endpoint %}
|
||||
<button class="btn btn-danger btn-xs" disabled="disabled">
|
||||
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
||||
</button>
|
||||
|
||||
@@ -1,45 +1,49 @@
|
||||
<tr class="powerport{% if pp.power_outlet and not pp.connection_status %} info{% endif %}">
|
||||
<tr class="powerport{% if pp.cable.status %} success{% elif pp.cable %} info{% endif %}">
|
||||
|
||||
{# Name #}
|
||||
<td>
|
||||
<i class="fa fa-fw fa-bolt"></i> {{ pp }}
|
||||
</td>
|
||||
{% if pp.power_outlet %}
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if pp.cable %}
|
||||
<a href="{{ pp.cable.get_absolute_url }}">{{ pp.cable }}</a>
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{# Connection #}
|
||||
{% if pp.connected_endpoint %}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=pp.power_outlet.device.pk %}">{{ pp.power_outlet.device }}</a>
|
||||
<a href="{% url 'dcim:device' pk=pp.connected_endpoint.device.pk %}">{{ pp.connected_endpoint.device }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ pp.power_outlet }}
|
||||
{{ pp.connected_endpoint }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2">
|
||||
<span class="text-muted">Not connected</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Actions #}
|
||||
<td class="text-right">
|
||||
{% if perms.dcim.change_powerport %}
|
||||
{% if pp.power_outlet %}
|
||||
{% if pp.connection_status %}
|
||||
<a href="#" class="btn btn-warning btn-xs powerport-toggle connected" title="Mark planned" data="{{ pp.pk }}">
|
||||
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#" class="btn btn-success btn-xs powerport-toggle" title="Mark installed" data="{{ pp.pk }}">
|
||||
<i class="fa fa-plug" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:powerport_disconnect' pk=pp.pk %}" title="Delete connection" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
|
||||
{% if pp.cable %}
|
||||
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=pp.cable %}
|
||||
{% elif perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:powerport_connect' termination_a_id=pp.pk %}?return_url={{ device.get_absolute_url }}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'dcim:powerport_connect' pk=pp.pk %}" title="Connect" class="btn btn-success btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_powerport %}
|
||||
<a href="{% url 'dcim:powerport_edit' pk=pp.pk %}" title="Edit port" class="btn btn-info btn-xs">
|
||||
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_powerport %}
|
||||
{% if pp.power_outlet %}
|
||||
{% if pp.connected_endpoint %}
|
||||
<button class="btn btn-danger btn-xs" disabled="disabled">
|
||||
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
||||
</button>
|
||||
|
||||
54
netbox/templates/dcim/inc/rearport.html
Normal file
54
netbox/templates/dcim/inc/rearport.html
Normal file
@@ -0,0 +1,54 @@
|
||||
{% load helpers %}
|
||||
<tr class="rearport{% if rearport.cable.status %} success{% elif rearport.cable %} info{% endif %}">
|
||||
|
||||
{# Checkbox #}
|
||||
{% if perms.dcim.change_rearport or perms.dcim.delete_rearport %}
|
||||
<td class="pk">
|
||||
<input name="pk" type="checkbox" value="{{ rearport.pk }}" />
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Name #}
|
||||
<td>
|
||||
<i class="fa fa-fw fa-square{% if not rearport.cable %}-o{% endif %}"></i> {{ rearport }}
|
||||
</td>
|
||||
|
||||
{# Type #}
|
||||
<td>{{ rearport.get_type_display }}</td>
|
||||
|
||||
{# Positions #}
|
||||
<td>{{ rearport.positions }}</td>
|
||||
|
||||
{# Description #}
|
||||
<td>{{ rearport.description|placeholder }}</td>
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if rearport.cable %}
|
||||
<a href="{{ rearport.cable.get_absolute_url }}">{{ rearport.cable }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Not connected</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{# Actions #}
|
||||
<td class="text-right">
|
||||
{% if rearport.cable %}
|
||||
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=rearport.cable %}
|
||||
{% elif perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:rearport_connect' termination_a_id=rearport.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-success btn-xs" title="Connect">
|
||||
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_rearport %}
|
||||
<a href="{% url 'dcim:rearport_edit' pk=rearport.pk %}?return_url={{ device.get_absolute_url }}" title="Edit port" class="btn btn-info btn-xs">
|
||||
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_rearport %}
|
||||
<a href="{% url 'dcim:rearport_delete' pk=rearport.pk %}?return_url={{ device.get_absolute_url }}" title="Delete port" class="btn btn-danger btn-xs">
|
||||
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -82,33 +82,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if interface.description %}
|
||||
<span>{{ interface.description }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ interface.description|placeholder }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MTU</td>
|
||||
<td>
|
||||
{% if interface.mtu %}
|
||||
<span>{{ interface.mtu }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ interface.mtu|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MAC Address</td>
|
||||
<td>
|
||||
{% if interface.mac_address %}
|
||||
<span>{{ interface.mac_address }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ interface.mac_address|placeholder }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>802.1Q Mode</td>
|
||||
@@ -122,120 +104,101 @@
|
||||
{% if interface.is_connectable %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Connected Interface</strong>
|
||||
<strong>Connection</strong>
|
||||
</div>
|
||||
{% if connected_interface %}
|
||||
{% if interface.cable %}
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>{% if connected_interface.device %}Device{% else %}Virtual Machine{% endif %}</td>
|
||||
<td>
|
||||
<a href="{{ connected_interface.parent.get_absolute_url }}">{{ connected_interface.parent }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>
|
||||
<a href="{{ connected_interface.get_absolute_url }}">{{ connected_interface.name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td>{{ connected_interface.get_form_factor_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Enabled</td>
|
||||
<td>
|
||||
{% if connected_interface.enabled %}
|
||||
<span class="text-success"><i class="fa fa-check"></i></span>
|
||||
{% else %}
|
||||
<span class="text-danger"><i class="fa fa-close"></i></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LAG</td>
|
||||
<td>
|
||||
{% if connected_interface.lag%}
|
||||
<a href="{{ connected_interface.lag.get_absolute_url }}">{{ connected_interface.lag }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if connected_interface.description %}
|
||||
<span>{{ connected_interface.description }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MTU</td>
|
||||
<td>
|
||||
{% if connected_interface.mtu %}
|
||||
<span>{{ connected_interface.mtu }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MAC Address</td>
|
||||
<td>
|
||||
{% if connected_interface.mac_address %}
|
||||
<span>{{ connected_interface.mac_address }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>802.1Q Mode</td>
|
||||
<td>{{ connected_interface.get_mode_display }}</td>
|
||||
</tr>
|
||||
{% if interface.connection %}
|
||||
{% if connected_interface %}
|
||||
<tr>
|
||||
<td>Connection Status</td>
|
||||
<td>Device</td>
|
||||
<td>
|
||||
{% if interface.connection.connection_status %}
|
||||
<span class="label label-success">{{ interface.connection.get_connection_status_display }}</span>
|
||||
<a href="{{ connected_interface.parent.get_absolute_url }}">{{ connected_interface.device }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>
|
||||
<a href="{{ connected_interface.get_absolute_url }}">{{ connected_interface.name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td>{{ connected_interface.get_form_factor_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Enabled</td>
|
||||
<td>
|
||||
{% if connected_interface.enabled %}
|
||||
<span class="text-success"><i class="fa fa-check"></i></span>
|
||||
{% else %}
|
||||
<span class="label label-info">{{ interface.connection.get_connection_status_display }}</span>
|
||||
<span class="text-danger"><i class="fa fa-close"></i></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LAG</td>
|
||||
<td>
|
||||
{% if connected_interface.lag%}
|
||||
<a href="{{ connected_interface.lag.get_absolute_url }}">{{ connected_interface.lag }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ connected_interface.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MTU</td>
|
||||
<td>{{ connected_interface.mtu|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MAC Address</td>
|
||||
<td>{{ connected_interface.mac_address|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>802.1Q Mode</td>
|
||||
<td>{{ connected_interface.get_mode_display }}</td>
|
||||
</tr>
|
||||
{% elif connected_circuittermination %}
|
||||
{% with ct=connected_circuittermination %}
|
||||
<tr>
|
||||
<td>Circuit</td>
|
||||
<td><a href="{{ ct.circuit.get_absolute_url }}">{{ ct.circuit }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Side</td>
|
||||
<td>{{ ct.term_side }}</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>Cable</td>
|
||||
<td>
|
||||
<a href="{{ interface.cable.get_absolute_url }}">{{ interface.cable }}</a>
|
||||
<a href="{% url 'dcim:interface_trace' pk=interface.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||
<i class="fa fa-share-alt" aria-hidden="true"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Connection Status</td>
|
||||
<td>
|
||||
{% if interface.connection_status %}
|
||||
<span class="label label-success">{{ interface.get_connection_status_display }}</span>
|
||||
{% else %}
|
||||
<span class="label label-info">{{ interface.get_connection_status_display }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="panel-body text-muted">
|
||||
No connected interface
|
||||
Not connected
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Circuit Termination</strong>
|
||||
</div>
|
||||
<table class="table table-hover panel-body">
|
||||
{% if interface.circuit_termination %}
|
||||
<tr>
|
||||
<td>Circuit</td>
|
||||
<td><a href="{{ interface.circuit_termination.circuit.get_absolute_url }}">{{ interface.circuit_termination.circuit }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Side</td>
|
||||
<td>{{ interface.circuit_termination.term_side }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="2" class="text-muted">None</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if interface.is_lag %}
|
||||
<div class="panel panel-default">
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right">
|
||||
{% if perms.dcim.add_interfaceconnection %}
|
||||
{% import_button 'dcim:interface_connections_import' %}
|
||||
{% endif %}
|
||||
{% export_button content_type %}
|
||||
</div>
|
||||
<h1>{% block title %}Interface Connections{% endblock %}</h1>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Delete interface connection?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to delete the connection between these two interfaces?</p>
|
||||
<ul>
|
||||
<li>{{ interfaceconnection.interface_a.device }}: {{ interfaceconnection.interface_a }}</li>
|
||||
<li>{{ interfaceconnection.interface_b.device }}: {{ interfaceconnection.interface_b }}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
@@ -1,97 +0,0 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Connect Interfaces{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Connect Interfaces</h1>
|
||||
<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>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-center">
|
||||
<strong>A Side</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Site</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ device.site }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Rack</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ device.rack|default:"None" }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label required">Device</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{{ device }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% render_field form.interface_a %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 text-center" style="padding-top: 90px;">
|
||||
<i class="fa fa-exchange fa-4x"></i>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-center">
|
||||
<strong>B Side</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_b %}
|
||||
{% render_field form.rack_b %}
|
||||
{% render_field form.device_b %}
|
||||
</div>
|
||||
</div>
|
||||
{% render_field form.interface_b %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
{% render_field form.connection_status %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="form-group">
|
||||
<button type="submit" name="_create" class="btn btn-primary">Connect</button>
|
||||
<button type="submit" name="_addanother" class="btn btn-primary">Connect and Add Another</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/livesearch.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -3,9 +3,6 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right">
|
||||
{% if perms.dcim.change_powerport %}
|
||||
{% import_button 'dcim:power_connections_import' %}
|
||||
{% endif %}
|
||||
{% export_button content_type %}
|
||||
</div>
|
||||
<h1>{% block title %}Power Connections{% endblock %}</h1>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<form action="." 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">
|
||||
{% 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">{% block title %}Connect {{ poweroutlet.device }} {{ poweroutlet }}{% endblock %}</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.port %}
|
||||
{% render_field form.connection_status %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<button type="submit" name="_update" class="btn btn-primary">Connect</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/livesearch.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,8 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Disconnect {{ poweroutlet.device }} {{ poweroutlet }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to disconnect {{ poweroutlet.connected_port.device }} {{ poweroutlet.connected_port }} from this port?</p>
|
||||
{% endblock %}
|
||||
@@ -1,55 +0,0 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<form action="." 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">
|
||||
{% 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">{% block title %}Connect {{ powerport.device }} {{ powerport }}{% endblock %}</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.pdu %}
|
||||
</div>
|
||||
</div>
|
||||
{% render_field form.power_outlet %}
|
||||
{% render_field form.connection_status %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<button type="submit" name="_update" class="btn btn-primary">Connect</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/livesearch.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,8 +0,0 @@
|
||||
{% extends 'utilities/confirmation_form.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Disconnect power port {{ powerport }}?{% endblock %}
|
||||
|
||||
{% block message %}
|
||||
<p>Are you sure you want to disconnect this power port from {{ powerport.power_outlet.device }} {{ powerport.power_outlet }}?</p>
|
||||
{% endblock %}
|
||||
@@ -83,13 +83,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Facility ID</td>
|
||||
<td>
|
||||
{% if rack.facility_id %}
|
||||
<span>{{ rack.facility_id }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ rack.facility_id|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
@@ -105,6 +99,12 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
{{ rack.get_status_display }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>
|
||||
@@ -117,14 +117,12 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serial Number</td>
|
||||
<td>
|
||||
{% if rack.serial %}
|
||||
<span>{{ rack.serial }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ rack.serial|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset Tag</td>
|
||||
<td>{{ rack.asset_tag|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Devices</td>
|
||||
<td>
|
||||
@@ -156,6 +154,26 @@
|
||||
<td>Height</td>
|
||||
<td>{{ rack.u_height }}U ({% if rack.desc_units %}descending{% else %}ascending{% endif %})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Outer Width</td>
|
||||
<td>
|
||||
{% if rack.outer_width %}
|
||||
<span>{{ rack.outer_width }} {{ rack.get_outer_unit_display }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Outer Depth</td>
|
||||
<td>
|
||||
{% if rack.outer_depth %}
|
||||
<span>{{ rack.outer_depth }} {{ rack.get_outer_unit_display }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=rack %}
|
||||
@@ -195,7 +213,7 @@
|
||||
{% if device.parent_bay %}
|
||||
<a href="{{ device.parent_bay.device.get_absolute_url }}">{{ device.parent_bay }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
{% render_field form.name %}
|
||||
{% render_field form.facility_id %}
|
||||
{% render_field form.group %}
|
||||
{% render_field form.status %}
|
||||
{% render_field form.role %}
|
||||
{% render_field form.serial %}
|
||||
{% render_field form.asset_tag %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
@@ -26,6 +28,18 @@
|
||||
{% render_field form.type %}
|
||||
{% render_field form.width %}
|
||||
{% render_field form.u_height %}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">Outer dimensions</label>
|
||||
<div class="col-md-3">
|
||||
{{ form.outer_width }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{{ form.outer_depth }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
{{ form.outer_unit }}
|
||||
</div>
|
||||
</div>
|
||||
{% render_field form.desc_units %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load tz %}
|
||||
{% load helpers %}
|
||||
|
||||
@@ -106,23 +106,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Facility</td>
|
||||
<td>
|
||||
{% if site.facility %}
|
||||
{{ site.facility }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ site.facility|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AS Number</td>
|
||||
<td>
|
||||
{% if site.asn %}
|
||||
{{ site.asn }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ site.asn|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Time Zone</td>
|
||||
@@ -131,19 +119,13 @@
|
||||
{{ site.time_zone }} (UTC {{ site.time_zone|tzoffset }})<br />
|
||||
<small class="text-muted">Site time: {% timezone site.time_zone %}{% now "SHORT_DATETIME_FORMAT" %}{% endtimezone %}</small>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if site.description %}
|
||||
{{ site.description }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ site.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -163,19 +145,13 @@
|
||||
</div>
|
||||
<span>{{ site.physical_address|linebreaksbr }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shipping Address</td>
|
||||
<td>
|
||||
{% if site.shipping_address %}
|
||||
<span>{{ site.shipping_address|linebreaksbr }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ site.shipping_address|linebreaksbr|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPS Coordinates</td>
|
||||
@@ -188,19 +164,13 @@
|
||||
</div>
|
||||
<span>{{ site.latitude }}, {{ site.longitude }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contact Name</td>
|
||||
<td>
|
||||
{% if site.contact_name %}
|
||||
<span>{{ site.contact_name }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ site.contact_name|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contact Phone</td>
|
||||
@@ -208,7 +178,7 @@
|
||||
{% if site.contact_phone %}
|
||||
<a href="tel:{{ site.contact_phone }}">{{ site.contact_phone }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -218,7 +188,7 @@
|
||||
{% if site.contact_email %}
|
||||
<a href="mailto:{{ site.contact_email }}">{{ site.contact_email }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -330,7 +300,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'inc/graphs_modal.html' %}
|
||||
{% include 'inc/modal.html' with modal_name='graphs' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load helpers %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
@@ -52,16 +53,10 @@
|
||||
{% if device.rack %}
|
||||
{{ device.rack }} / {{ device.position }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if device.serial %}
|
||||
{{ device.serial }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ device.serial|placeholder }}</td>
|
||||
<td>
|
||||
{{ form.vc_position }}
|
||||
{% if form.vc_position.errors %}
|
||||
|
||||
@@ -55,13 +55,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if configcontext.description %}
|
||||
{{ configcontext.description }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ configcontext.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Active</td>
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item-heading">Connections</h4>
|
||||
<span class="badge pull-right">{{ stats.cable_count }}</span>
|
||||
<p style="padding-left: 20px;"><a href="{% url 'dcim:cable_list' %}">Cables</a></p>
|
||||
<span class="badge pull-right">{{ stats.interface_connections_count }}</span>
|
||||
<p style="padding-left: 20px;"><a href="{% url 'dcim:interface_connections_list' %}">Interfaces</a></p>
|
||||
<span class="badge pull-right">{{ stats.console_connections_count }}</span>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% load staticfiles %}
|
||||
{% load static %}
|
||||
<div class="loading text-center">
|
||||
<img src="{% static 'img/ajax-loader.gif' %}" />
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{% elif field.required %}
|
||||
<span class="text-warning">Not defined</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="modal fade" id="graphs_modal" tabindex="-1" role="dialog">
|
||||
<div class="modal fade" id="{{ modal_name }}_modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="graphs_modal_title">Modal title</h4>
|
||||
<h4 class="modal-title" id="{{ modal_name }}_modal_title">Modal title</h4>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load helpers %}
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
@@ -113,7 +113,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown{% if request.path|contains:'/dcim/device,/dcim/virtual-chassis,/dcim/manufacturers/,/dcim/platforms/,-connections/,/dcim/inventory-items/' %} active{% endif %}">
|
||||
<li class="dropdown{% if request.path|contains:'/dcim/device,/dcim/virtual-chassis,/dcim/manufacturers/,/dcim/platforms/,/dcim/cable,-connections/,/dcim/inventory-items/' %} active{% endif %}">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Devices <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown-header">Devices</li>
|
||||
@@ -180,27 +180,20 @@
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">Connections</li>
|
||||
<li>
|
||||
{% if perms.dcim.change_consoleport %}
|
||||
{% if perms.dcim.add_cable %}
|
||||
<div class="buttons pull-right">
|
||||
<a href="{% url 'dcim:console_connections_import' %}" class="btn btn-xs btn-info" title="Import"><i class="fa fa-download"></i></a>
|
||||
<a href="{% url 'dcim:cable_import' %}" class="btn btn-xs btn-info" title="Import"><i class="fa fa-download"></i></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:cable_list' %}">Cables</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'dcim:console_connections_list' %}">Console Connections</a>
|
||||
</li>
|
||||
<li>
|
||||
{% if perms.dcim.change_powerport %}
|
||||
<div class="buttons pull-right">
|
||||
<a href="{% url 'dcim:power_connections_import' %}" class="btn btn-xs btn-info" title="Import"><i class="fa fa-download"></i></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:power_connections_list' %}">Power Connections</a>
|
||||
</li>
|
||||
<li>
|
||||
{% if perms.dcim.add_interfaceconnection %}
|
||||
<div class="buttons pull-right">
|
||||
<a href="{% url 'dcim:interface_connections_import' %}" class="btn btn-xs btn-info" title="Import"><i class="fa fa-download"></i></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:interface_connections_list' %}">Interface Connections</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -75,23 +75,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Date Added</td>
|
||||
<td>
|
||||
{% if aggregate.date_added %}
|
||||
<span>{{ aggregate.date_added }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ aggregate.date_added|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if aggregate.description %}
|
||||
<span>{{ aggregate.description }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ aggregate.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -105,13 +105,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if ipaddress.description %}
|
||||
<span>{{ ipaddress.description }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ ipaddress.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assignment</td>
|
||||
@@ -119,7 +113,7 @@
|
||||
{% if ipaddress.interface %}
|
||||
<span><a href="{{ ipaddress.interface.parent.get_absolute_url }}">{{ ipaddress.interface.parent }}</a> ({{ ipaddress.interface }})</span>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'utilities/obj_edit.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
{% load helpers %}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'utilities/obj_edit.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Bulk Add IP Addresses{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'utilities/obj_edit.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
{% load helpers %}
|
||||
|
||||
|
||||
@@ -160,13 +160,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if prefix.description %}
|
||||
<span>{{ prefix.description }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ prefix.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Is a pool</td>
|
||||
|
||||
@@ -70,13 +70,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if service.description %}
|
||||
{{ service.description }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ service.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -129,13 +129,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if vlan.description %}
|
||||
{{ vlan.description }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ vlan.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -82,13 +82,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if vrf.description %}
|
||||
<span>{{ vrf.description }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ vrf.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load helpers %}
|
||||
{% load secret_helpers %}
|
||||
|
||||
@@ -59,13 +59,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>
|
||||
{% if secret.name %}
|
||||
<span>{{ secret.name }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ secret.name|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'utilities/obj_import.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
{{ block.super }}
|
||||
|
||||
@@ -71,13 +71,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{% if tenant.description %}
|
||||
{{ tenant.description }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ tenant.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'utilities/obj_edit.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block form %}
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
<li{% ifequal active_tab "userkey" %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'user:userkey' %}">User Key</a>
|
||||
</li>
|
||||
<li{% ifequal active_tab "recent_activity" %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'user:recent_activity' %}">Recent Activity</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-md-6">
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{% extends 'users/_user.html' %}
|
||||
|
||||
{% block title %}Recent Activity{% endblock %}
|
||||
|
||||
{% block usercontent %}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for action in recent_activity %}
|
||||
<tr>
|
||||
<td>{{ action.time|date:'SHORT_DATETIME_FORMAT' }}</td>
|
||||
<td>{{ action.icon }} {{ action.message|safe }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'users/_user.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}User Key{% endblock %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<span>(NAT: {{ virtualmachine.primary_ip4.nat_outside.address.ip }})</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -131,7 +131,7 @@
|
||||
<span>(NAT: {{ virtualmachine.primary_ip6.nat_outside.address.ip }})</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -181,13 +181,7 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td><i class="fa fa-tachometer"></i> Virtual CPUs</td>
|
||||
<td>
|
||||
{% if virtualmachine.vcpus %}
|
||||
{{ virtualmachine.vcpus }}
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ virtualmachine.vcpus|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="fa fa-microchip"></i> Memory</td>
|
||||
@@ -195,7 +189,7 @@
|
||||
{% if virtualmachine.memory %}
|
||||
{{ virtualmachine.memory }} MB
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -205,7 +199,7 @@
|
||||
{% if virtualmachine.disk %}
|
||||
{{ virtualmachine.disk }} GB
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user