|
|
@@ -151,6 +151,19 @@ func registerAPIHandlers(mux *http.ServeMux, cfgPath string, cfgManager *runtime |
|
|
} |
|
|
} |
|
|
_ = json.NewEncoder(w).Encode(recommend) |
|
|
_ = json.NewEncoder(w).Encode(recommend) |
|
|
}) |
|
|
}) |
|
|
|
|
|
mux.HandleFunc("/api/refinement", func(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
w.Header().Set("Content-Type", "application/json") |
|
|
|
|
|
snap := phaseSnap.Snapshot() |
|
|
|
|
|
out := map[string]any{ |
|
|
|
|
|
"plan": snap.refinementInput.Plan, |
|
|
|
|
|
"windows": snap.refinementInput.Windows, |
|
|
|
|
|
"candidates": len(snap.refinementInput.Candidates), |
|
|
|
|
|
"scheduled": len(snap.refinementInput.Scheduled), |
|
|
|
|
|
"signals": len(snap.refinement.Signals), |
|
|
|
|
|
"decisions": len(snap.refinement.Decisions), |
|
|
|
|
|
} |
|
|
|
|
|
_ = json.NewEncoder(w).Encode(out) |
|
|
|
|
|
}) |
|
|
mux.HandleFunc("/api/events", func(w http.ResponseWriter, r *http.Request) { |
|
|
mux.HandleFunc("/api/events", func(w http.ResponseWriter, r *http.Request) { |
|
|
w.Header().Set("Content-Type", "application/json") |
|
|
w.Header().Set("Content-Type", "application/json") |
|
|
limit := 200 |
|
|
limit := 200 |
|
|
|