Added memory limits and system info for memory
This commit is contained in:
@@ -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 ---
|
||||
|
||||
Reference in New Issue
Block a user