@php $resolveStatus = function (mixed $value, bool $visible, bool $hasError): string { if (! $visible) { return 'pending'; } if ($value === true) { return 'success'; } if ($hasError) { return 'error'; } return 'running'; }; $showUptime = true; $showOs = (bool) $uptime; $showPrerequisites = (bool) ($uptime && $supported_os_type); $showDocker = (bool) ($uptime && $supported_os_type && $prerequisites_installed); $showCompose = $showDocker; $showVersion = (bool) ($showDocker && $docker_compose_installed); $validationComplete = (bool) ($uptime && $supported_os_type && $prerequisites_installed && $docker_installed && $docker_compose_installed && $docker_version); $checkpoints = [ [ 'title' => 'Server is reachable', 'description' => 'Verify SSH connectivity and key-based authentication', 'status' => $resolveStatus($uptime === null ? null : (bool) $uptime, $showUptime, (bool) $error && ! $uptime), 'visible' => $showUptime, ], [ 'title' => 'Supported OS type', 'description' => 'Confirm a supported Linux distribution', 'status' => $resolveStatus($supported_os_type === null ? null : (bool) $supported_os_type, $showOs, (bool) $error && $showOs && ! $supported_os_type), 'visible' => $showOs, ], [ 'title' => 'Prerequisites are installed', 'description' => 'Install required system packages when missing', 'status' => $resolveStatus($prerequisites_installed === null ? null : (bool) $prerequisites_installed, $showPrerequisites, (bool) $error && $showPrerequisites && ! $prerequisites_installed), 'visible' => $showPrerequisites, ], [ 'title' => 'Docker is installed', 'description' => 'Install or detect Docker Engine', 'status' => $resolveStatus($docker_installed === null ? null : (bool) $docker_installed, $showDocker, (bool) $error && $showDocker && ! $docker_installed), 'visible' => $showDocker, ], [ 'title' => 'Docker Compose is installed', 'description' => 'Install or detect Docker Compose', 'status' => $resolveStatus($docker_compose_installed === null ? null : (bool) $docker_compose_installed, $showCompose, (bool) $error && $showCompose && ! $docker_compose_installed), 'visible' => $showCompose, ], [ 'title' => 'Minimum Docker version', 'description' => 'Require Docker Engine '.str(config('constants.docker.minimum_required_version'))->before('.').' or newer', 'status' => $resolveStatus( isset($docker_version) ? (bool) $docker_version : null, $showVersion, (bool) $error && $showVersion && isset($docker_version) && ! $docker_version ), 'visible' => $showVersion, ], ]; @endphp
@if ($ask)
This will revalidate the server, install or update Docker Engine, Docker Compose, and related configuration. Docker Engine will restart, so running containers may be briefly unreachable.
Continue @else

Validation checkpoints

@foreach ($checkpoints as $checkpoint) @endforeach
@if ($validationComplete)
Validation complete
Close
@elseif ($isInstalling)
@endif @isset($error)
Validation failed
{!! $error !!}
Retry validation @endisset @endif