mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 19:56:48 +00:00
The Add disk, Add network device and bandwidth dialogs of the VM page set their labels in a narrow column beside the fields and closed with a grey Close: Add disk split "GB" over two lines and offered an unexplained Metadata box, its existing-volume pool was a dropdown of links that wrote a hidden field; the network list prefixed every choice with "Network" or "Interface"; the bandwidth fields asked for "kilobytes" where libvirt counts KiB/s and KiB. Now their labels sit above the fields, tied to them, in two columns. Add disk is one form whose source, New disk or Existing volume, is a radio card as in the new VM form, the chosen source's fields shown and sent and its action taken; the size has a GiB suffix and "Preallocate metadata (qcow2)", the existing volume's pool is a select that loads its volumes, the bus and the cache are shared. Add network device picks its source from Networks and Interfaces groups and says how its MAC is filled; the bandwidth limit names its units and when a running VM gets it. Move says when the host has no other pool and is disabled then. Every dialog closes with Cancel and its action; the posted fields are unchanged.
41 lines
2.7 KiB
HTML
41 lines
2.7 KiB
HTML
{% load i18n %}
|
|
{% if request.user.is_superuser %}
|
|
<div class="modal fade" id="AddQos{{ id }}" tabindex="-1" role="dialog" aria-labelledby="AddQosLabel{{ id }}" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="AddQosLabel{{ id }}">{% blocktrans with nic=id %}Bandwidth limit of eth{{ nic }}{% endblocktrans %}</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans "Close" %}"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row g-3">
|
|
<div class="col-12">
|
|
<label class="form-label" for="qos_direction{{ id }}">{% trans "Direction" %}</label>
|
|
<select class="form-select" id="qos_direction{{ id }}" name="qos_direction">
|
|
<option value="inbound">{% trans "Inbound: to the VM" %}</option>
|
|
<option value="outbound">{% trans "Outbound: from the VM" %}</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<label class="form-label" for="qos_average{{ id }}">{% trans "Average (KiB/s)" %}</label>
|
|
<input class="form-control" id="qos_average{{ id }}" name="qos_average" required pattern="[0-9]+" inputmode="numeric">
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<label class="form-label" for="qos_peak{{ id }}">{% trans "Peak (KiB/s)" %}</label>
|
|
<input class="form-control" id="qos_peak{{ id }}" name="qos_peak" pattern="[0-9]+" inputmode="numeric">
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<label class="form-label" for="qos_burst{{ id }}">{% trans "Burst (KiB)" %}</label>
|
|
<input class="form-control" id="qos_burst{{ id }}" name="qos_burst" pattern="[0-9]+" inputmode="numeric">
|
|
</div>
|
|
</div>
|
|
<p class="small text-body-secondary mt-3 mb-0">{% trans "A running VM gets a change after it is powered off and on." %}</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{% trans "Cancel" %}</button>
|
|
<button type="submit" class="btn btn-primary" name="set_qos">{% trans "Save" %}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|