20, 'noVNC dependency graph was not validated'); $assert(is_file($public . '/vendor/novnc/LICENSE.txt'), 'Vendored noVNC license missing'); foreach (['almalinux', 'ubuntu', 'debian', 'centos'] as $system) { $assert(is_file($public . '/' . $system . '-icon.svg'), 'Local OS icon missing: ' . $system); } foreach (['user/layout_header.tpl', 'user/layout_plain_header.tpl', 'auth/layout_header.tpl'] as $template) { $source = file_get_contents($root . '/resources/views/venix/' . $template); $assert(str_contains($source, '/cloud/styles.css') && str_contains($source, '/cloud/account.css'), 'Unified user styles missing: ' . $template); $assert(!str_contains($source, 'user-home.css') && !str_contains($source, '/css/auth.css'), 'Retired user stylesheet still active: ' . $template); } $views = $root . '/resources/views/venix'; $cloudShell = file_get_contents($views . '/cloud/page.tpl'); $cloudPages = ''; foreach (glob($views . '/cloud/pages/*.tpl') as $template) { $cloudPages .= "\n" . file_get_contents($template); } $cloudTemplate = $cloudShell . $cloudPages; $userLayout = file_get_contents($views . '/user/layout_header.tpl'); $sharedSidebar = file_get_contents($views . '/user/panel_sidebar.tpl'); $sharedTopbar = file_get_contents($views . '/user/panel_topbar.tpl'); $clientEntry = file_get_contents($public . '/app.js'); $clientScript = $clientEntry . "\n" . file_get_contents($public . '/runtime.js'); foreach (['instances', 'detail', 'deploy', 'iso-images', 'ssh-keys', 'invoices', 'invoice-detail', 'reinstall', 'rescue'] as $module) { $path = $public . '/' . $module . '.js'; $assert(is_file($path), 'Cloud page module missing: ' . $module); $clientScript .= "\n" . file_get_contents($path); } $clientStyles = file_get_contents($public . '/client.css'); $baseStyles = file_get_contents($public . '/styles.css'); $routes = file_get_contents($root . '/config/routes.php'); $userController = file_get_contents($root . '/app/Controllers/UserController.php'); $cloudPageController = file_get_contents($root . '/app/Controllers/CloudPageController.php'); $deploymentPageService = file_get_contents($root . '/app/Services/Cloud/CloudDeploymentPageService.php'); $deployTemplate = file_get_contents($views . '/cloud/pages/deploy.tpl'); $reinstallTemplate = file_get_contents($views . '/cloud/pages/reinstall.tpl'); $deployModule = file_get_contents($public . '/deploy.js'); $reinstallModule = file_get_contents($public . '/reinstall.js'); $shopFormScript = file_get_contents($views . '/admin/shop/form_js.tpl'); $templateAdmin = file_get_contents($views . '/admin/cloud/templates.tpl'); $rescueAdmin = file_get_contents($views . '/admin/cloud/rescue.tpl'); $adminScript = file_get_contents($public . '/admin.js'); $cloudAdminController = file_get_contents($root . '/app/Controllers/CloudAdminController.php'); $assert(str_contains($cloudShell, "file='user/panel_sidebar.tpl'") && str_contains($userLayout, "file='user/panel_sidebar.tpl'"), 'Cloud and account pages must share one sidebar partial'); $assert(str_contains($cloudShell, "file='user/panel_topbar.tpl'") && str_contains($userLayout, "file='user/panel_topbar.tpl'"), 'Cloud and account pages must share one topbar partial'); $assert(!str_contains($cloudShell, '