fix: explain why native discovery cannot scan stopped containers

This commit is contained in:
VAIO73
2026-10-18 17:48:48 +00:00
parent c6f919b085
commit b5a2a3f52b
5 changed files with 64 additions and 3 deletions
+5 -1
View File
@@ -125,6 +125,7 @@ interface PortDetail {
interface NativeDiscovery {
vmid: number
status: "not_scanned" | "complete" | "partial" | "error" | "busy"
issues?: string[]
stale: boolean
candidates: DetectedApp[]
}
@@ -804,7 +805,10 @@ export function LxcAppPanel({ vmid, ctIp, onChange, managed, initialData, oci }:
if (!isCurrent()) return
setNativeDiscovery(native)
if (native.status === "error" || native.status === "busy") {
setDetectionNotice({ found: false, text: t("vmLxc.appEditor.nativeScanFailed") })
const stopped = native.status === "error" && Array.isArray(native.issues)
&& native.issues.includes("guest_stopped")
setDetectionNotice({ found: false, text: t(stopped
? "vmLxc.appEditor.nativeScanStopped" : "vmLxc.appEditor.nativeScanFailed") })
return
}
const result: Suggestions = await fetchApi(`/api/vms/${vmid}/apps/suggestions`, {