[UI] Use CPU frequency of unconstrained offerings when importing VMs from vCenter (#7222)

Co-authored-by: SadiJr <sadi@scclouds.com.br>
This commit is contained in:
SadiJr 2023-06-06 09:02:08 -03:00 committed by GitHub
parent c944727d33
commit d93fe91364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
},