mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 05:04:44 +02:00
Get docker images working
This commit is contained in:
parent
f201a5eaf6
commit
a4fb9eea40
@ -4,6 +4,7 @@ namespace App\Filament\Resources;
|
|||||||
|
|
||||||
use App\Filament\Resources\ServerResource\Pages;
|
use App\Filament\Resources\ServerResource\Pages;
|
||||||
use App\Filament\Resources\ServerResource\RelationManagers;
|
use App\Filament\Resources\ServerResource\RelationManagers;
|
||||||
|
use App\Models\Egg;
|
||||||
use App\Models\Node;
|
use App\Models\Node;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
@ -41,6 +42,7 @@ class ServerResource extends Resource
|
|||||||
->relationship('egg', 'name')
|
->relationship('egg', 'name')
|
||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
|
->live()
|
||||||
->required(),
|
->required(),
|
||||||
Forms\Components\Select::make('owner_id')
|
Forms\Components\Select::make('owner_id')
|
||||||
->relationship('user', 'username')
|
->relationship('user', 'username')
|
||||||
@ -81,11 +83,16 @@ class ServerResource extends Resource
|
|||||||
->required()
|
->required()
|
||||||
->numeric()
|
->numeric()
|
||||||
->default(0),
|
->default(0),
|
||||||
Forms\Components\Textarea::make('startup')
|
|
||||||
|
Forms\Components\Select::make('startup')
|
||||||
->required()
|
->required()
|
||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
Forms\Components\TextInput::make('image')
|
|
||||||
|
Forms\Components\Select::make('image')
|
||||||
|
->options(fn (Forms\Get $get) => array_flip(Egg::find($get('egg_id'))->docker_images ?? []))
|
||||||
|
->selectablePlaceholder(false)
|
||||||
->required(),
|
->required(),
|
||||||
|
|
||||||
Forms\Components\TextInput::make('allocation_limit')
|
Forms\Components\TextInput::make('allocation_limit')
|
||||||
->numeric(),
|
->numeric(),
|
||||||
Forms\Components\TextInput::make('database_limit')
|
Forms\Components\TextInput::make('database_limit')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user