mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
fix dashes on the name and better error handling (#336)
This commit is contained in:
@ -8,7 +8,6 @@
|
||||
use App\Web\Contracts\HasSecondSubNav;
|
||||
use App\Web\Pages\Servers\Page;
|
||||
use App\Web\Pages\Settings\StorageProviders\Actions\Create;
|
||||
use Exception;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
@ -73,7 +72,7 @@ protected function getHeaderActions(): array
|
||||
])
|
||||
->modalSubmitActionLabel('Create')
|
||||
->action(function (array $data) {
|
||||
try {
|
||||
run_action($this, function () use ($data) {
|
||||
app(CreateBackup::class)->create($this->server, $data);
|
||||
|
||||
$this->dispatch('$refresh');
|
||||
@ -82,14 +81,7 @@ protected function getHeaderActions(): array
|
||||
->success()
|
||||
->title('Backup created!')
|
||||
->send();
|
||||
} catch (Exception $e) {
|
||||
Notification::make()
|
||||
->danger()
|
||||
->title($e->getMessage())
|
||||
->send();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
});
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user