You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/09/21 07:16:17 UTC

[cloudstack] branch main updated: ui: edit tariff quota and allow user driven backups parameter in Import Backup Offering (#5454)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3eafbf7  ui: edit tariff quota and allow user driven backups parameter in Import Backup Offering (#5454)
3eafbf7 is described below

commit 3eafbf7329816acc81ddba27b08a972570f26ecd
Author: SadiJr <31...@users.noreply.github.com>
AuthorDate: Tue Sep 21 04:15:58 2021 -0300

    ui: edit tariff quota and allow user driven backups parameter in Import Backup Offering (#5454)
    
    * [UI] Fixes: edit tariff quota and allow user driven backups parameter in Import Backup Offering
    
    * Address reviews
    
    Co-authored-by: SadiJr <sa...@scclouds.com.br>
---
 ui/src/views/AutogenView.vue                         | 3 +--
 ui/src/views/offering/ImportBackupOffering.vue       | 4 ++--
 ui/src/views/plugins/quota/EditTariffValueWizard.vue | 2 +-
 ui/src/views/plugins/quota/QuotaTariff.vue           | 5 +++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue
index dc287c1..fe250af 100644
--- a/ui/src/views/AutogenView.vue
+++ b/ui/src/views/AutogenView.vue
@@ -479,8 +479,7 @@ export default {
       parentSearch: this.onSearch,
       parentChangeFilter: this.changeFilter,
       parentChangeResource: this.changeResource,
-      parentPollActionCompletion: this.pollActionCompletion,
-      parentEditTariffAction: () => {}
+      parentPollActionCompletion: this.pollActionCompletion
     }
   },
   data () {
diff --git a/ui/src/views/offering/ImportBackupOffering.vue b/ui/src/views/offering/ImportBackupOffering.vue
index 2a989d4..d675059 100644
--- a/ui/src/views/offering/ImportBackupOffering.vue
+++ b/ui/src/views/offering/ImportBackupOffering.vue
@@ -80,7 +80,7 @@
       <a-form-item>
         <tooltip-label slot="label" :title="$t('label.allowuserdrivenbackups')" :tooltip="apiParams.allowuserdrivenbackups.description"/>
         <a-switch
-          v-decorator="['allowuserdrivenbackups']"
+          v-decorator="['allowuserdrivenbackups', { initialValue: true }]"
           :default-checked="true"/>
       </a-form-item>
       <div :span="24" class="action-button">
@@ -169,7 +169,7 @@ export default {
             params[key] = input
           }
         }
-        params.allowuserdrivenbackups = values.allowuserdrivenbackups ? values.allowuserdrivenbackups : true
+        params.allowuserdrivenbackups = values.allowuserdrivenbackups
         this.loading = true
         const title = this.$t('label.import.offering')
         api('importBackupOffering', params).then(json => {
diff --git a/ui/src/views/plugins/quota/EditTariffValueWizard.vue b/ui/src/views/plugins/quota/EditTariffValueWizard.vue
index 7901f26..5137961 100644
--- a/ui/src/views/plugins/quota/EditTariffValueWizard.vue
+++ b/ui/src/views/plugins/quota/EditTariffValueWizard.vue
@@ -122,7 +122,7 @@ export default {
             }
             this.parentFetchData()
           }
-
+          this.$message.success(`${this.$t('message.setting.updated')} ${this.resource.description}`)
           this.onClose()
         }).catch(error => {
           this.$notification.error({
diff --git a/ui/src/views/plugins/quota/QuotaTariff.vue b/ui/src/views/plugins/quota/QuotaTariff.vue
index 786d74e..2d304c4 100644
--- a/ui/src/views/plugins/quota/QuotaTariff.vue
+++ b/ui/src/views/plugins/quota/QuotaTariff.vue
@@ -37,8 +37,8 @@ export default {
   },
   data () {
     return {
-      tariffAction: false,
-      tariffResource: {}
+      tariffAction: this.tariffAction,
+      tariffResource: this.tariffResource
     }
   },
   provide: function () {
@@ -54,6 +54,7 @@ export default {
     showTariffAction (showAction, resource) {
       this.tariffAction = showAction
       this.tariffResource = resource
+      this.loading = false
     }
   }
 }