Add all files
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Paymenter\Extensions\Servers\Proxmox\Admin\Resources\ServerResource\Pages;
|
||||
|
||||
use Filament\Actions;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use Paymenter\Extensions\Servers\Proxmox\Admin\Resources\ServerResource;
|
||||
use Paymenter\Extensions\Servers\Proxmox\Proxmox;
|
||||
|
||||
class EditServer extends EditRecord
|
||||
{
|
||||
protected static string $resource = ServerResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
Actions\Action::make('reinstall')
|
||||
->label('Reinstall')
|
||||
->action(function () {
|
||||
$proxmox = new Proxmox;
|
||||
$proxmox->reinstall($this->record);
|
||||
|
||||
Notification::make()
|
||||
->title('Reinstalling server')
|
||||
->success()
|
||||
->body('The server is being reinstalled.')
|
||||
->send();
|
||||
})
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
->icon('ri-refresh-line'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user