1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

fix layout for instance qos configuration

This commit is contained in:
catborise 2020-06-10 16:25:29 +03:00
parent b7fc8a5fea
commit fd3212de90

View file

@ -1036,55 +1036,57 @@
</div> </div>
{% if qos %} {% if qos %}
<div class="col-10 col-sm-10"> <div class="row mt-3">
<p><strong>{% trans "QoS Configuration" %}</strong></p> <div class="col-sm-10">
</div> <p><strong>{% trans "QoS Configuration" %}</strong></p>
<div class="col-12 col-sm-12"> </div>
<table class="table table-hover"> <div class="col-12 col-sm-12">
<thead> <table class="table table-hover">
<tr> <thead>
<th scope="col">{% trans "MAC" %}/{% trans "Direction" %}</th> <tr class="d-flex">
<th scope="col">{% trans "Average" %}</th> <th scope="col" class="col-2">{% trans "MAC" %}/{% trans "Direction" %}</th>
<th scope="col">{% trans "Peak" %}</th> <th scope="col" class="col-2">{% trans "Average" %}</th>
<th scope="col">{% trans "Burst" %}</th> <th scope="col" class="col-3">{% trans "Peak" %}</th>
<th scope="col">{% trans "Actions" %}</th> <th scope="col" class="col-3">{% trans "Burst" %}</th>
</tr> <th scope="col" class="col-2">{% trans "Actions" %}</th>
</thead> </tr>
<tbody> </thead>
{% for q, attrs in qos.items %} <tbody>
{% for att in attrs %} {% for q, attrs in qos.items %}
<form method="post" role="form" aria-label="Instance QoS configuration form">{% csrf_token %} {% for att in attrs %}
<tr> <form method="post" role="form" aria-label="Instance QoS configuration form">{% csrf_token %}
<td><label class="col-form-label">{{ q }} {{ att.direction | capfirst }}</label></td> <tr class="d-flex">
<td><input id="qos_average" class="form-control" name="qos_average" <td class="col-2"><label class="col-form-label">{{ q }} {{ att.direction | capfirst }}</label></td>
value="{{ att.average|default:'' }}"/> <td class="col-2"><input id="qos_average" class="form-control" name="qos_average"
</td> value="{{ att.average|default:'' }}"/>
<td><input id="qos_peak" class="form-control" name="qos_peak" </td>
value="{{ att.peak|default:'' }}"/> <td class="col-3"><input id="qos_peak" class="form-control" name="qos_peak"
</td> value="{{ att.peak|default:'' }}"/>
<td><input id="qos_burst" class="form-control" name="qos_burst" </td>
value="{{ att.burst|default:'' }}"/> <td class="col-3"><input id="qos_burst" class="form-control" name="qos_burst"
</td> value="{{ att.burst|default:'' }}"/>
<td class="col-sm-2"> </td>
<input name="qos_direction" value="{{ att.direction }}" hidden/> <td class="col-sm-2">
<input name="net-mac" value="{{ q }}" hidden/> <input name="qos_direction" value="{{ att.direction }}" hidden/>
<button type="submit" class="btn btn-sm btn-primary" <input name="net-mac" value="{{ q }}" hidden/>
name="set_qos" data-toggle="modal" <button type="submit" class="btn btn-sm btn-primary"
title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> name="set_qos" data-toggle="modal"
<i class="fa fa-save"></i> title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
</button> <i class="fa fa-save"></i>
<button type="submit" class="btn btn-sm btn-danger" </button>
name="unset_qos" <button type="submit" class="btn btn-sm btn-danger"
title="{% trans "Delete QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> name="unset_qos"
<i class="fa fa-trash"></i> title="{% trans "Delete QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
</button> <i class="fa fa-trash"></i>
</td> </button>
</tr> </td>
</form> </tr>
{% endfor %} </form>
{% endfor %} {% endfor %}
</tbody> {% endfor %}
</table> </tbody>
</table>
</div>
</div> </div>
{% endif %} {% endif %}
<div class="clearfix"></div> <div class="clearfix"></div>