mirror of
https://github.com/MengMengCode/CLICD.git
synced 2026-08-08 14:34:49 +08:00
兼容KVM大多数功能
This commit is contained in:
@@ -177,6 +177,10 @@ func getContainer(w http.ResponseWriter, r *http.Request, id int) {
|
||||
jsonResponse(w, http.StatusNotFound, APIResponse{Success: false, Message: "Container not found"})
|
||||
return
|
||||
}
|
||||
if c.IsKVM() && c.Status == "running" {
|
||||
_, _ = kvmManager.RefreshVNCPort(c.ID)
|
||||
_, _ = kvmManager.RefreshNetwork(c.ID)
|
||||
}
|
||||
jsonResponse(w, http.StatusOK, APIResponse{Success: true, Data: c})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user