feat(backup): implement custom database type selection and enhance scheduled backups management

This commit is contained in:
Andras Bacsai
2025-04-30 16:44:44 +02:00
parent debfcb7028
commit fe24296de7
9 changed files with 74 additions and 36 deletions

View File

@@ -19,6 +19,8 @@ class ScheduledBackups extends Component
public $s3s;
public string $custom_type = 'mysql';
protected $listeners = ['refreshScheduledBackups'];
protected $queryString = ['selectedBackupId'];
@@ -49,6 +51,14 @@ class ScheduledBackups extends Component
}
}
public function setCustomType()
{
$this->database->custom_type = $this->custom_type;
$this->database->save();
$this->dispatch('success', 'Database type set.');
$this->refreshScheduledBackups();
}
public function delete($scheduled_backup_id): void
{
$this->database->scheduledBackups->find($scheduled_backup_id)->delete();
@@ -62,5 +72,6 @@ class ScheduledBackups extends Component
if ($id) {
$this->setSelectedBackup($id);
}
$this->dispatch('refreshScheduledBackups');
}
}