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 <sadi@scclouds.com.br>
This commit is contained in:
SadiJr 2021-09-21 04:15:58 -03:00 committed by GitHub
parent daa183d9fd
commit 3eafbf7329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -479,8 +479,7 @@ export default {
parentSearch: this.onSearch,
parentChangeFilter: this.changeFilter,
parentChangeResource: this.changeResource,
parentPollActionCompletion: this.pollActionCompletion,
parentEditTariffAction: () => {}
parentPollActionCompletion: this.pollActionCompletion
}
},
data () {

View File

@ -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 => {

View File

@ -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({

View File

@ -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
}
}
}