|
@@ -7,7 +7,7 @@
|
|
{% block content %}
|
|
{% block content %}
|
|
{% include 'dcim/inc/device_header.html' with active_tab='info' %}
|
|
{% include 'dcim/inc/device_header.html' with active_tab='info' %}
|
|
<div class="row">
|
|
<div class="row">
|
|
- <div class="col-md-5">
|
|
|
|
|
|
+ <div class="col-md-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<div class="panel-heading">
|
|
<strong>Device</strong>
|
|
<strong>Device</strong>
|
|
@@ -172,58 +172,20 @@
|
|
{% with device.get_custom_fields as custom_fields %}
|
|
{% with device.get_custom_fields as custom_fields %}
|
|
{% include 'inc/custom_fields_panel.html' %}
|
|
{% include 'inc/custom_fields_panel.html' %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
- {% if request.user.is_authenticated %}
|
|
|
|
- <div class="panel panel-default">
|
|
|
|
- <div class="panel-heading">
|
|
|
|
- <strong>Secrets</strong>
|
|
|
|
- </div>
|
|
|
|
- {% if secrets %}
|
|
|
|
- <table class="table table-hover panel-body">
|
|
|
|
- {% for secret in secrets %}
|
|
|
|
- {% include 'secrets/inc/secret_tr.html' %}
|
|
|
|
- {% endfor %}
|
|
|
|
- </table>
|
|
|
|
- {% else %}
|
|
|
|
- <div class="panel-body text-muted">
|
|
|
|
- None found
|
|
|
|
- </div>
|
|
|
|
- {% endif %}
|
|
|
|
- {% if perms.secrets.add_secret %}
|
|
|
|
- <form id="secret_form">
|
|
|
|
- {% csrf_token %}
|
|
|
|
- </form>
|
|
|
|
- <div class="panel-footer text-right">
|
|
|
|
- <a href="{% url 'dcim:device_addsecret' pk=device.pk %}" class="btn btn-xs btn-primary">
|
|
|
|
- <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
|
|
|
- Add secret
|
|
|
|
- </a>
|
|
|
|
- </div>
|
|
|
|
- {% endif %}
|
|
|
|
- </div>
|
|
|
|
- {% endif %}
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<div class="panel-heading">
|
|
- <strong>Services</strong>
|
|
|
|
|
|
+ <strong>Comments</strong>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="panel-body">
|
|
|
|
+ {% if device.comments %}
|
|
|
|
+ {{ device.comments|gfm }}
|
|
|
|
+ {% else %}
|
|
|
|
+ <span class="text-muted">None</span>
|
|
|
|
+ {% endif %}
|
|
</div>
|
|
</div>
|
|
- {% if services %}
|
|
|
|
- <table class="table table-hover panel-body">
|
|
|
|
- {% for service in services %}
|
|
|
|
- {% include 'ipam/inc/service.html' %}
|
|
|
|
- {% endfor %}
|
|
|
|
- </table>
|
|
|
|
- {% else %}
|
|
|
|
- <div class="panel-body text-muted">
|
|
|
|
- None
|
|
|
|
- </div>
|
|
|
|
- {% endif %}
|
|
|
|
- {% if perms.ipam.add_service %}
|
|
|
|
- <div class="panel-footer text-right">
|
|
|
|
- <a href="{% url 'dcim:device_service_assign' device=device.pk %}" class="btn btn-xs btn-primary">
|
|
|
|
- <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Assign service
|
|
|
|
- </a>
|
|
|
|
- </div>
|
|
|
|
- {% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-md-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<div class="panel-heading">
|
|
<strong>Console / Power</strong>
|
|
<strong>Console / Power</strong>
|
|
@@ -273,17 +235,57 @@
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
- <div class="panel panel-default">
|
|
|
|
- <div class="panel-heading">
|
|
|
|
- <strong>Comments</strong>
|
|
|
|
- </div>
|
|
|
|
- <div class="panel-body">
|
|
|
|
- {% if device.comments %}
|
|
|
|
- {{ device.comments|gfm }}
|
|
|
|
|
|
+ {% if request.user.is_authenticated %}
|
|
|
|
+ <div class="panel panel-default">
|
|
|
|
+ <div class="panel-heading">
|
|
|
|
+ <strong>Secrets</strong>
|
|
|
|
+ </div>
|
|
|
|
+ {% if secrets %}
|
|
|
|
+ <table class="table table-hover panel-body">
|
|
|
|
+ {% for secret in secrets %}
|
|
|
|
+ {% include 'secrets/inc/secret_tr.html' %}
|
|
|
|
+ {% endfor %}
|
|
|
|
+ </table>
|
|
{% else %}
|
|
{% else %}
|
|
- <span class="text-muted">None</span>
|
|
|
|
|
|
+ <div class="panel-body text-muted">
|
|
|
|
+ None found
|
|
|
|
+ </div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
+ {% if perms.secrets.add_secret %}
|
|
|
|
+ <form id="secret_form">
|
|
|
|
+ {% csrf_token %}
|
|
|
|
+ </form>
|
|
|
|
+ <div class="panel-footer text-right">
|
|
|
|
+ <a href="{% url 'dcim:device_addsecret' pk=device.pk %}" class="btn btn-xs btn-primary">
|
|
|
|
+ <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
|
|
|
+ Add secret
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ {% endif %}
|
|
|
|
+ </div>
|
|
|
|
+ {% endif %}
|
|
|
|
+ <div class="panel panel-default">
|
|
|
|
+ <div class="panel-heading">
|
|
|
|
+ <strong>Services</strong>
|
|
</div>
|
|
</div>
|
|
|
|
+ {% if services %}
|
|
|
|
+ <table class="table table-hover panel-body">
|
|
|
|
+ {% for service in services %}
|
|
|
|
+ {% include 'ipam/inc/service.html' %}
|
|
|
|
+ {% endfor %}
|
|
|
|
+ </table>
|
|
|
|
+ {% else %}
|
|
|
|
+ <div class="panel-body text-muted">
|
|
|
|
+ None
|
|
|
|
+ </div>
|
|
|
|
+ {% endif %}
|
|
|
|
+ {% if perms.ipam.add_service %}
|
|
|
|
+ <div class="panel-footer text-right">
|
|
|
|
+ <a href="{% url 'dcim:device_service_assign' device=device.pk %}" class="btn btn-xs btn-primary">
|
|
|
|
+ <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Assign service
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ {% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<div class="panel-heading">
|
|
@@ -326,7 +328,9 @@
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="col-md-7">
|
|
|
|
|
|
+</div>
|
|
|
|
+<div class="row">
|
|
|
|
+ <div class="col-md-12">
|
|
{% if device_bays or device.device_type.is_parent_device %}
|
|
{% if device_bays or device.device_type.is_parent_device %}
|
|
{% if perms.dcim.delete_devicebay %}
|
|
{% if perms.dcim.delete_devicebay %}
|
|
<form method="post" action="{% url 'dcim:devicebay_bulk_delete' pk=device.pk %}">
|
|
<form method="post" action="{% url 'dcim:devicebay_bulk_delete' pk=device.pk %}">
|
|
@@ -350,7 +354,7 @@
|
|
</div>
|
|
</div>
|
|
<table class="table table-hover panel-body component-list">
|
|
<table class="table table-hover panel-body component-list">
|
|
{% for devicebay in device_bays %}
|
|
{% for devicebay in device_bays %}
|
|
- {% include 'dcim/inc/devicebay.html' with selectable=True %}
|
|
|
|
|
|
+ {% include 'dcim/inc/devicebay.html' %}
|
|
{% empty %}
|
|
{% empty %}
|
|
<tr>
|
|
<tr>
|
|
<td colspan="4">No device bays defined</td>
|
|
<td colspan="4">No device bays defined</td>
|
|
@@ -405,11 +409,23 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table id="interfaces_table" class="table table-hover panel-body component-list">
|
|
<table id="interfaces_table" class="table table-hover panel-body component-list">
|
|
|
|
+ <tr class="table-headings">
|
|
|
|
+ {% if perms.dcim.change_interface or perms.dcim.delete_interface %}
|
|
|
|
+ <th></th>
|
|
|
|
+ {% endif %}
|
|
|
|
+ <th>Name</th>
|
|
|
|
+ <th>LAG</th>
|
|
|
|
+ <th>Description</th>
|
|
|
|
+ <th>MTU</th>
|
|
|
|
+ <th>MAC Address</th>
|
|
|
|
+ <th colspan="2">Connection</th>
|
|
|
|
+ <th></th>
|
|
|
|
+ </tr>
|
|
{% for iface in interfaces %}
|
|
{% for iface in interfaces %}
|
|
- {% include 'dcim/inc/interface.html' with selectable=True %}
|
|
|
|
|
|
+ {% include 'dcim/inc/interface.html' %}
|
|
{% empty %}
|
|
{% empty %}
|
|
<tr>
|
|
<tr>
|
|
- <td colspan="4">No interfaces defined</td>
|
|
|
|
|
|
+ <td colspan="8">No interfaces defined</td>
|
|
</tr>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</table>
|
|
</table>
|
|
@@ -467,8 +483,16 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table class="table table-hover panel-body component-list">
|
|
<table class="table table-hover panel-body component-list">
|
|
|
|
+ <tr class="table-headings">
|
|
|
|
+ {% if perms.dcim.change_consoleserverport or perms.dcim.delete_consoleserverport %}
|
|
|
|
+ <th></th>
|
|
|
|
+ {% endif %}
|
|
|
|
+ <th>Name</th>
|
|
|
|
+ <th colspan="2">Connection</th>
|
|
|
|
+ <th></th>
|
|
|
|
+ </tr>
|
|
{% for csp in cs_ports %}
|
|
{% for csp in cs_ports %}
|
|
- {% include 'dcim/inc/consoleserverport.html' with selectable=True %}
|
|
|
|
|
|
+ {% include 'dcim/inc/consoleserverport.html' %}
|
|
{% empty %}
|
|
{% empty %}
|
|
<tr>
|
|
<tr>
|
|
<td colspan="4">No console server ports defined</td>
|
|
<td colspan="4">No console server ports defined</td>
|
|
@@ -524,12 +548,20 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table class="table table-hover panel-body component-list">
|
|
<table class="table table-hover panel-body component-list">
|
|
|
|
+ <tr class="table-headings">
|
|
|
|
+ {% if perms.dcim.change_poweroutlet or perms.dcim.delete_poweroutlet %}
|
|
|
|
+ <th></th>
|
|
|
|
+ {% endif %}
|
|
|
|
+ <th>Name</th>
|
|
|
|
+ <th colspan="2">Connection</th>
|
|
|
|
+ <th></th>
|
|
|
|
+ </tr>
|
|
{% for po in power_outlets %}
|
|
{% for po in power_outlets %}
|
|
- {% include 'dcim/inc/poweroutlet.html' with selectable=True %}
|
|
|
|
|
|
+ {% include 'dcim/inc/poweroutlet.html' %}
|
|
{% empty %}
|
|
{% empty %}
|
|
<tr>
|
|
<tr>
|
|
<td colspan="4">No power outlets defined</td>
|
|
<td colspan="4">No power outlets defined</td>
|
|
- </tr>
|
|
|
|
|
|
+ </tr> text-nowrap
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</table>
|
|
</table>
|
|
{% if perms.dcim.add_poweroutlet or perms.dcim.delete_poweroutlet %}
|
|
{% if perms.dcim.add_poweroutlet or perms.dcim.delete_poweroutlet %}
|