1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-01-12 16:35:17 +00:00

hide details with collapse while creating instance with flavor

This commit is contained in:
catborise 2020-05-21 16:11:28 +03:00 committed by catborise
parent 871083967f
commit 9ab776197c

View file

@ -130,22 +130,22 @@
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "VCPU Config" %}</label> <label class="col-sm-3 col-form-label">{% trans "VCPU Config" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<select id="vcpu_mode" name="vcpu_mode" class="custom-select"> <select id="vcpu_mode" name="vcpu_mode" class="custom-select">
<option value=""> {% trans 'no-mode' %}</option> <option value=""> {% trans 'no-mode' %}</option>
{% for mode in dom_caps.cpu_modes %} {% for mode in dom_caps.cpu_modes %}
{% if mode == 'custom' %} {% if mode == 'custom' %}
<optgroup label="Custom CPU Models"> <optgroup label="Custom CPU Models">
{% for model in dom_caps.cpu_custom_models %} {% for model in dom_caps.cpu_custom_models %}
<option value="{{ model }}"> {% trans model %}</option> <option value="{{ model }}"> {% trans model %}</option>
{% endfor %} {% endfor %}
</optgroup> </optgroup>
{% else %} {% else %}
<option value="{{ mode }}" {% ifequal mode default_cpu_mode %}selected {% endifequal %}> <option value="{{ mode }}" {% ifequal mode default_cpu_mode %}selected {% endifequal %}>
{% trans mode %} {% trans mode %}
</option> </option>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</select> </select>
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -164,17 +164,6 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "HDD cache mode" %}</label>
<div class="col-sm-6">
<select id="cache_mode" name="cache_mode" class="custom-select">
{% for mode, name in cache_modes %}
<option value="{{ mode }}" {% ifequal mode default_cache %}selected {% endifequal %}>
{% trans name %}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Network" %}</label> <label class="col-sm-3 col-form-label">{% trans "Network" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
@ -185,79 +174,100 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "NWFilter" %}</label> <label class="col-sm-3 col-form-label">{% trans "Advanced" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<select name="nwfilter" class="custom-select"> <button class="btn btn-block btn-outline-light" type="button" data-toggle="collapse" data-target="#flavAddCollapse" aria-expanded="false" aria-controls="collapseExample">
<option value="">{% trans "None" %}</option> <span class="fa fa-caret-down"></span>
{% for nwfilter in nwfilters %} </button>
<option value="{{ nwfilter }}">{{ nwfilter }}</option>
{% endfor %}
</select>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="collapse" id="flavAddCollapse">
<label class="col-sm-3 col-form-label">{% trans "MAC" %}</label> <div class="form-group row">
<div class="col-sm-6"> <label class="col-sm-3 col-form-label">{% trans "NWFilter" %}</label>
<input type="text" class="form-control" name="mac" maxlength="17" value="{{ mac_auto }}" required pattern="[a-zA-Z0-9:]+"> <div class="col-sm-6">
<select name="nwfilter" class="custom-select">
<option value="">{% trans "None" %}</option>
{% for nwfilter in nwfilters %}
<option value="{{ nwfilter }}">{{ nwfilter }}</option>
{% endfor %}
</select>
</div>
</div> </div>
</div> <div class="form-group row">
{% if dom_caps.graphics_support == 'yes' %} <label class="col-sm-3 col-form-label">{% trans "HDD cache mode" %}</label>
<div class="form-group row"> <div class="col-sm-6">
<label class="col-sm-3 col-form-label">{% trans "Graphics" %}</label> <select id="cache_mode" name="cache_mode" class="custom-select">
<div class="col-sm-6"> {% for mode, name in cache_modes %}
<select name="graphics" class="custom-select"> <option value="{{ mode }}" {% ifequal mode default_cache %}selected {% endifequal %}>
{% for graphics in dom_caps.graphics_types %} {% trans name %}</option>
<option value="{{ graphics }}" {% if default_graphics == graphics %}selected{% endif %}>{{ graphics }}</option> {% endfor %}
{% endfor %} </select>
</select> </div>
</div> </div>
</div> <div class="form-group row">
{% endif %} <label class="col-sm-3 col-form-label">{% trans "MAC" %}</label>
<div class="form-group row"> <div class="col-sm-6">
<label class="col-sm-3 col-form-label">{% trans "Video" %}</label> <input type="text" class="form-control" name="mac" maxlength="17" value="{{ mac_auto }}" required pattern="[a-zA-Z0-9:]+">
<div class="col-sm-6"> </div>
<select name="video" class="custom-select">
{% if not videos %}
<option value="vga">vga</option>
<option value="cirrus">cirrus</option>
{% endif %}
{% for video in videos %}
<option value="{{ video }}">{{ video }}</option>
{% endfor %}
</select>
</div> </div>
</div> {% if dom_caps.graphics_support == 'yes' %}
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Console Access" %}</label> <label class="col-sm-3 col-form-label">{% trans "Graphics" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<select name="listener_addr" class="custom-select"> <select name="graphics" class="custom-select">
{% for addr, label in listener_addr %} {% for graphics in dom_caps.graphics_types %}
<option value="{{ addr }}" {% if addr == "0.0.0.0" %} selected {% endif %}>{{ label }}</option> <option value="{{ graphics }}" {% if default_graphics == graphics %}selected{% endif %}>{{ graphics }}</option>
{% endfor %} {% endfor %}
</select> </select>
</div>
</div> </div>
</div> {% endif %}
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Console Password" %}</label> <label class="col-sm-3 col-form-label">{% trans "Video" %}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="password" class="form-control" name="console_pass" placeholder="{% trans "Console Password" %}" maxlength="64"> <select name="video" class="custom-select">
{% if not videos %}
<option value="vga">vga</option>
<option value="cirrus">cirrus</option>
{% endif %}
{% for video in videos %}
<option value="{{ video }}">{{ video }}</option>
{% endfor %}
</select>
</div>
</div> </div>
</div> <div class="form-group row">
<div class="form-group row"> <label class="col-sm-3 col-form-label">{% trans "Console Access" %}</label>
<label class="col-sm-3 col-form-label">{% trans "Guest Agent" %}</label> <div class="col-sm-6">
<div class="col-sm-6"> <select name="listener_addr" class="custom-select">
<input type="checkbox" name="qemu_ga" value="true" checked> {% for addr, label in listener_addr %}
<option value="{{ addr }}" {% if addr == "0.0.0.0" %} selected {% endif %}>{{ label }}</option>
{% endfor %}
</select>
</div>
</div> </div>
</div> <div class="form-group row">
{% if virtio_support %} <label class="col-sm-3 col-form-label">{% trans "Console Password" %}</label>
<div class="form-group row"> <div class="col-sm-6">
<label class="col-sm-3 col-form-label">{% trans "VirtIO" %}</label> <input type="password" class="form-control" name="console_pass" placeholder="{% trans "Console Password" %}" maxlength="64">
<div class="col-sm-6"> </div>
<input type="checkbox" name="virtio" value="{{ virtio_support }}" checked>
</div> </div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Guest Agent" %}</label>
<div class="col-sm-6">
<input type="checkbox" name="qemu_ga" value="true" checked>
</div>
</div>
{% if virtio_support %}
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "VirtIO" %}</label>
<div class="col-sm-6">
<input type="checkbox" name="virtio" value="{{ virtio_support }}" checked>
</div>
</div>
{% endif %}
</div> </div>
{% endif %}
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
@ -267,7 +277,7 @@
<button class="btn btn-primary disabled">{% trans "Create" %}</button> <button class="btn btn-primary disabled">{% trans "Create" %}</button>
{% endif %} {% endif %}
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</div> </div>