mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
Feature #3907: Volatile Disk in Sunstone dialog has more intelligence
This commit is contained in:
parent
4eff27b6e1
commit
540bce8ce9
src/sunstone/public/app/tabs
images-tab/form-panels/create
templates-tab/form-panels/create/wizard-tabs/storage
@ -171,9 +171,9 @@
|
||||
</label>
|
||||
<select name="img_dev_prefix" id="img_dev_prefix">
|
||||
<option value="" selected="selected"></option>
|
||||
<option value="vd">virtio</option>
|
||||
<option value="hd">ide</option>
|
||||
<option value="sd">scsi</option>
|
||||
<option value="vd">Virtio</option>
|
||||
<option value="sd">SCSI</option>
|
||||
<option value="hd">Parallel ATA (IDE)</option>
|
||||
<option value="custom">custom</option>
|
||||
</select>
|
||||
<div>
|
||||
|
@ -106,9 +106,31 @@ define(function(require) {
|
||||
|
||||
$("[wizard_field]", imageContext).prop('wizard_field_disabled', false);
|
||||
$("[wizard_field]", volatileContext).prop('wizard_field_disabled', true);
|
||||
|
||||
// Volatile Type FS hides Format, Type SWAP displays Format
|
||||
$("select#TYPE", volatileContext).change(function() {
|
||||
var value = $(this).val();
|
||||
switch (value){
|
||||
case "fs":
|
||||
$("select#FORMAT", volatileContext).parent().show();
|
||||
break;
|
||||
case "swap":
|
||||
$("select#FORMAT", volatileContext).parent().hide();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function _retrieve(context) {
|
||||
|
||||
var volatileContext = $("div.volatile", context);
|
||||
var volatileType = $("select#TYPE", volatileContext).val();
|
||||
|
||||
if (volatileType == "swap")
|
||||
{
|
||||
$("select#FORMAT").val("");
|
||||
}
|
||||
|
||||
return WizardFields.retrieve(context);
|
||||
}
|
||||
|
||||
|
7
src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs
7
src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs
@ -194,7 +194,7 @@
|
||||
{{tr "Size"}}
|
||||
{{{tip (tr "Size of the new disk in MB")}}}
|
||||
</label>
|
||||
<input wizard_field="SIZE" type="text" id="SIZE" name="SIZE"/>
|
||||
<input wizard_field="SIZE" type="text" id="SIZE" name="SIZE" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -213,7 +213,10 @@
|
||||
{{tr "Format"}}
|
||||
{{{tip (tr "Filesystem type for the fs images")}}}
|
||||
</label>
|
||||
<input wizard_field="FORMAT" type="text" id="FORMAT" name="format" />
|
||||
<select wizard_field="FORMAT" name="format" id="FORMAT">
|
||||
<option value="raw" selected="selected">raw</option>
|
||||
<option value="qcow2">qcow2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user