Added memory limits and system info for memory

This commit is contained in:
2026-02-14 11:44:06 +01:00
parent e0e15867e9
commit 67ba0fe759
12 changed files with 295 additions and 20 deletions
+3 -7
View File
@@ -10,6 +10,7 @@ import (
"gitea.dooplex.hu/admin/felhom-controller/internal/config"
"gitea.dooplex.hu/admin/felhom-controller/internal/stacks"
"gitea.dooplex.hu/admin/felhom-controller/internal/system"
)
// Router handles all /api/* requests.
@@ -215,13 +216,8 @@ func (r *Router) getStackLogs(w http.ResponseWriter, req *http.Request, name str
}
func (r *Router) systemInfo(w http.ResponseWriter, _ *http.Request) {
writeJSON(w, http.StatusOK, apiResponse{OK: true, Data: map[string]interface{}{
"customer_id": r.cfg.Customer.ID,
"customer_name": r.cfg.Customer.Name,
"domain": r.cfg.Customer.Domain,
"backup_enabled": r.cfg.Backup.Enabled,
"monitor_enabled": r.cfg.Monitoring.Enabled,
}})
info := system.GetInfo(r.cfg.Paths.HDDPath)
writeJSON(w, http.StatusOK, apiResponse{OK: true, Data: info})
}
// --- Helpers ---