From 8ee8edcd36881d2c90f55a970b286c623207405b Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 21 Oct 2025 20:12:00 +0200 Subject: [PATCH] Update AppImage --- AppImage/components/virtual-machines.tsx | 56 ++---------------------- AppImage/scripts/flask_server.py | 9 +--- 2 files changed, 6 insertions(+), 59 deletions(-) diff --git a/AppImage/components/virtual-machines.tsx b/AppImage/components/virtual-machines.tsx index d82e51f..0ae1cd9 100644 --- a/AppImage/components/virtual-machines.tsx +++ b/AppImage/components/virtual-machines.tsx @@ -179,70 +179,22 @@ const getModalProgressColor = (percent: number): string => { } const getOSIcon = (osInfo: VMDetails["os_info"] | undefined, vmType: string): React.ReactNode => { - // Only show logo for LXCs, VMs show nothing if (vmType !== "lxc") { return null } const osId = osInfo?.id?.toLowerCase() - // Try to use SVG icons for common distributions switch (osId) { case "debian": - return ( - Debian { - // fallback to Container icon if SVG doesn't exist - e.currentTarget.style.display = "none" - e.currentTarget.parentElement!.innerHTML = - '
' - }} - /> - ) + return Debian case "ubuntu": - return ( - Ubuntu { - e.currentTarget.style.display = "none" - e.currentTarget.parentElement!.innerHTML = - '
' - }} - /> - ) + return Ubuntu case "alpine": - return ( - Alpine { - e.currentTarget.style.display = "none" - e.currentTarget.parentElement!.innerHTML = - '
' - }} - /> - ) + return Alpine case "arch": - return ( - Arch { - e.currentTarget.style.display = "none" - e.currentTarget.parentElement!.innerHTML = - '
' - }} - /> - ) + return Arch default: - // Generic LXC container icon return } } diff --git a/AppImage/scripts/flask_server.py b/AppImage/scripts/flask_server.py index d82e433..100f0ab 100644 --- a/AppImage/scripts/flask_server.py +++ b/AppImage/scripts/flask_server.py @@ -4834,7 +4834,6 @@ def api_vm_details(vmid): os_info = {} if vm_type == 'lxc' and resource.get('status') == 'running': try: - print(f"[v0] Reading /etc/os-release for LXC {vmid}...") os_release_result = subprocess.run( ['pct', 'exec', str(vmid), '--', 'cat', '/etc/os-release'], capture_output=True, text=True, timeout=5) @@ -4851,12 +4850,8 @@ def api_vm_details(vmid): os_info['name'] = line.split('=', 1)[1].strip('"').strip("'") elif line.startswith('PRETTY_NAME='): os_info['pretty_name'] = line.split('=', 1)[1].strip('"').strip("'") - - print(f"[v0] OS Info for LXC {vmid}: {os_info}") - else: - print(f"[v0] Failed to read /etc/os-release for LXC {vmid}: {os_release_result.stderr}") except Exception as e: - print(f"[v0] Error reading OS info for LXC {vmid}: {e}") + pass # Silently handle errors response_data = { **resource, @@ -4883,7 +4878,7 @@ def api_vm_logs(vmid): """Download real logs for a specific VM/LXC (not task history)""" try: # Get VM type and node - result = subprocess.run(['pvesh', 'get', f'/cluster/resources', '--type', 'vm', '--output-format', 'json'], + result = subprocess.run(['pvesh', 'get', '/cluster/resources', '--type', 'vm', '--output-format', 'json'], capture_output=True, text=True, timeout=10) if result.returncode == 0: