diff --git a/Plugin/unraid/include/monitor.php b/Plugin/unraid/include/monitor.php index 93d1a59..bd39592 100644 --- a/Plugin/unraid/include/monitor.php +++ b/Plugin/unraid/include/monitor.php @@ -20,6 +20,8 @@ function vv_partner_state(): array { $hostIds = array_filter(array_keys($vars), fn($k) => preg_match('/^HOST\d+$/', $k) && ($vars[$k] ?? '') !== ''); sort($hostIds); + $setupDb = vv_setup_state_read(); + $hosts = []; foreach ($hostIds as $id) { $hostname = $vars[$id] ?? ''; @@ -27,13 +29,17 @@ function vv_partner_state(): array { $isMe = strcasecmp($hostname, $myName) === 0; $isOwner = strcasecmp($id, $vars['PARTNERSHIP_OWNER_HOST'] ?? '') === 0; $online = $isMe ? true : ($tsPeers[strtolower($hostname)] ?? null); + $onboardPhase = $isMe ? null + : (($setupDb[$id . '_PHASE2_DONE'] ?? '') === 'true' ? 2 + : (($setupDb[$id . '_PHASE1_DONE'] ?? '') === 'true' ? 1 : 0)); $hosts[] = [ - 'id' => $id, - 'hostname' => $hostname, - 'owner' => $vars[$id . '_OWNER'] ?? '', - 'is_me' => $isMe, - 'is_owner' => $isOwner, - 'online' => $online, + 'id' => $id, + 'hostname' => $hostname, + 'owner' => $vars[$id . '_OWNER'] ?? '', + 'is_me' => $isMe, + 'is_owner' => $isOwner, + 'online' => $online, + 'onboard_phase' => $onboardPhase, ]; } diff --git a/Plugin/unraid/pages/monitor.php b/Plugin/unraid/pages/monitor.php index 9c2a5c2..632df90 100644 --- a/Plugin/unraid/pages/monitor.php +++ b/Plugin/unraid/pages/monitor.php @@ -632,6 +632,14 @@ function vvPollMonitor() { h.is_owner ? `OWNER` : '', ].join(''); + // Onboard phase indicator for remote hosts waiting to complete setup + const phase = h.onboard_phase ?? null; + const onboardBadge = (!h.is_me && phase !== null && phase < 2) + ? (phase === 1 + ? `