mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Small updates (#787)
* increase action size on console * fix layout on create database
This commit is contained in:
parent
157fa45234
commit
8cc91b0747
@ -11,6 +11,7 @@ use App\Models\Server;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Support\Enums\ActionSize;
|
||||
|
||||
class Console extends Page
|
||||
{
|
||||
@ -57,14 +58,17 @@ class Console extends Page
|
||||
return [
|
||||
Action::make('start')
|
||||
->color('primary')
|
||||
->size(ActionSize::ExtraLarge)
|
||||
->action(fn () => $this->dispatch('setServerState', state: 'start'))
|
||||
->disabled(fn () => $server->isInConflictState()),
|
||||
Action::make('restart')
|
||||
->color('gray')
|
||||
->size(ActionSize::ExtraLarge)
|
||||
->action(fn () => $this->dispatch('setServerState', state: 'restart'))
|
||||
->disabled(fn () => $server->isInConflictState() || $server->retrieveStatus() == 'offline'),
|
||||
Action::make('stop')
|
||||
->color('danger')
|
||||
->size(ActionSize::ExtraLarge)
|
||||
->action(fn () => $this->dispatch('setServerState', state: 'stop'))
|
||||
->disabled(fn () => $server->isInConflictState() || $server->retrieveStatus() == 'offline'),
|
||||
];
|
||||
|
@ -102,15 +102,16 @@ class ListDatabases extends ListRecords
|
||||
->createAnother(false)
|
||||
->form([
|
||||
Grid::make()
|
||||
->columns(3)
|
||||
->columns(2)
|
||||
->schema([
|
||||
Select::make('database_host_id')
|
||||
->label('Database Host')
|
||||
->columnSpan(2)
|
||||
->required()
|
||||
->placeholder('Select Database Host')
|
||||
->options(fn () => $server->node->databaseHosts->mapWithKeys(fn (DatabaseHost $databaseHost) => [$databaseHost->id => $databaseHost->name])),
|
||||
TextInput::make('database')
|
||||
->columnSpan(2)
|
||||
->columnSpan(1)
|
||||
->label('Database Name')
|
||||
->prefix('s'. $server->id . '_')
|
||||
->hintIcon('tabler-question-mark')
|
||||
|
Loading…
x
Reference in New Issue
Block a user