1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Add destination storage option for instance creation from a template.

This commit is contained in:
catborise 2019-01-09 14:16:51 +03:00
parent 1aea7baada
commit fc6761aabc
3 changed files with 25 additions and 4 deletions

View file

@ -441,7 +441,7 @@
<label class="col-sm-3 control-label">{% trans "HDD" %}</label>
<input id="images" name="images" type="hidden" value=""/>
<div class="col-sm-3">
<select id="storage" name="storage" class="form-control" onchange="get_template_vols({{ compute_id }}, value);">
<select class="form-control" onchange="get_template_vols({{ compute_id }}, value);">
{% if storages %}
<option value disabled selected>{% trans "Select pool" %}...</option>
{% for storage in storages %}
@ -458,6 +458,20 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Storage" %}</label>
<div class="col-sm-7">
<select id="storage" name="storage" class="form-control" disabled>
{% if storages %}
{% for storage in storages %}
<option value="{{ storage }}" >{{ storage }}</option>
{% endfor %}
{% else %}
<option value="">{% trans "None" %}</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group meta-prealloc">
<label class="col-sm-3 control-label">{% trans "Metadata" %}</label>
<div class="col-sm-7">
@ -697,6 +711,9 @@
});
});
$("#template").removeAttr("disabled");
$("#storage").val(pool).change();
$("#storage").removeAttr("disabled");
}
function get_disk_bus_choices(compute_id, dev_idx, disk_type){