mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-26 10:03:37 +03:00
* F #5284 Added unit size posibility (MB or GB) in attach volatile disk * F #5284 Added unit size posibility (MB or GB) in create image DS
This commit is contained in:
parent
79d5a4292c
commit
6b4664537c
@ -432,6 +432,11 @@ define(function(require) {
|
|||||||
break;
|
break;
|
||||||
case "datablock":
|
case "datablock":
|
||||||
size = WizardFields.retrieveInput($('#img_size', context));
|
size = WizardFields.retrieveInput($('#img_size', context));
|
||||||
|
|
||||||
|
if(size && $(".mb_input_unit", context).val() == "GB"){
|
||||||
|
size = size * 1024;
|
||||||
|
size = size.toString();
|
||||||
|
}
|
||||||
if (size) img_json["SIZE"] = size;
|
if (size) img_json["SIZE"] = size;
|
||||||
|
|
||||||
var vcenter_disk_type = WizardFields.retrieveInput($('#vcenter_disk_type', context));
|
var vcenter_disk_type = WizardFields.retrieveInput($('#vcenter_disk_type', context));
|
||||||
|
@ -99,9 +99,19 @@
|
|||||||
<div class="img_size row">
|
<div class="img_size row">
|
||||||
<div class="medium-6 columns">
|
<div class="medium-6 columns">
|
||||||
<label for="img_size">
|
<label for="img_size">
|
||||||
{{tr "Size in MB"}}
|
{{tr "Size"}}
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="img_size" id="img_size" />
|
<div class="input-group mb_input_wrapper">
|
||||||
|
<div class="input-group-field">
|
||||||
|
<input type="text" name="img_size" id="img_size" />
|
||||||
|
</div>
|
||||||
|
<div class="input-group-button">
|
||||||
|
<select class="mb_input_unit">
|
||||||
|
<option value="MB">{{tr "MB"}}</option>
|
||||||
|
<option value="GB" selected>{{tr "GB"}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="medium-6 columns only_vcenter">
|
<div class="medium-6 columns only_vcenter">
|
||||||
<label for="vcenter_disk_type">
|
<label for="vcenter_disk_type">
|
||||||
|
@ -148,8 +148,9 @@ define(function(require) {
|
|||||||
|
|
||||||
var tmpl = WizardFields.retrieve(selectedContext);
|
var tmpl = WizardFields.retrieve(selectedContext);
|
||||||
|
|
||||||
if(tmpl.SIZE){
|
if($(".mb_input_unit", context).val() == "GB"){
|
||||||
tmpl.SIZE = tmpl.SIZE * 1024;
|
tmpl.SIZE = tmpl.SIZE * 1024;
|
||||||
|
tmpl.SIZE = tmpl.SIZE.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("input[name='" + this.diskTabId + "']:checked", context).val() == "image" && !tmpl["IMAGE"] && !tmpl["IMAGE_ID"]){
|
if($("input[name='" + this.diskTabId + "']:checked", context).val() == "image" && !tmpl["IMAGE"] && !tmpl["IMAGE_ID"]){
|
||||||
|
@ -62,11 +62,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="disk_type" class="volatile" style="display: none;">
|
<div id="disk_type" class="volatile" style="display: none;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="medium-6 columns left">
|
<div class="medium-6 columns">
|
||||||
<label for="SIZE">
|
<label for="SIZE">
|
||||||
{{tr "Size in GB"}}
|
{{tr "Size"}}
|
||||||
</label>
|
</label>
|
||||||
<input wizard_field="SIZE" type="number" id="SIZE" name="SIZE"/>
|
<div class="input-group mb_input_wrapper">
|
||||||
|
<div class="input-group-field">
|
||||||
|
<input wizard_field="SIZE" type="number" id="SIZE" name="SIZE"/>
|
||||||
|
</div>
|
||||||
|
<div class="input-group-button">
|
||||||
|
<select class="mb_input_unit">
|
||||||
|
<option value="MB">{{tr "MB"}}</option>
|
||||||
|
<option value="GB" selected>{{tr "GB"}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user