diff --git a/app/Filament/Resources/EggResource/Pages/ListEggs.php b/app/Filament/Resources/EggResource/Pages/ListEggs.php index 534b483892..00be09020f 100644 --- a/app/Filament/Resources/EggResource/Pages/ListEggs.php +++ b/app/Filament/Resources/EggResource/Pages/ListEggs.php @@ -21,11 +21,12 @@ protected function getHeaderActions(): array Actions\CreateAction::make(), Actions\Action::make('import') - ->label('Import Egg') + ->label('Import') ->form([ Forms\Components\FileUpload::make('egg') ->acceptedFileTypes(['application/json']) - ->storeFiles(false), + ->storeFiles(false) + ->multiple(), ]) ->action(function (array $data): void { /** @var TemporaryUploadedFile $eggFile */ @@ -34,25 +35,25 @@ protected function getHeaderActions(): array /** @var EggImporterService $eggImportService */ $eggImportService = resolve(EggImporterService::class); - try { - $newEgg = $eggImportService->handle($eggFile); - } catch (Exception $exception) { - Notification::make() - ->title('Egg Import Failed') - ->danger() - ->send(); + foreach ($eggFile as $file) { + try { + $eggImportService->handle($file); + } catch (Exception $exception) { + Notification::make() + ->title('Import Failed') + ->danger() + ->send(); - report($exception); + report($exception); - return; + return; + } } Notification::make() - ->title("Egg Import Success: $newEgg->name") + ->title('Import Success') ->success() ->send(); - - redirect()->route('filament.admin.resources.eggs.edit', [$newEgg]); }), ]; } diff --git a/resources/views/filament/pages/dashboard.blade.php b/resources/views/filament/pages/dashboard.blade.php index c927f20d0c..46d601dad7 100644 --- a/resources/views/filament/pages/dashboard.blade.php +++ b/resources/views/filament/pages/dashboard.blade.php @@ -1,12 +1,10 @@ - - Panel's Resources: + + Overview: Nodes {{ $nodesCount }} @@ -14,8 +12,6 @@ Servers {{ $serversCount }} @@ -23,8 +19,6 @@ Eggs {{ $eggsCount }} @@ -32,8 +26,6 @@ Users {{ $usersCount }}