This commit is contained in:
notCharles 2024-05-29 19:18:09 -04:00
parent dd223b47c0
commit a6d07ede5a
2 changed files with 14 additions and 5 deletions

View File

@ -566,8 +566,16 @@ class EditServer extends EditRecord
}) })
->columnSpan(6), ->columnSpan(6),
]), ]),
Tabs\Tab::make('Mounts'), Tabs\Tab::make('Mounts')
Tabs\Tab::make('Databases'), ->schema([
Forms\Components\Placeholder::make('soon')
->label('Soon™'),
]),
Tabs\Tab::make('Databases')
->schema([
Forms\Components\Placeholder::make('soon')
->label('Soon™'),
]),
Tabs\Tab::make('Actions') Tabs\Tab::make('Actions')
->schema([ ->schema([
Forms\Components\Fieldset::make('Server Actions') Forms\Components\Fieldset::make('Server Actions')
@ -631,9 +639,10 @@ class EditServer extends EditRecord
->schema([ ->schema([
Forms\Components\Actions::make([ Forms\Components\Actions::make([
Forms\Components\Actions\Action::make('transfer') Forms\Components\Actions\Action::make('transfer')
->label('Transfer') ->label('Transfer Soon™')
->action(fn (TransferServerService $transfer, Server $server) => $transfer->handle($server, $data)) ->action(fn (TransferServerService $transfer, Server $server) => $transfer->handle($server, $data))
->form([ ->disabled() //TODO!
->form([ //TODO!
Forms\Components\Select::make('newNode') Forms\Components\Select::make('newNode')
->label('New Node') ->label('New Node')
->required() ->required()

View File

@ -53,7 +53,7 @@ class TransferServerService
{ {
$node_id = $data['node_id']; $node_id = $data['node_id'];
$allocation_id = intval($data['allocation_id']); $allocation_id = intval($data['allocation_id']);
$additional_allocations = array_map('intval', $data['allocation_additional'] ?? []); $additional_allocations = array_map(intval(...), $data['allocation_additional'] ?? []);
// Check if the node is viable for the transfer. // Check if the node is viable for the transfer.
$node = Node::query() $node = Node::query()