Add VM status check and UI improvements

- Add VM status checking using qm status command
- Hide update button for VMs (only show for LXC containers)
- Hide shell button for VMs (only show for LXC containers)
- Hide LXC Settings option for VMs
- Display VM/LXC indicator badges in table before script names
- Update statistics cards to differentiate between LXC and VMs
- Update container control to support both pct (LXC) and qm (VM) commands
- Improve status parsing to handle both container types
This commit is contained in:
Michel Roegl-Brunner
2025-11-28 11:44:58 +01:00
parent f9af7536d0
commit 5274737ab8
3 changed files with 546 additions and 226 deletions

View File

@@ -33,6 +33,7 @@ interface InstalledScript {
container_status?: 'running' | 'stopped' | 'unknown';
web_ui_ip: string | null;
web_ui_port: number | null;
is_vm?: boolean;
}
interface ScriptInstallationCardProps {
@@ -300,7 +301,7 @@ export function ScriptInstallationCard({
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-48 bg-card border-border">
{script.container_id && (
{script.container_id && !script.is_vm && (
<DropdownMenuItem
onClick={onUpdate}
disabled={containerStatus === 'stopped'}
@@ -318,7 +319,7 @@ export function ScriptInstallationCard({
Backup
</DropdownMenuItem>
)}
{script.container_id && script.execution_mode === 'ssh' && (
{script.container_id && script.execution_mode === 'ssh' && !script.is_vm && (
<DropdownMenuItem
onClick={onShell}
disabled={containerStatus === 'stopped'}