Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -8,14 +8,18 @@ use Livewire\Component;
|
||||
class BackupExecutions extends Component
|
||||
{
|
||||
public ?ScheduledDatabaseBackup $backup = null;
|
||||
|
||||
public $executions = [];
|
||||
|
||||
public $setDeletableBackup;
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
$userId = auth()->user()->id;
|
||||
|
||||
return [
|
||||
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
|
||||
"deleteBackup"
|
||||
'deleteBackup',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,11 +31,13 @@ class BackupExecutions extends Component
|
||||
$this->dispatch('success', 'Failed backups cleaned up.');
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteBackup($exeuctionId)
|
||||
{
|
||||
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();
|
||||
if (is_null($execution)) {
|
||||
$this->dispatch('error', 'Backup execution not found.');
|
||||
|
||||
return;
|
||||
}
|
||||
if ($execution->scheduledDatabaseBackup->database->getMorphClass() === 'App\Models\ServiceDatabase') {
|
||||
@@ -43,10 +49,12 @@ class BackupExecutions extends Component
|
||||
$this->dispatch('success', 'Backup deleted.');
|
||||
$this->refreshBackupExecutions();
|
||||
}
|
||||
|
||||
public function download_file($exeuctionId)
|
||||
{
|
||||
return redirect()->route('download.backup', $exeuctionId);
|
||||
}
|
||||
|
||||
public function refreshBackupExecutions(): void
|
||||
{
|
||||
if ($this->backup) {
|
||||
|
||||
Reference in New Issue
Block a user