Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat: add retry functionality for server validation process

Andras Bacsai2bca22082cd9
diff --git a/app/Livewire/Server/ValidateAndInstall.php b/app/Livewire/Server/ValidateAndInstall.php
index 39b4736602..bbd7f3dd92 100644
--- a/app/Livewire/Server/ValidateAndInstall.php
+++ b/app/Livewire/Server/ValidateAndInstall.php
@@ -64,6 +64,19 @@ class ValidateAndInstall extends Component
$this->init();
}
+ public function retry()
+ {
+ $this->authorize('update', $this->server);
+ $this->uptime = null;
+ $this->supported_os_type = null;
+ $this->docker_installed = null;
+ $this->docker_compose_installed = null;
+ $this->docker_version = null;
+ $this->error = null;
+ $this->number_of_tries = 0;
+ $this->init();
+ }
+
public function validateConnection()
{
$this->authorize('update', $this->server);
diff --git a/resources/views/livewire/server/validate-and-install.blade.php b/resources/views/livewire/server/validate-and-install.blade.php
index 814f816524..572da85e87 100644
--- a/resources/views/livewire/server/validate-and-install.blade.php
+++ b/resources/views/livewire/server/validate-and-install.blade.php
@@ -123,6 +123,9 @@
<livewire:activity-monitor header="Docker Installation Logs" :showWaiting="false" />
@isset($error)
<pre class="font-bold whitespace-pre-line text-error">{!! $error !!}</pre>
+ <x-forms.button canGate="update" :canResource="$server" wire:click="retry" class="mt-4">
+ Retry Validation
+ </x-forms.button>
@endisset
@endif
</div>