This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new d147f1cc3b2 ui: fix custom offering cpuspeed during vm import (#7423)
d147f1cc3b2 is described below
commit d147f1cc3b2c7c85a02838231c6d6a4c566056ac
Author: Abhishek Kumar <[email protected]>
AuthorDate: Mon May 1 18:53:17 2023 +0530
ui: fix custom offering cpuspeed during vm import (#7423)
* ui: fix custom offering cpuspeed during import vm
Fixes #7420
Signed-off-by: Abhishek Kumar <[email protected]>
* refactor
Signed-off-by: Abhishek Kumar <[email protected]>
---------
Signed-off-by: Abhishek Kumar <[email protected]>
---
ui/src/views/tools/ImportUnmanagedInstance.vue | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/ui/src/views/tools/ImportUnmanagedInstance.vue
b/ui/src/views/tools/ImportUnmanagedInstance.vue
index 7aaa562e20b..1e5629ba51a 100644
--- a/ui/src/views/tools/ImportUnmanagedInstance.vue
+++ b/ui/src/views/tools/ImportUnmanagedInstance.vue
@@ -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)) {