From 58954354fdd440ebb452fd77860481aff3fea15b Mon Sep 17 00:00:00 2001 From: davidjumani Date: Fri, 19 Mar 2021 15:44:39 +0530 Subject: [PATCH 1/6] tests: Extend wait time after interrupt (#4815) Co-authored-by: dahn --- .../com/cloud/utils/backoff/impl/ConstantTimeBackoffTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/src/test/java/com/cloud/utils/backoff/impl/ConstantTimeBackoffTest.java b/utils/src/test/java/com/cloud/utils/backoff/impl/ConstantTimeBackoffTest.java index e1b029ee8d5..d53764109fb 100644 --- a/utils/src/test/java/com/cloud/utils/backoff/impl/ConstantTimeBackoffTest.java +++ b/utils/src/test/java/com/cloud/utils/backoff/impl/ConstantTimeBackoffTest.java @@ -43,7 +43,8 @@ public class ConstantTimeBackoffTest { Thread.sleep(100); Assert.assertFalse(backoff.getWaiters().isEmpty()); waitThread.interrupt(); - Thread.sleep(100); + final int TIMEOUT_AFTER_INTERUPT = 500; + Thread.sleep(TIMEOUT_AFTER_INTERUPT); Assert.assertTrue(backoff.getWaiters().isEmpty()); } From 6262366d85efb4a9adb01bc89926149d696b209b Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 22 Mar 2021 12:13:21 +0530 Subject: [PATCH 2/6] ui: Fix add primary store during Zone Deployment for PreSetup protocol (#4845) Co-authored-by: Pearl Dsilva --- ui/src/views/infra/zone/ZoneWizardAddResources.vue | 2 +- ui/src/views/infra/zone/ZoneWizardLaunchZone.vue | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ui/src/views/infra/zone/ZoneWizardAddResources.vue b/ui/src/views/infra/zone/ZoneWizardAddResources.vue index ba8cf207f09..4ba878ef7d5 100644 --- a/ui/src/views/infra/zone/ZoneWizardAddResources.vue +++ b/ui/src/views/infra/zone/ZoneWizardAddResources.vue @@ -351,7 +351,7 @@ export default { } }, { - title: 'label.SR.name', + title: 'label.sr.name', key: 'primaryStorageSRLabel', placeHolder: 'message.error.sr.namelabel', required: true, diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue index 49b91032d0d..d456827d8a1 100644 --- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue +++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue @@ -1283,7 +1283,7 @@ export default { } } - const server = this.prefillContent.primaryStorageServer ? this.prefillContent.primaryStorageServer.value : null + var server = this.prefillContent.primaryStorageServer ? this.prefillContent.primaryStorageServer.value : null let url = '' const protocol = this.prefillContent.primaryStorageProtocol.value @@ -1303,7 +1303,13 @@ export default { params['details[0].password'] = this.prefillContent.primaryStorageSMBPassword.value params['details[0].domain'] = this.prefillContent.primaryStorageSMBDomain.value } else if (protocol === 'PreSetup') { - let path = this.prefillContent.primaryStoragePath.value + let path = '' + if (this.stepData.clusterReturned.hypervisortype === 'XenServer') { + path = this.prefillContent.primaryStorageSRLabel.value + server = 'localhost' + } else { + path = this.prefillContent.primaryStoragePath.value + } if (path.substring(0, 1) !== '/') { path = '/' + path } From 83b568ecdee1360a80cfb938e0c8707a3c50fcfd Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Mon, 22 Mar 2021 12:14:29 +0530 Subject: [PATCH 3/6] ui: fix add cluster form for vmware (#4841) Filter null values else API returns error. Signed-off-by: Abhishek Kumar --- ui/src/views/infra/ClusterAdd.vue | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/ui/src/views/infra/ClusterAdd.vue b/ui/src/views/infra/ClusterAdd.vue index f4c03fe96a0..b44a6618338 100644 --- a/ui/src/views/infra/ClusterAdd.vue +++ b/ui/src/views/infra/ClusterAdd.vue @@ -247,19 +247,30 @@ export default { } this.loading = true this.parentToggleLoading() - api('addCluster', {}, 'POST', { + var data = { zoneId: this.zoneId, hypervisor: this.hypervisor, clustertype: this.clustertype, podId: this.podId, clustername: this.clustername, - ovm3pool: this.ovm3pool, - ovm3cluster: this.ovm3cluster, - ovm3vip: this.ovm3vip, - username: this.username, - password: this.password, url: this.url - }).then(response => { + } + if (this.ovm3pool) { + data.ovm3pool = this.ovm3pool + } + if (this.ovm3cluster) { + data.ovm3cluster = this.ovm3cluster + } + if (this.ovm3vip) { + data.ovm3vip = this.ovm3vip + } + if (this.username) { + data.username = this.username + } + if (this.password) { + data.password = this.password + } + api('addCluster', {}, 'POST', data).then(response => { const cluster = response.addclusterresponse.cluster[0] || {} if (cluster.id && this.showDedicated) { this.dedicateCluster(cluster.id) From a53ecacf4148dcadf61edfde653baf450265b47b Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Tue, 23 Mar 2021 20:51:44 +0700 Subject: [PATCH 4/6] ui: Fill out the search filter form field after performing a filter (#4855) * Fill out the search filter form field after performing a filter * fix button reset not work when refresh page --- ui/src/components/view/SearchView.vue | 24 ++++++++++++++++++++---- ui/src/views/AutogenView.vue | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ui/src/components/view/SearchView.vue b/ui/src/components/view/SearchView.vue index d7084e5989b..14a80422bef 100644 --- a/ui/src/components/view/SearchView.vue +++ b/ui/src/components/view/SearchView.vue @@ -53,7 +53,9 @@ + v-decorator="[field.name, { + initialValue: fieldValues[field.name] || null + }]" />
-1) { const cluster = response.filter(item => item.type === 'clusterid') - console.log(cluster) if (cluster && cluster.length > 0) { this.fields[clusterIndex].opts = cluster[0].data } @@ -294,8 +298,20 @@ export default { if (clusterIndex > -1) { this.fields[clusterIndex].loading = false } + this.fillFormFieldValues() }) }, + fillFormFieldValues () { + this.fieldValues = {} + if (Object.keys(this.$route.query).length > 0) { + this.fieldValues = this.$route.query + } + if (this.$route.meta.params) { + Object.assign(this.fieldValues, this.$route.meta.params) + } + this.inputKey = this.fieldValues['tags[0].key'] || null + this.inputValue = this.fieldValues['tags[0].value'] || null + }, fetchZones () { return new Promise((resolve, reject) => { api('listZones', { listAll: true }).then(json => { diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 0b8fa23e7f6..efb11763162 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -608,6 +608,7 @@ export default { params.page = this.page params.pagesize = this.pageSize + this.searchParams = params api(this.apiName, params).then(json => { var responseName var objectName From eaefc2a69fc979f5a5dfb25552ec2f3ab4cdd2f3 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Tue, 23 Mar 2021 20:52:59 +0700 Subject: [PATCH 5/6] ui: Fix the styles action button (#4856) --- ui/src/components/view/ActionButton.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/components/view/ActionButton.vue b/ui/src/components/view/ActionButton.vue index 4f205900d56..fd25c70d557 100644 --- a/ui/src/components/view/ActionButton.vue +++ b/ui/src/components/view/ActionButton.vue @@ -17,11 +17,11 @@