0.10.0: guided setup (prereqs, default datastore via config.xml + vm init, first switch) and dashboard hint

This commit is contained in:
Claw committed 2026-11-17 21:15:59 +01:00
1 parent 0bea2dce52
commit fd2f0192c3
6 files changed
+327 -2

No files matched your search

+18
View File
@@ -33,6 +33,8 @@ $vms = $vmprov['available'] ? vmm_list() : [];
$ver = $vmprov['available'] ? vmm_vm_version() : ['version' => '', 'rev' => ''];
$vm_dir = $vmprov['available'] ? vmm_vm_dir() : '';
$budget = vmm_ram_budget();
$switchList = $vmprov['available'] ? vmm_switches() : [];
$needsSetup = ($vm_dir === '' || $switchList === []);
$running = array_values(array_filter($vms, static fn(array $v): bool => ($v['state'] ?? '') === 'running'));
$mem_used = 0;
@@ -59,6 +61,22 @@ vmm_nav('dashboard');
<?php print_info_box(vmm_h((string)$_SESSION['vmmngr_error'])); unset($_SESSION['vmmngr_error']); ?>
<?php endif; ?>
<?php if ($needsSetup): ?>
<?php
$missing = [];
if ($vm_dir === '') {
$missing[] = 'vm_dir';
}
if ($switchList === []) {
$missing[] = gettext('switch');
}
print_info_box(sprintf(
gettext('Setup is incomplete (%s). Run the guided setup to register the default datastore and create a switch.'),
implode(', ', $missing)
) . ' <a class="formbtn" href="vmmngr_setup.php">' . gettext('Open setup') . '</a>');
?>
<?php endif; ?>
<?php if (!$vmprov['available']): ?>
<?php print_info_box(sprintf(gettext('vm-bhyve was not found. Neither %s nor the bundled copy exists.'), '/usr/local/sbin/vm')); ?>
<?php endif; ?>