Skip to content

Commit

Permalink
B #5873: Fix VM Template creation with memory cost in GB (#2141)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederick Borges authored Jun 10, 2022
1 parent fa6917f commit 782660a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ define(function(require) {
CapacityCreate.calculatedRealMemory(context);
});

context.on("change", "#CPU_COST", function() {
context.on("change", "#CPU_COST", function() {
CapacityCreate.calculatedRealCpu(context);
});

Expand Down Expand Up @@ -237,12 +237,12 @@ define(function(require) {
cpu_input = "1";
// [NUMA]
$("#numa-pin-policy", formContext)
.prop('disabled', false)
.prop("disabled", false)
.val("SHARED")
.prop('disabled', true);
.prop("disabled", true);
$("#numa-sockets", formContext).val("1");
$("#numa-threads", formContext)
.prop('disabled', false)
.prop("disabled", false)
.prop("max", NUMA_THREADS_MAX)
.val(NUMA_THREADS_MIN)
.keyup(function(){
Expand All @@ -251,7 +251,7 @@ define(function(require) {
else if (this.value < NUMA_THREADS_MIN)
this.value = NUMA_THREADS_MIN;
});


$(".disabled_firecracker", formContext).prop("disabled", true);
$(".not_firecracker", formContext).hide();
Expand Down Expand Up @@ -377,7 +377,7 @@ define(function(require) {
templateJSON["VCENTER_VM_FOLDER"] = WizardFields.retrieveInput($("#vcenter_vm_folder", context));
}
}

if (templateJSON["HYPERVISOR"] == "lxc"){
templateJSON["LXC_UNPRIVILEGED"] = $("#lxc_security_unprivileged", context).val().toUpperCase();
}
Expand Down Expand Up @@ -423,7 +423,7 @@ define(function(require) {
$.extend(true, templateJSON, CapacityCreate.retrieve($("div.capacityCreate", context)));

if (templateJSON["MEMORY_COST"] && templateJSON["MEMORY_UNIT_COST"] && templateJSON["MEMORY_UNIT_COST"] == "GB") {
templateJSON["MEMORY_COST"] = templateJSON["MEMORY_COST"] / 1024;
templateJSON["MEMORY_COST"] = (templateJSON["MEMORY_COST"] / 1024).toString();
}
if (templateJSON["DISK_COST"]) {
templateJSON["DISK_COST"] = (templateJSON["DISK_COST"] / 1024).toString();
Expand Down

0 comments on commit 782660a

Please sign in to comment.