mirror of
https://github.com/pelican-dev/panel.git
synced 2025-10-29 23:26:52 +01:00
Switch tenant slug back to short uuid (#1732)
This commit is contained in:
parent
9f35f1c3ee
commit
5373f1e30a
@ -83,8 +83,8 @@ class Settings extends ServerFormPage
|
|||||||
'lg' => 4,
|
'lg' => 4,
|
||||||
])
|
])
|
||||||
->disabled(),
|
->disabled(),
|
||||||
TextInput::make('id')
|
TextInput::make('uuid_short')
|
||||||
->label(trans('server/setting.server_info.id'))
|
->label(trans('server/setting.server_info.uuid_short'))
|
||||||
->disabled()
|
->disabled()
|
||||||
->columnSpan(1),
|
->columnSpan(1),
|
||||||
TextInput::make('node.name')
|
TextInput::make('node.name')
|
||||||
|
|||||||
@ -381,7 +381,7 @@ class Server extends Model implements Validatable
|
|||||||
public function resolveRouteBinding($value, $field = null): ?self
|
public function resolveRouteBinding($value, $field = null): ?self
|
||||||
{
|
{
|
||||||
return match ($field) {
|
return match ($field) {
|
||||||
'uuid' => $this->where('uuid_short', $value)->orWhere('uuid', $value)->firstOrFail(),
|
'uuid', 'uuid_short' => $this->where('uuid_short', $value)->orWhere('uuid', $value)->firstOrFail(),
|
||||||
default => $this->where('id', $value)->firstOrFail(),
|
default => $this->where('id', $value)->firstOrFail(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ class ServerPanelProvider extends PanelProvider
|
|||||||
->id('server')
|
->id('server')
|
||||||
->path('server')
|
->path('server')
|
||||||
->homeUrl(fn () => Filament::getPanel('app')->getUrl())
|
->homeUrl(fn () => Filament::getPanel('app')->getUrl())
|
||||||
->tenant(Server::class)
|
->tenant(Server::class, 'uuid_short')
|
||||||
->userMenuItems([
|
->userMenuItems([
|
||||||
Action::make('to_serverList')
|
Action::make('to_serverList')
|
||||||
->label(trans('profile.server_list'))
|
->label(trans('profile.server_list'))
|
||||||
|
|||||||
@ -12,7 +12,7 @@ return [
|
|||||||
'notification_description' => 'Updated Server Description',
|
'notification_description' => 'Updated Server Description',
|
||||||
'failed' => 'Failed',
|
'failed' => 'Failed',
|
||||||
'uuid' => 'Server UUID',
|
'uuid' => 'Server UUID',
|
||||||
'id' => 'Server ID',
|
'uuid_short' => 'Server ID',
|
||||||
'node_name' => 'Node Name',
|
'node_name' => 'Node Name',
|
||||||
'limits' => [
|
'limits' => [
|
||||||
'title' => 'Limits',
|
'title' => 'Limits',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user