Commit 2c033559 by Kálmán Viktor

dashboard: port list in vm details network panel

parent 0a4ecb0f
<tfoot>
<tr>
<td style="vertical-align: middle;">
<i class="icon-plus"></i> <i class="icon-long-arrow-right"></i>
</td>
<td colspan="2">
<div class="input-group input-group-sm">
<input type="text" class="form-control" size="5" />
<span class="input-group-addon">/</span>
<select class="form-control"><option>tcp</option><option>udp</option></select>
</div>
</td>
<td>
<button type="submit" class="btn btn-success btn-sm">Add</button>
</td>
</tr>
</tfoot>
......@@ -12,9 +12,15 @@ Interfaces</h2>
<div class="row">
<div class="col-md-5">
<dl>
<dt>IPv4 address:</dt> <dd>{{ i.host.ipv4 }}</dd>
<dt>IPv6 address:</dt> <dd>{{ i.host.ipv6 }}</dd>
<dt>DNS name:</dt> <dd>{{ i.host.get_fqdn }}</dd>
<dt>{% trans "IPv4 address" %}:</dt> <dd>{{ i.host.ipv4 }}</dd>
<dt>{% trans "IPv6 address" %}:</dt> <dd>{{ i.host.ipv6 }}</dd>
<dt>{% trans "DNS name" %}:</dt> <dd>{{ i.host.get_fqdn }}</dd>
<dt>{% trans "Groups" %}:</dt>
<dd>
{% for g in i.host.groups.all %}
{{ g }}{% if not forloop.last %},{% endif %}
{% endfor %}
</dd>
</dl>
</div>
<div class="col-md-7">
......@@ -23,7 +29,7 @@ Interfaces</h2>
<li><a href="#ipv6" data-toggle="pill" class="text-center">IPv6</a></li>
</ul>
<h4>Port access</h4>
<div class="tab-content">
<div class="tab-content" style="padding-top: 10px;">
<div class="tab-pane active" id="ipv4">
<table class="table table-striped rule-table">
<thead>
......@@ -38,19 +44,28 @@ Interfaces</h2>
</th></tr>
</thead>
<tbody>
<!-- inline td width shall be replaced -->
{% for l in i.host.list_ports %}
{% if l.ipv4 %}
<tr>
<td>
{{ l.ipv4.host }}:{{ l.ipv4.port }}
</td>
<td style="width: 61px;"><i class="icon-long-arrow-right"></i></td>
<td style="width: 111px;">
{{ l.private }}/{{ l.proto }}
</td>
<td>
<a href="#" class="btn btn-link btn-xs" title="{% trans "Remove" %}"><i class="icon-remove"><span class="sr-only">{% trans "Remove" %}</span></i></a>
</td>
</tr>
{% endif %}
{% endfor %}
<tr><td>vm.ik.bme.hu:22620</td><td><i class="icon-long-arrow-right"></i></td><td><abbr title="ssh">22</abbr>/tcp</td><td><a href="#" class="btn btn-link btn-xs" title="remove"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
<tr><td>vm.ik.bme.hu:22620</td><td><i class="icon-long-arrow-right"></i></td><td>12344/tcp</td><td><a href="#" class="btn btn-link btn-xs" title="remove"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
<tr><td>vm.ik.bme.hu:22620</td><td><i class="icon-long-arrow-right"></i></td><td><abbr title="http-alt">8080</abbr>/tcp</td><td><a href="#" class="btn btn-link btn-xs" title="remove"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
</tbody>
<tfoot>
<tr><td><i class="icon-plus"></i> <i class="icon-long-arrow-right"></i></td><td colspan="2">
<div class="input-group input-group-sm">
<input type="text" class="form-control" size="5" />
<span class="input-group-addon">/</span>
<select class="form-control"><option>tcp</option><option>udp</option></select>
</div>
</td><td><button type="submit" class="btn btn-success btn-sm">Add</button></td></tr>
</tfoot>
{% include "dashboard/vm-detail-network-port-add.html" %}
</table>
</div> <!-- /ipv4 -->
<div class="tab-pane" id="ipv6">
......@@ -65,19 +80,28 @@ Interfaces</h2>
</th></tr>
</thead>
<tbody>
<!-- inline td width TODO not do it -->
{% for l in i.host.list_ports %}
{% if l.ipv6 %}
<tr>
<td>
{{ l.ipv6.host }}:{{ l.ipv6.port }}
</td>
<td style="width: 61px;"><i class="icon-long-arrow-right"></i></td>
<td style="width: 111px;">
{{ l.private }}/{{ l.proto }}
</td>
<td>
<a href="#" class="btn btn-link btn-xs" title="{% trans "Remove" %}"><i class="icon-remove"><span class="sr-only">{% trans "Remove" %}</span></i></a>
</td>
</tr>
{% endif %}
{% endfor %}
<tr><td>550.vm.ik.bme.hu:22</td><td><i class="icon-long-arrow-right"></i></td><td><abbr title="ssh">22</abbr>/tcp</td><td><a href="#" class="btn btn-link btn-xs" title="remove"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
<tr><td>550.vm.ik.bme.hu:12344</td><td><i class="icon-long-arrow-right"></i></td><td>12344/tcp</td><td><a href="#" class="btn btn-link btn-xs" title="remove"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
<tr><td>550.vm.ik.bme.hu:8080</td><td><i class="icon-long-arrow-right"></i></td><td><abbr title="http-alt">8080</abbr>/tcp</td><td><a href="#" class="btn btn-link btn-xs" title="remove"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
</tbody>
<tfoot>
<tr><td><i class="icon-plus"></i> <i class="icon-long-arrow-right"></i></td><td colspan="2">
<div class="input-group input-group-sm">
<input type="text" class="form-control" size="5" />
<span class="input-group-addon">/</span>
<select class="form-control"><option>tcp</option><option>udp</option></select>
</div>
</td><td><button type="submit" class="btn btn-success btn-sm">Add</button></td></tr>
</tfoot>
{% include "dashboard/vm-detail-network-port-add.html" %}
</table>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment