You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sh...@apache.org on 2022/09/06 08:35:08 UTC

[cloudstack] branch 4.17 updated: ui: fix set reservation toggle in add public ip range (#6707)

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 1d20fcfc6e ui: fix set reservation toggle in add public ip range (#6707)
1d20fcfc6e is described below

commit 1d20fcfc6e15143dbf685e60f410f02f22b3316e
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Tue Sep 6 14:05:01 2022 +0530

    ui: fix set reservation toggle in add public ip range (#6707)
    
    Fixes 'Set reservation' toggle not getting updated on value change.
---
 ui/src/views/infra/network/IpRangesTabPublic.vue | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/ui/src/views/infra/network/IpRangesTabPublic.vue b/ui/src/views/infra/network/IpRangesTabPublic.vue
index 36a5d6480a..df78eba993 100644
--- a/ui/src/views/infra/network/IpRangesTabPublic.vue
+++ b/ui/src/views/infra/network/IpRangesTabPublic.vue
@@ -239,7 +239,7 @@
         </div>
         <div class="form__item" v-if="!basicGuestNetwork && form.iptype != 'ip6'">
           <div style="color: black;">{{ $t('label.set.reservation') }}</div>
-          <a-switch @change="handleShowAccountFields" />
+          <a-switch v-model:checked="showAccountFields" @change="handleShowAccountFields" />
         </div>
         <div v-if="showAccountFields && !basicGuestNetwork" style="margin-top: 20px;">
           <div v-html="$t('label.set.reservation.desc')"></div>
@@ -555,12 +555,9 @@ export default {
       this.fetchDomains()
     },
     handleShowAccountFields () {
-      if (this.showAccountFields === false) {
-        this.showAccountFields = true
+      if (this.showAccountFields) {
         this.fetchDomains()
-        return
       }
-      this.showAccountFields = false
     },
     handleOpenAddIpRangeModal () {
       this.initAddIpRangeForm()