mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 08:44:46 +02:00
add mounts icons columns
This commit is contained in:
parent
4c09905503
commit
de02e8853d
@ -82,8 +82,8 @@ class MountResource extends Resource
|
|||||||
return $table
|
return $table
|
||||||
->searchable(false)
|
->searchable(false)
|
||||||
->columns([
|
->columns([
|
||||||
Tables\Columns\TextColumn::make('uuid')
|
Tables\Columns\TextColumn::make('id')
|
||||||
->label('UUID')
|
->label('')
|
||||||
->searchable(),
|
->searchable(),
|
||||||
Tables\Columns\TextColumn::make('name')
|
Tables\Columns\TextColumn::make('name')
|
||||||
->searchable(),
|
->searchable(),
|
||||||
@ -91,11 +91,14 @@ class MountResource extends Resource
|
|||||||
->searchable(),
|
->searchable(),
|
||||||
Tables\Columns\TextColumn::make('target')
|
Tables\Columns\TextColumn::make('target')
|
||||||
->searchable(),
|
->searchable(),
|
||||||
Tables\Columns\TextColumn::make('read_only')
|
Tables\Columns\IconColumn::make('read_only')
|
||||||
->numeric()
|
->icon(fn (bool $state) => $state ? 'tabler-circle-check-filled' : 'tabler-circle-x-filled')
|
||||||
|
->color(fn (bool $state) => $state ? 'success' : 'danger')
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('user_mountable')
|
Tables\Columns\IconColumn::make('user_mountable')
|
||||||
->numeric()
|
->hidden()
|
||||||
|
->icon(fn (bool $state) => $state ? 'tabler-circle-check-filled' : 'tabler-circle-x-filled')
|
||||||
|
->color(fn (bool $state) => $state ? 'success' : 'danger')
|
||||||
->sortable(),
|
->sortable(),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
|
@ -115,4 +115,9 @@ class Mount extends Model
|
|||||||
{
|
{
|
||||||
return $this->belongsToMany(Server::class);
|
return $this->belongsToMany(Server::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRouteKeyName(): string
|
||||||
|
{
|
||||||
|
return 'id';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user