still tuning server settings section

This commit is contained in:
onysd 2026-08-26 01:54:19 +03:00
parent 66f9c0bc1e
commit 80bc8d352c
11 changed files with 510 additions and 164 deletions

View file

@ -223,6 +223,20 @@ func (s *server) handleServerStatusAPI(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, s.serverCtl.Status())
}
// handleDockerStatusAPI backs the Services tab's live container list
// (postgres/redis/minio) -- see procctl.Manager.DockerStatus. A "docker
// compose ps" failure (daemon not running, compose file missing) is
// reported as an API error rather than an empty list, so the frontend can
// tell "no services" apart from "couldn't ask Docker".
func (s *server) handleDockerStatusAPI(w http.ResponseWriter, r *http.Request) {
services, err := s.serverCtl.DockerStatus(r.Context())
if err != nil {
writeAPIError(w, http.StatusInternalServerError, err.Error())
return
}
writeJSON(w, http.StatusOK, services)
}
type restartServerAPIRequest struct {
CommandID string `json:"command_id"`
Reason string `json:"reason"`