mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 10:54:46 +02:00
Add skeleton for adding new allocations
This commit is contained in:
parent
e25ca5dfc1
commit
ee735c9b77
@ -3,6 +3,7 @@
|
||||
namespace App\Filament\Resources\NodeResource\Pages;
|
||||
|
||||
use App\Filament\Resources\NodeResource;
|
||||
use App\Models\Allocation;
|
||||
use App\Models\Node;
|
||||
use Filament\Actions;
|
||||
use Filament\Forms;
|
||||
@ -63,7 +64,37 @@ class EditNode extends EditRecord
|
||||
->minValue(0)
|
||||
->maxValue(65535)
|
||||
->numeric(),
|
||||
Forms\Components\Select::make('server_id')->relationship('server', 'name'),
|
||||
Forms\Components\TextInput::make('server')
|
||||
->formatStateUsing(fn (Allocation $allocation) => $allocation->server?->name)
|
||||
->readOnly()
|
||||
->placeholder('No Server'),
|
||||
]),
|
||||
Forms\Components\Section::make('Assign New Allocations')
|
||||
->columnSpan(2)
|
||||
->inlineLabel()
|
||||
->headerActions([
|
||||
Forms\Components\Actions\Action::make('submit')
|
||||
->color('success')
|
||||
->action(function () {
|
||||
// ...
|
||||
}),
|
||||
])
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('ip')
|
||||
->label('IP Address')
|
||||
->placeholder('0.0.0.0')
|
||||
->helperText('IP address to assign ports to')
|
||||
->columnSpanFull(),
|
||||
Forms\Components\TextInput::make('ip_alias')
|
||||
->label('Alias')
|
||||
->placeholder('minecraft')
|
||||
->helperText('Display name to help you remember')
|
||||
->columnSpanFull(),
|
||||
Forms\Components\TextInput::make('ports')
|
||||
->label('Ports')
|
||||
->placeholder('25565')
|
||||
->helperText('Individual ports or port ranges here separated by commas or spaces')
|
||||
->columnSpanFull(),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
Loading…
x
Reference in New Issue
Block a user