Skip to content

Commit d93fe91

Browse files
SadiJrSadiJr
andauthored
[UI] Use CPU frequency of unconstrained offerings when importing VMs from vCenter (#7222)
Co-authored-by: SadiJr <[email protected]>
1 parent c944727 commit d93fe91

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ui/src/views/tools/ImportUnmanagedInstance.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
:cpuSpeed="getCPUSpeed()"
181181
@update-iops-value="updateFieldValue"
182182
@update-compute-cpunumber="updateFieldValue"
183-
@update-compute-cpuspeed="updateFieldValue"
183+
@update-compute-cpuspeed="updateCpuSpeed"
184184
@update-compute-memory="updateFieldValue" />
185185
<div v-if="resource.disk && resource.disk.length > 1">
186186
<a-form-item name="selection" ref="selection">
@@ -595,6 +595,15 @@ export default {
595595
this.selectMatchingComputeOffering()
596596
})
597597
},
598+
updateCpuSpeed (name, value) {
599+
if (this.computeOffering.iscustomized) {
600+
if (this.computeOffering.serviceofferingdetails) {
601+
this.updateFieldValue(this.cpuSpeedKey, this.computeOffering.cpuspeed)
602+
} else {
603+
this.updateFieldValue(this.cpuSpeedKey, value)
604+
}
605+
}
606+
},
598607
updateFieldValue (name, value) {
599608
this.form[name] = value
600609
},

0 commit comments

Comments
 (0)