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