This is an automated email from the ASF dual-hosted git repository.
shwstppr pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.17 by this push:
new 708382f965 ui: fix ui hang on offering creation with no zone (#6484)
708382f965 is described below
commit 708382f96504e2924d14d7e15d353c34a1a6487a
Author: Abhishek Kumar <[email protected]>
AuthorDate: Thu Jun 23 13:44:12 2022 +0530
ui: fix ui hang on offering creation with no zone (#6484)
Fixes UI hang issue when offering is created when there is no zone.
Signed-off-by: Abhishek Kumar <[email protected]>
---
ui/src/views/compute/CreateKubernetesCluster.vue | 4 +++-
ui/src/views/image/AddKubernetesSupportedVersion.vue | 4 +++-
ui/src/views/image/RegisterOrUploadIso.vue | 4 +++-
ui/src/views/offering/AddComputeOffering.vue | 4 +++-
ui/src/views/offering/AddDiskOffering.vue | 4 +++-
5 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/ui/src/views/compute/CreateKubernetesCluster.vue
b/ui/src/views/compute/CreateKubernetesCluster.vue
index 8cc666d878..3c16323836 100644
--- a/ui/src/views/compute/CreateKubernetesCluster.vue
+++ b/ui/src/views/compute/CreateKubernetesCluster.vue
@@ -341,7 +341,9 @@ export default {
params.showicon = true
api('listZones', params).then(json => {
const listZones = json.listzonesresponse.zone
- this.zones = this.zones.concat(listZones)
+ if (listZones) {
+ this.zones = this.zones.concat(listZones)
+ }
}).finally(() => {
this.zoneLoading = false
if (this.arrayHasItems(this.zones)) {
diff --git a/ui/src/views/image/AddKubernetesSupportedVersion.vue
b/ui/src/views/image/AddKubernetesSupportedVersion.vue
index c1a276af8b..8aab83bf12 100644
--- a/ui/src/views/image/AddKubernetesSupportedVersion.vue
+++ b/ui/src/views/image/AddKubernetesSupportedVersion.vue
@@ -194,7 +194,9 @@ export default {
this.zoneLoading = true
api('listZones', params).then(json => {
const listZones = json.listzonesresponse.zone
- this.zones = this.zones.concat(listZones)
+ if (listZones) {
+ this.zones = this.zones.concat(listZones)
+ }
}).finally(() => {
this.zoneLoading = false
if (this.arrayHasItems(this.zones)) {
diff --git a/ui/src/views/image/RegisterOrUploadIso.vue
b/ui/src/views/image/RegisterOrUploadIso.vue
index 155e61ee2a..c4f728adfb 100644
--- a/ui/src/views/image/RegisterOrUploadIso.vue
+++ b/ui/src/views/image/RegisterOrUploadIso.vue
@@ -232,7 +232,9 @@ export default {
}
api('listZones', params).then(json => {
const listZones = json.listzonesresponse.zone
- this.zones = this.zones.concat(listZones)
+ if (listZones) {
+ this.zones = this.zones.concat(listZones)
+ }
}).finally(() => {
this.zoneLoading = false
this.form.zoneid = (this.zones[0].id ? this.zones[0].id : '')
diff --git a/ui/src/views/offering/AddComputeOffering.vue
b/ui/src/views/offering/AddComputeOffering.vue
index 107d2f0ea8..3fa25e869a 100644
--- a/ui/src/views/offering/AddComputeOffering.vue
+++ b/ui/src/views/offering/AddComputeOffering.vue
@@ -807,7 +807,9 @@ export default {
this.zoneLoading = true
api('listZones', params).then(json => {
const listZones = json.listzonesresponse.zone
- this.zones = this.zones.concat(listZones)
+ if (listZones) {
+ this.zones = this.zones.concat(listZones)
+ }
}).finally(() => {
this.zoneLoading = false
})
diff --git a/ui/src/views/offering/AddDiskOffering.vue
b/ui/src/views/offering/AddDiskOffering.vue
index d2914a869c..1c9f5bc8c7 100644
--- a/ui/src/views/offering/AddDiskOffering.vue
+++ b/ui/src/views/offering/AddDiskOffering.vue
@@ -409,7 +409,9 @@ export default {
this.zoneLoading = true
api('listZones', params).then(json => {
const listZones = json.listzonesresponse.zone
- this.zones = this.zones.concat(listZones)
+ if (listZones) {
+ this.zones = this.zones.concat(listZones)
+ }
}).finally(() => {
this.zoneLoading = false
})