fix: backup now button
This commit is contained in:
parent
8a93f1fc0c
commit
054bebb081
2 changed files with 15 additions and 8 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
use App\Models\ScheduledDatabaseBackup;
|
use App\Models\ScheduledDatabaseBackup;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Models\StandalonePostgresql;
|
use App\Models\StandalonePostgresql;
|
||||||
|
use App\Jobs\DatabaseBackupJob;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
class Backup extends Component
|
class Backup extends Component
|
||||||
|
|
@ -67,6 +68,12 @@ public function add_coolify_database()
|
||||||
$this->s3s = S3Storage::whereTeamId(0)->get();
|
$this->s3s = S3Storage::whereTeamId(0)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function backup_now() {
|
||||||
|
dispatch(new DatabaseBackupJob(
|
||||||
|
backup: $this->backup
|
||||||
|
));
|
||||||
|
$this->emit('success', 'Backup queued. It will be available in a few minutes');
|
||||||
|
}
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
$this->emit('success', 'Backup updated successfully');
|
$this->emit('success', 'Backup updated successfully');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue