fix(governance): report only the dashboard sections that exist (#2147)
#2121 removed the pages behind sixteen sections and both capability handlers still named them, so GET /api/capabilities advertised sections nothing can render and the old service probed for pages that are gone. The single binary now reports an organisation as unavailable (its page exists, its writes do not) and lists nothing else it has no page for; the old service reports only the sections and probes its pages still make.
This commit is contained in:
2 files changed
+4
-18
No files matched your search
@@ -11,13 +11,8 @@ import (
|
||||
func (s *Server) handleCapabilities(w http.ResponseWriter, r *http.Request) {
|
||||
sections := map[string]bool{
|
||||
"chat": s.Chat != nil && s.Chat.Contract != nil,
|
||||
"logs": s.LogFeed != nil,
|
||||
"skills": s.Skills != nil,
|
||||
"curators": s.Curators != nil,
|
||||
"channels": s.Channels != nil,
|
||||
"captures": s.Captures != nil,
|
||||
"mappings": s.Mappings != nil,
|
||||
"bindings": s.Bindings != nil,
|
||||
// The workflows page draws its statistics from the task store
|
||||
// and its definition list from the local registry, so it is
|
||||
// worth showing with only the former.
|
||||
@@ -48,11 +43,6 @@ type pageProbe struct{ section, method, path string }
|
||||
func pageProbes() []pageProbe {
|
||||
return []pageProbe{
|
||||
{"org_members", http.MethodPost, "/api/orgs/_/members"},
|
||||
{"org_agents", http.MethodPut, "/api/orgs/_/agents/_"},
|
||||
{"org_policies", http.MethodPut, "/api/access/policies"},
|
||||
{"org_denials", http.MethodGet, "/api/access/denials"},
|
||||
{"org_audit", http.MethodGet, "/api/audit"},
|
||||
{"org_usage", http.MethodGet, "/api/usage"},
|
||||
{"org_config", http.MethodPost, "/api/control-plane/resources/_/commands/replace"},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user