Update validation and configuration titles

This commit is contained in:
Andras Bacsai
2024-02-15 14:14:11 +01:00
parent 8e7745f4c1
commit d903a377bf
5 changed files with 120 additions and 102 deletions

View File

@@ -13,8 +13,9 @@ class Form extends Component
public ?string $wildcard_domain = null;
public int $cleanup_after_percentage;
public bool $dockerInstallationStarted = false;
public bool $revalidate = false;
protected $listeners = ['serverInstalled'];
protected $listeners = ['serverInstalled', 'revalidate' => '$refresh'];
protected $rules = [
'server.name' => 'required',
@@ -68,8 +69,9 @@ class Form extends Component
return handleError($e, $this);
}
}
public function revalidate() {
$this->validateServer();
public function revalidate()
{
$this->revalidate = true;
}
public function checkLocalhostConnection()
{

View File

@@ -19,12 +19,12 @@ class ValidateAndInstall extends Component
public $docker_version = null;
public $proxy_started = false;
public $error = null;
public bool $ask = false;
protected $listeners = ['validateServer' => 'init', 'validateDockerEngine', 'validateServerNow' => 'validateServer'];
public function init(bool $install = true)
{
$this->install = $install;
$this->uptime = null;
$this->supported_os_type = null;
@@ -34,9 +34,14 @@ class ValidateAndInstall extends Component
$this->proxy_started = null;
$this->error = null;
$this->number_of_tries = 0;
$this->dispatch('validateServerNow');
if (!$this->ask) {
$this->dispatch('validateServerNow');
}
}
public function startValidatingAfterAsking() {
$this->ask = false;
$this->init();
}
public function validateServer()
{
try {