mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: fix custom offering cpuspeed during vm import (#7423)
* ui: fix custom offering cpuspeed during import vm Fixes #7420 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> * refactor Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> --------- Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
b84744d9a5
commit
d147f1cc3b
@ -177,6 +177,7 @@
|
||||
:maxCpu="getMaxCpu()"
|
||||
:minMemory="getMinMemory()"
|
||||
:maxMemory="getMaxMemory()"
|
||||
:cpuSpeed="getCPUSpeed()"
|
||||
@update-iops-value="updateFieldValue"
|
||||
@update-compute-cpunumber="updateFieldValue"
|
||||
@update-compute-cpuspeed="updateFieldValue"
|
||||
@ -522,6 +523,15 @@ export default {
|
||||
}
|
||||
return 'serviceofferingdetails' in this.computeOffering ? this.computeOffering.serviceofferingdetails.maxmemory * 1 : Number.MAX_SAFE_INTEGER
|
||||
},
|
||||
getCPUSpeed () {
|
||||
if (!this.computeOffering) {
|
||||
return 0
|
||||
}
|
||||
if (this.computeOffering.cpuspeed) {
|
||||
return this.computeOffering.cpuspeed * 1
|
||||
}
|
||||
return this.resource.cpuspeed * 1 || 0
|
||||
},
|
||||
fetchOptions (param, name, exclude) {
|
||||
if (exclude && exclude.length > 0) {
|
||||
if (exclude.includes(name)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user