Merge pull request #238 from Boy132/fix/236

Add default for disk/ memory and overallocation
This commit is contained in:
Charles 2024-05-16 11:31:25 -04:00 committed by GitHub
commit 289eda64ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,6 @@
namespace App\Filament\Resources\DatabaseHostResource\RelationManagers;
use App\Models\Database;
use App\Models\DatabaseHost;
use App\Services\Databases\DatabasePasswordService;
use Filament\Forms;
use Filament\Forms\Components\Actions\Action;
@ -16,7 +15,7 @@ class DatabasesRelationManager extends RelationManager
{
protected static string $relationship = 'databases';
protected $listeners = ['refresh'=>'refreshForm'];
protected $listeners = ['refresh' => 'refreshForm'];
public function form(Form $form): Form
{

View File

@ -255,7 +255,8 @@ class CreateNode extends CreateRecord
->suffix('MiB')
->columnSpan(2)
->numeric()
->minValue(0),
->minValue(0)
->default(0),
Forms\Components\TextInput::make('memory_overallocate')
->dehydratedWhenHidden()
->label('Overallocate')->inlineLabel()
@ -266,6 +267,7 @@ class CreateNode extends CreateRecord
->numeric()
->minValue(-1)
->maxValue(100)
->default(0)
->suffix('%'),
]),
Forms\Components\Grid::make()
@ -294,7 +296,8 @@ class CreateNode extends CreateRecord
->suffix('MiB')
->columnSpan(2)
->numeric()
->minValue(0),
->minValue(0)
->default(0),
Forms\Components\TextInput::make('disk_overallocate')
->dehydratedWhenHidden()
->hidden(fn (Forms\Get $get) => $get('unlimited_disk'))
@ -305,6 +308,7 @@ class CreateNode extends CreateRecord
->numeric()
->minValue(-1)
->maxValue(100)
->default(0)
->suffix('%'),
]),
]),