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

hide some details with a collapse while custom/template instance creation

This commit is contained in:
catborise 2020-05-19 23:01:37 +03:00 committed by catborise
parent 0e5840498e
commit 34006ad223

View file

@ -378,25 +378,6 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Metadata" %}</label>
<div class="col-sm-7">
<input type="checkbox" name="meta_prealloc" title="Metadata preallocation" value="true">
</div>
<label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "HDD cache mode" %}</label>
<div class="col-sm-7">
<select id="cache_mode" name="cache_mode" class="form-control">
{% 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-7"> <div class="col-sm-7">
@ -411,85 +392,113 @@
</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-7"> <div class="col-sm-7">
<select name="nwfilter" class="custom-select"> <button class="btn btn-block btn-outline-light" type="button" data-toggle="collapse" data-target="#customAdvCollapse" 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>
{% if dom_caps.graphics_support == 'yes' %} <div class="collapse" id="customAdvCollapse">
<div class="form-group row"> <div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Graphics" %}</label> <label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label>
<div class="col-sm-7"> <div class="col-sm-7">
<select name="graphics" class="custom-select"> <input type="checkbox" name="meta_prealloc" title="Metadata Preallocation" value="true">
{% for graphics in dom_caps.graphics_types %} </div>
<option value="{{ graphics }}" {% if default_graphics == graphics %}selected{% endif %}>{{ graphics }}</option> <label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "HDD Cache Mode" %}</label>
<div class="col-sm-7">
<select id="cache_mode" name="cache_mode" class="form-control">
{% for mode, name in cache_modes %}
<option value="{{ mode }}" {% ifequal mode default_cache %}selected {% endifequal %}>
{% trans name %}</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 "NWFilter" %}</label>
<label class="col-sm-3 col-form-label">{% trans "Video" %}</label> <div class="col-sm-7">
<div class="col-sm-7"> <select name="nwfilter" class="custom-select">
<select name="video" class="custom-select"> <option value="">{% trans "None" %}</option>
{% if not videos %} {% for nwfilter in nwfilters %}
<option value="vga">vga</option> <option value="{{ nwfilter }}">{{ nwfilter }}</option>
<option value="cirrus">cirrus</option> {% endfor %}
{% endif %} </select>
{% for video in videos %} </div>
<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-7"> <div class="col-sm-7">
<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>
{% endif %}
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Video" %}</label>
<div class="col-sm-7">
<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 "Console Password" %}</label> <div class="col-sm-7">
<div class="col-sm-7"> <select name="listener_addr" class="custom-select">
<input type="password" class="form-control" name="console_pass" placeholder="{% trans "Console Password" %}" maxlength="64"> {% 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">
<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 "Guest Agent" %}</label> <div class="col-sm-7">
<div class="col-sm-6"> <input type="password" class="form-control" name="console_pass" placeholder="{% trans "Console Password" %}" maxlength="64">
<input type="checkbox" name="qemu_ga" value="true" checked> </div>
</div> </div>
</div> <div class="form-group row">
{% if virtio_support %} <label class="col-sm-3 col-form-label">{% trans "Guest Agent" %}</label>
<div class="form-group row"> <div class="col-sm-6">
<label class="col-sm-3 col-form-label">{% trans "VirtIO" %}</label> <input type="checkbox" name="qemu_ga" value="true" checked>
<div class="col-sm-6"> </div>
<input type="checkbox" name="virtio" value="{{ virtio_support }}" 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 class="form-group row"> <div class="form-group row">
<div class="col-sm-7 offset-3"> <div class="col-sm-7 offset-3">
{% if storages %} {% if storages %}
<button type="submit" class="btn btn-block btn-primary" name="create" formnovalidate onclick="showPleaseWaitDialog()" value="1"> <button type="submit" class="btn btn-block btn-primary" name="create" formnovalidate onclick="showPleaseWaitDialog()" value="1">
{% trans "Create" %} {% trans "Create" %}
</button> </button>
{% else %} {% else %}
<button class="btn btn-block btn-primary disabled"> <button class="btn btn-block btn-primary disabled">
{% trans "Create" %} {% trans "Create" %}
</button> </button>
{% endif %} {% endif %}
</div> </div>
</div> </div>
</form> </form>
</div> </div>
@ -586,24 +595,6 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Metadata" %}</label>
<div class="col-sm-7">
<input type="checkbox" name="meta_prealloc" title="Metadata preallocation" value="true">
</div>
<label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "HDD cache mode" %}</label>
<div class="col-sm-7">
<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-7"> <div class="col-sm-7">
@ -615,72 +606,100 @@
</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-7"> <div class="col-sm-7">
<select name="nwfilter" class="custom-select"> <button class="btn btn-block btn-outline-light" type="button" data-toggle="collapse" data-target="#tempAdvCollapse" 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>
{% if dom_caps.graphics_support == 'yes' %} <div class="collapse" id="tempAdvCollapse">
<div class="form-group row"> <div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Graphics" %}</label> <label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label>
<div class="col-sm-7"> <div class="col-sm-7">
<select name="graphics" class="custom-select"> <input type="checkbox" name="meta_prealloc" title="Metadata preallocation" value="true">
{% for graphics in dom_caps.graphics_types %} </div>
<option value="{{ graphics }}" {% if default_graphics == graphics %}selected{% endif %}>{{ graphics }}</option> <label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
{% endfor %}
</select>
</div> </div>
</div> <div class="form-group row">
{% endif %} <label class="col-sm-3 col-form-label">{% trans "HDD cache mode" %}</label>
<div class="form-group row"> <div class="col-sm-7">
<label class="col-sm-3 col-form-label">{% trans "Video" %}</label> <select id="cache_mode" name="cache_mode" class="custom-select">
<div class="col-sm-7"> {% for mode, name in cache_modes %}
<select name="video" class="custom-select"> <option value="{{ mode }}" {% ifequal mode default_cache %}selected{% endifequal %}>
{% if not videos %} {% trans name %}</option>
<option value="vga">vga</option> {% endfor %}
<option value="cirrus">cirrus</option> </select>
{% endif %} </div>
{% for video in videos %}
<option value="{{ video }}">{{ video }}</option>
{% endfor %}
</select>
</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 "Console Access" %}</label> <div class="col-sm-7">
<div class="col-sm-7"> <select name="nwfilter" class="custom-select">
<select name="listener_addr" class="custom-select"> <option value="">{% trans "None" %}</option>
{% for addr, label in listener_addr %} {% for nwfilter in nwfilters %}
<option value="{{ addr }}" {% if addr == "0.0.0.0" %} selected {% endif %}>{{ label }}</option> <option value="{{ nwfilter }}">{{ nwfilter }}</option>
{% endfor %} {% endfor %}
</select> </select>
</div>
</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 Password" %}</label> <label class="col-sm-3 col-form-label">{% trans "Graphics" %}</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="password" class="form-control" name="console_pass" placeholder="{% trans "Console Password" %}" maxlength="64"> <select name="graphics" class="custom-select">
{% for graphics in dom_caps.graphics_types %}
<option value="{{ graphics }}" {% if default_graphics == graphics %}selected{% endif %}>{{ graphics }}</option>
{% endfor %}
</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 "Guest Agent" %}</label> <label class="col-sm-3 col-form-label">{% trans "Video" %}</label>
<div class="col-sm-6"> <div class="col-sm-7">
<input type="checkbox" name="qemu_ga" value="true" checked> <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">
{% if virtio_support %} <label class="col-sm-3 col-form-label">{% trans "Console Access" %}</label>
<div class="form-group row"> <div class="col-sm-7">
<label class="col-sm-3 col-form-label">{% trans "VirtIO" %}</label> <select name="listener_addr" class="custom-select">
<div class="col-sm-6"> {% for addr, label in listener_addr %}
<input type="checkbox" name="virtio" value="{{ virtio_support }}" checked> <option value="{{ addr }}" {% if addr == "0.0.0.0" %} selected {% endif %}>{{ label }}</option>
{% endfor %}
</select>
</div>
</div> </div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Console Password" %}</label>
<div class="col-sm-7">
<input type="password" class="form-control" name="console_pass" placeholder="{% trans "Console Password" %}" maxlength="64">
</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 class="form-group row"> <div class="form-group row">
<div class="col-sm-7 offset-3"> <div class="col-sm-7 offset-3">
{% if storages %} {% if storages %}