From d93fe913642dd1f5e116f27bf0b07f9986c24f6a Mon Sep 17 00:00:00 2001 From: SadiJr Date: Tue, 6 Jun 2023 09:02:08 -0300 Subject: [PATCH] [UI] Use CPU frequency of unconstrained offerings when importing VMs from vCenter (#7222) Co-authored-by: SadiJr --- ui/src/views/tools/ImportUnmanagedInstance.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/src/views/tools/ImportUnmanagedInstance.vue b/ui/src/views/tools/ImportUnmanagedInstance.vue index ca58bdd7327..7e89d48abb8 100644 --- a/ui/src/views/tools/ImportUnmanagedInstance.vue +++ b/ui/src/views/tools/ImportUnmanagedInstance.vue @@ -180,7 +180,7 @@ :cpuSpeed="getCPUSpeed()" @update-iops-value="updateFieldValue" @update-compute-cpunumber="updateFieldValue" - @update-compute-cpuspeed="updateFieldValue" + @update-compute-cpuspeed="updateCpuSpeed" @update-compute-memory="updateFieldValue" />
@@ -595,6 +595,15 @@ export default { this.selectMatchingComputeOffering() }) }, + updateCpuSpeed (name, value) { + if (this.computeOffering.iscustomized) { + if (this.computeOffering.serviceofferingdetails) { + this.updateFieldValue(this.cpuSpeedKey, this.computeOffering.cpuspeed) + } else { + this.updateFieldValue(this.cpuSpeedKey, value) + } + } + }, updateFieldValue (name, value) { this.form[name] = value },