This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new d93fe913642 [UI] Use CPU frequency of unconstrained offerings when 
importing VMs from vCenter (#7222)
d93fe913642 is described below

commit d93fe913642dd1f5e116f27bf0b07f9986c24f6a
Author: SadiJr <[email protected]>
AuthorDate: Tue Jun 6 09:02:08 2023 -0300

    [UI] Use CPU frequency of unconstrained offerings when importing VMs from 
vCenter (#7222)
    
    Co-authored-by: SadiJr <[email protected]>
---
 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" />
               <div v-if="resource.disk && resource.disk.length > 1">
                 <a-form-item name="selection" ref="selection">
@@ -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
     },

Reply via email to