Merge pull request #3163 from ajyey/feature/disable-max-backup-size

Adds support for allowing backups of unlimited size
This commit is contained in:
advplyr 2024-07-17 17:09:37 -05:00 committed by GitHub
commit 03be947ad6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 14 deletions

View file

@ -170,7 +170,7 @@ export default {
})
},
updateBackupsSettings() {
if (isNaN(this.maxBackupSize) || this.maxBackupSize <= 0) {
if (isNaN(this.maxBackupSize) || this.maxBackupSize < 0) {
this.$toast.error('Invalid maximum backup size')
return
}
@ -200,10 +200,9 @@ export default {
},
initServerSettings() {
this.newServerSettings = this.serverSettings ? { ...this.serverSettings } : {}
this.backupsToKeep = this.newServerSettings.backupsToKeep || 2
this.enableBackups = !!this.newServerSettings.backupSchedule
this.maxBackupSize = this.newServerSettings.maxBackupSize || 1
this.maxBackupSize = this.newServerSettings.maxBackupSize === 0 ? 0 : this.newServerSettings.maxBackupSize || 1
this.cronExpression = this.newServerSettings.backupSchedule || '30 1 * * *'
}
},