mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
c164b93526
commit
b865f1ef35
2 changed files with 10 additions and 1 deletions
|
@ -10,6 +10,7 @@ use Filament\Forms\Form;
|
|||
use Filament\Pages\Concerns\ExposesTableToWidgets;
|
||||
use Filament\Resources\Components\Tab;
|
||||
use Filament\Resources\Pages\ManageRecords;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ManageBackups extends ManageRecords
|
||||
{
|
||||
|
@ -19,8 +20,15 @@ class ManageBackups extends ManageRecords
|
|||
|
||||
protected function getActions(): array
|
||||
{
|
||||
$restoringBackup = false;
|
||||
$checkJob = DB::table('jobs')->where('payload', 'like', '%RestoreBackup%')->first();
|
||||
if ($checkJob) {
|
||||
$restoringBackup = true;
|
||||
}
|
||||
|
||||
return [
|
||||
Actions\Action::make('restore')
|
||||
->hidden($restoringBackup)
|
||||
->icon('heroicon-o-cloud-arrow-up')
|
||||
->slideOver()
|
||||
->modalHeading('Restore data from backup file')
|
||||
|
|
|
@ -37,7 +37,8 @@ class RestoreBackup implements ShouldQueue
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
sleep(14);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue