diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php index 8c75f887e..1c01345bb 100644 --- a/app/Http/Livewire/Server/Form.php +++ b/app/Http/Livewire/Server/Form.php @@ -54,6 +54,11 @@ class Form extends Component } catch (\Exception $e) { } } + public function delete() + { + $this->server->delete(); + redirect()->route('dashboard'); + } public function submit() { $this->validate(); diff --git a/app/Http/Livewire/Server/New/ByIp.php b/app/Http/Livewire/Server/New/ByIp.php index f003beb5f..e5fdafa98 100644 --- a/app/Http/Livewire/Server/New/ByIp.php +++ b/app/Http/Livewire/Server/New/ByIp.php @@ -45,6 +45,10 @@ class ByIp extends Component } public function submit() { + if (!$this->private_key_id) { + $this->addError('private_key_id', 'The private key field is required.'); + return; + } $server = Server::create([ 'name' => $this->name, 'description' => $this->description, diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index ab8ad04c4..65fccab1b 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -16,9 +16,9 @@ class AppServiceProvider extends ServiceProvider */ public function register(): void { - if (config('app.env') === 'production' && Str::contains(config('coolify.version'), ['nightly'])) { - Process::run('php artisan migrate:fresh --force --seed --seeder=ProductionSeeder'); - } + // if (config('app.env') === 'production' && Str::contains(config('coolify.version'), ['nightly'])) { + // Process::run('php artisan migrate:fresh --force --seed --seeder=ProductionSeeder'); + // } } /** diff --git a/app/View/Components/FormInput.php b/app/View/Components/FormInput.php index a96dc3b6c..efe511b6a 100644 --- a/app/View/Components/FormInput.php +++ b/app/View/Components/FormInput.php @@ -19,6 +19,7 @@ class FormInput extends Component public string|null $type = 'text', public bool $instantSave = false, public bool $disabled = false, + public bool $hidden = false ) { } diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index 77af63b9a..926fcae96 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -11,7 +11,7 @@ @else - + @endif @@ -22,6 +22,9 @@ Submit + {{-- --}} diff --git a/resources/views/livewire/server/new/by-ip.blade.php b/resources/views/livewire/server/new/by-ip.blade.php index a12ad1523..e4505b04e 100644 --- a/resources/views/livewire/server/new/by-ip.blade.php +++ b/resources/views/livewire/server/new/by-ip.blade.php @@ -1,26 +1,33 @@
- + +