Skip to content

Commit

Permalink
Small updates (#787)
Browse files Browse the repository at this point in the history
* increase action size on console

* fix layout on create database
  • Loading branch information
notAreYouScared authored Dec 8, 2024
1 parent 157fa45 commit 8cc91b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/Filament/Server/Pages/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Filament\Actions\Action;
use Filament\Facades\Filament;
use Filament\Pages\Page;
use Filament\Support\Enums\ActionSize;

class Console extends Page
{
Expand Down Expand Up @@ -57,14 +58,17 @@ protected function getHeaderActions(): array
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'),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,16 @@ protected function getHeaderActions(): array
->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')
Expand Down

0 comments on commit 8cc91b0

Please sign in to comment.