From e00d9ed2730adfb63a21e24a1c8e046982c2ed8a Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Thu, 4 Apr 2024 21:43:18 -0400 Subject: [PATCH] Add some allocations --- .../Resources/NodeResource/Pages/EditNode.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/NodeResource/Pages/EditNode.php b/app/Filament/Resources/NodeResource/Pages/EditNode.php index e56024978..11943c8ea 100644 --- a/app/Filament/Resources/NodeResource/Pages/EditNode.php +++ b/app/Filament/Resources/NodeResource/Pages/EditNode.php @@ -47,8 +47,26 @@ class EditNode extends EditRecord ]), Tabs\Tab::make('Allocations') ->icon('tabler-plug-connected') + ->columns(5) ->schema([ - // ... + Forms\Components\Repeater::make('allocations') + ->orderColumn('server_id') + ->columnSpan(3) + ->columns(4) + ->relationship() + ->addActionLabel('Create New Allocation') + ->addAction(fn ($action) => $action->color('info')) + ->schema([ + Forms\Components\TextInput::make('ip') + ->label('IP Address'), + Forms\Components\TextInput::make('ip_alias') + ->label('Alias'), + Forms\Components\TextInput::make('port') + ->minValue(0) + ->maxValue(65535) + ->numeric(), + Forms\Components\Select::make('server_id')->relationship('server', 'name'), + ]) ]), ]) ]);