This is an automated email from the ASF dual-hosted git repository.

weizhou pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new 46fa7f4  UI bug fix: 'Invalid ip address' when change vm ip address 
(#5744)
46fa7f4 is described below

commit 46fa7f473d668f08692c6e1adca751d0f4e1c57e
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Dec 3 06:58:42 2021 +0100

    UI bug fix: 'Invalid ip address' when change vm ip address (#5744)
---
 ui/src/views/compute/InstanceTab.vue | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/ui/src/views/compute/InstanceTab.vue 
b/ui/src/views/compute/InstanceTab.vue
index e9e599a..c44b3f9 100644
--- a/ui/src/views/compute/InstanceTab.vue
+++ b/ui/src/views/compute/InstanceTab.vue
@@ -586,10 +586,13 @@ export default {
       if (this.loadingNic) return
       this.loadingNic = true
       this.showUpdateIpModal = false
-      api('updateVmNicIp', {
-        nicId: this.editIpAddressNic,
-        ipaddress: this.editIpAddressValue
-      }).then(response => {
+      const params = {
+        nicId: this.editIpAddressNic
+      }
+      if (this.editIpAddressValue) {
+        params.ipaddress = this.editIpAddressValue
+      }
+      api('updateVmNicIp', params).then(response => {
         this.$pollJob({
           jobId: response.updatevmnicipresponse.jobid,
           successMessage: this.$t('message.success.update.ipaddress'),

Reply via email to