mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 16:44:44 +02:00
Tweak EditNode layout for mobile (#752)
* Tweak EditNode layout for mobile * Replace hidden with toggle
This commit is contained in:
parent
141baeb035
commit
994852ca00
@ -48,7 +48,12 @@ class EditNode extends EditRecord
|
|||||||
Tab::make('')
|
Tab::make('')
|
||||||
->label('Overview')
|
->label('Overview')
|
||||||
->icon('tabler-chart-area-line-filled')
|
->icon('tabler-chart-area-line-filled')
|
||||||
->columns(6)
|
->columns([
|
||||||
|
'default' => 4,
|
||||||
|
'sm' => 2,
|
||||||
|
'md' => 4,
|
||||||
|
'lg' => 4,
|
||||||
|
])
|
||||||
->schema([
|
->schema([
|
||||||
Fieldset::make()
|
Fieldset::make()
|
||||||
->label('Node Information')
|
->label('Node Information')
|
||||||
@ -67,8 +72,20 @@ class EditNode extends EditRecord
|
|||||||
->label('Kernel')
|
->label('Kernel')
|
||||||
->content(fn (Node $node) => $node->systemInformation()['kernel_version'] ?? 'Unknown'),
|
->content(fn (Node $node) => $node->systemInformation()['kernel_version'] ?? 'Unknown'),
|
||||||
]),
|
]),
|
||||||
View::make('filament.components.node-cpu-chart')->columnSpan(3),
|
View::make('filament.components.node-cpu-chart')
|
||||||
View::make('filament.components.node-memory-chart')->columnSpan(3),
|
->columnSpan([
|
||||||
|
'default' => 4,
|
||||||
|
'sm' => 1,
|
||||||
|
'md' => 2,
|
||||||
|
'lg' => 2,
|
||||||
|
]),
|
||||||
|
View::make('filament.components.node-memory-chart')
|
||||||
|
->columnSpan([
|
||||||
|
'default' => 4,
|
||||||
|
'sm' => 1,
|
||||||
|
'md' => 2,
|
||||||
|
'lg' => 2,
|
||||||
|
]),
|
||||||
// TODO: Make purdy View::make('filament.components.node-storage-chart')->columnSpan(3),
|
// TODO: Make purdy View::make('filament.components.node-storage-chart')->columnSpan(3),
|
||||||
]),
|
]),
|
||||||
Tab::make('Basic Settings')
|
Tab::make('Basic Settings')
|
||||||
|
@ -47,16 +47,20 @@ class AllocationsRelationManager extends RelationManager
|
|||||||
|
|
||||||
// All assigned allocations
|
// All assigned allocations
|
||||||
->checkIfRecordIsSelectableUsing(fn (Allocation $allocation) => $allocation->server_id === null)
|
->checkIfRecordIsSelectableUsing(fn (Allocation $allocation) => $allocation->server_id === null)
|
||||||
|
->paginationPageOptions(['10', '20', '50', '100', '200', '500', '1000'])
|
||||||
->searchable()
|
->searchable()
|
||||||
->selectCurrentPageOnly() //Prevent people from trying to nuke 30,000 ports at once.... -,-
|
->selectCurrentPageOnly() //Prevent people from trying to nuke 30,000 ports at once.... -,-
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('id'),
|
TextColumn::make('id')
|
||||||
|
->toggleable()
|
||||||
|
->toggledHiddenByDefault(),
|
||||||
TextColumn::make('port')
|
TextColumn::make('port')
|
||||||
->searchable()
|
->searchable()
|
||||||
->label('Port'),
|
->label('Port'),
|
||||||
TextColumn::make('server.name')
|
TextColumn::make('server.name')
|
||||||
->label('Server')
|
->label('Server')
|
||||||
->icon('tabler-brand-docker')
|
->icon('tabler-brand-docker')
|
||||||
|
->visibleFrom('md')
|
||||||
->searchable()
|
->searchable()
|
||||||
->url(fn (Allocation $allocation): string => $allocation->server ? route('filament.admin.resources.servers.edit', ['record' => $allocation->server]) : ''),
|
->url(fn (Allocation $allocation): string => $allocation->server ? route('filament.admin.resources.servers.edit', ['record' => $allocation->server]) : ''),
|
||||||
TextInputColumn::make('ip_alias')
|
TextInputColumn::make('ip_alias')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user