Show collapsible IP check cycles in the registry
This commit is contained in:
1 parent
94124747ce
commit
b58d5f5b82
16 files changed
+332
-36
No files matched your search
@@ -63,6 +63,8 @@ type fakeControlAPI struct {
|
||||
scanFreeAddresses []string
|
||||
registry map[string]registryItem
|
||||
registryChecks map[string][]check
|
||||
registryEvents []event
|
||||
registryCycles []registryCycle
|
||||
// The chart of /registry: the breakdown served (breakdownStatus != 0 makes
|
||||
// it fail with that status), the table behind a row and the raw queries
|
||||
// of both endpoints.
|
||||
@@ -553,7 +555,10 @@ func (f *fakeControlAPI) handler() http.Handler {
|
||||
writeAPIErr(w, http.StatusNotFound, "unknown ip: "+addr)
|
||||
return
|
||||
}
|
||||
writeJSON(w, http.StatusOK, registryHistoryResponse{Registry: item, Checks: f.registryChecks[addr], SelfCheckFailedOn: f.selfCheckFailedOn})
|
||||
writeJSON(w, http.StatusOK, registryHistoryResponse{
|
||||
Registry: item, Checks: f.registryChecks[addr], SelfCheckFailedOn: f.selfCheckFailedOn,
|
||||
Events: f.registryEvents, Cycles: f.registryCycles,
|
||||
})
|
||||
})
|
||||
|
||||
mux.HandleFunc("GET /api/v1/admin/config/subnets", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in new issue
Block a user