mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
* F #4801: Don't allow odd size memory for vCenter templates * F #4801: Only multiples of 4 for size memory for vCenter templates
This commit is contained in:
parent
f533249494
commit
f7633ae1d0
@ -186,10 +186,12 @@ define(function(require) {
|
||||
$("#vcenter_template_ref", context).attr("required", "");
|
||||
$("#vcenter_instance_id", context).attr("required", "");
|
||||
$("#vcenter_ccr_ref", context).attr("required", "");
|
||||
$("#MEMORY", context).attr("pattern", "^([048]|\\d*[13579][26]|\\d*[24680][048])$");
|
||||
} else {
|
||||
$("#vcenter_template_ref", context).removeAttr("required");
|
||||
$("#vcenter_instance_id", context).removeAttr("required");
|
||||
$("#vcenter_ccr_ref", context).removeAttr("required");
|
||||
$("#MEMORY", context).removeAttr("pattern");
|
||||
}
|
||||
// There is another listener in context.js setup
|
||||
});
|
||||
|
@ -84,6 +84,9 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function _totalCost(totalCostDisk=0){
|
||||
if(!this.totalCostDisk){
|
||||
this.totalCostDisk = 0;
|
||||
}
|
||||
var memory = document.getElementById('real_memory_cost').value;
|
||||
var cpu = document.getElementById('real_cpu_cost').value;
|
||||
if (totalCostDisk != 0){
|
||||
|
@ -493,6 +493,12 @@ define(function(require) {
|
||||
CapacityInputs.setup(capacityContext);
|
||||
CapacityInputs.fill(capacityContext, template_json.VMTEMPLATE);
|
||||
|
||||
if (template_json.VMTEMPLATE.TEMPLATE.HYPERVISOR == "vcenter"){
|
||||
$(".mb_input input", context).attr("pattern", "^([048]|\\d*[13579][26]|\\d*[24680][048])$");
|
||||
} else {
|
||||
$(".mb_input input", context).removeAttr("pattern");
|
||||
}
|
||||
|
||||
var cpuCost = template_json.VMTEMPLATE.TEMPLATE.CPU_COST;
|
||||
var memoryCost = template_json.VMTEMPLATE.TEMPLATE.MEMORY_COST;
|
||||
var memoryUnitCost = template_json.VMTEMPLATE.TEMPLATE.MEMORY_UNIT_COST;
|
||||
|
Loading…
x
Reference in New Issue
Block a user