This is an automated email from the ASF dual-hosted git repository.
dahn 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 b79e3937b46 UI: fix scale vm if first disk offering is dymamic (#8213)
b79e3937b46 is described below
commit b79e3937b46ffb4788d4139ee7b6f220f5d5614a
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Nov 10 14:15:42 2023 +0100
UI: fix scale vm if first disk offering is dymamic (#8213)
---
ui/src/views/compute/ScaleVM.vue | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/ui/src/views/compute/ScaleVM.vue b/ui/src/views/compute/ScaleVM.vue
index 1a1d1309720..4ae02e7a80b 100644
--- a/ui/src/views/compute/ScaleVM.vue
+++ b/ui/src/views/compute/ScaleVM.vue
@@ -221,16 +221,19 @@ export default {
this.params.serviceofferingid = id
this.selectedOffering = this.offeringsMap[id]
- api('listDiskOfferings', {
- id: this.selectedOffering.diskofferingid
- }).then(response => {
- const diskOfferings = response.listdiskofferingsresponse.diskoffering
|| []
- if (this.offerings) {
- this.selectedDiskOffering = diskOfferings[0]
- }
- }).catch(error => {
- this.$notifyError(error)
- })
+ this.selectedDiskOffering = null
+ if (this.selectedOffering.diskofferingid) {
+ api('listDiskOfferings', {
+ id: this.selectedOffering.diskofferingid
+ }).then(response => {
+ const diskOfferings =
response.listdiskofferingsresponse.diskoffering || []
+ if (this.diskOfferings) {
+ this.selectedDiskOffering = diskOfferings[0]
+ }
+ }).catch(error => {
+ this.$notifyError(error)
+ })
+ }
this.params.automigrate = this.autoMigrate
},
updateFieldValue (name, value) {