Rearranged device/VM view and expanded component lists

This commit is contained in:
Jeremy Stretch
2017-11-03 16:58:56 -04:00
parent 368c30ef9d
commit 5d19a9f50f
11 changed files with 234 additions and 227 deletions

View File

@@ -41,7 +41,7 @@
<h1>{% block title %}{{ vm }}{% endblock %}</h1>
{% include 'inc/created_updated.html' with obj=vm %}
<div class="row">
<div class="col-md-5">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Virtual Machine</strong>
@@ -123,6 +123,21 @@
</tr>
</table>
</div>
{% include 'inc/custom_fields_panel.html' with custom_fields=vm.get_custom_fields %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
{% if vm.comments %}
{{ vm.comments|gfm }}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Cluster</strong>
@@ -204,21 +219,10 @@
</div>
{% endif %}
</div>
{% include 'inc/custom_fields_panel.html' with custom_fields=vm.get_custom_fields %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
{% if vm.comments %}
{{ vm.comments|gfm }}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
</div>
<div class="col-md-7">
</div>
<div class="row">
<div class="col-md-12">
{% if perms.dcim.change_interface or perms.dcim.delete_interface %}
<form method="post">
{% csrf_token %}
@@ -244,11 +248,23 @@
</div>
</div>
<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 %}
{% include 'virtualization/inc/interface.html' with selectable=True %}
{% include 'dcim/inc/interface.html' with device=vm %}
{% empty %}
<tr>
<td colspan="4">No interfaces defined</td>
<td colspan="6">No interfaces defined</td>
</tr>
{% endfor %}
</table>