From 46fa7f473d668f08692c6e1adca751d0f4e1c57e Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Fri, 3 Dec 2021 06:58:42 +0100 Subject: [PATCH] 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 e9e599a2737..c44b3f958df 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'),