v0.1.1
Go quality gates / test (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-30 14:44:28 +01:00
1 parent 8c4d463f1e
commit de13d851a8
75 files changed
+4656 -442

No files matched your search

+13 -4
View File
@@ -190,15 +190,24 @@ func (s *Server) cacheFlush(w http.ResponseWriter, r *http.Request) {
s.render(w, r, "cache", "Cache", "Resolver cache counters and invalidation.", "cache", "MONITORING / CACHE", d)
}
func (s *Server) metrics(w http.ResponseWriter, r *http.Request) {
d := PageData{}
if e := s.get(r.Context(), "/api/v1/stats", &d.Stats); e != nil {
d.Error = e.Error()
d := PageData{MetricsMode: s.metricsMode(w, r)}
if d.MetricsMode == "single" {
if e := s.get(r.Context(), "/api/v1/stats", &d.Stats); e != nil {
d.Error = e.Error()
}
} else {
d.MetricNodes, d.MetricTotals, d.MetricOnline, d.MetricHasCache = s.fetchFleetMetrics(r.Context())
d.MetricTotal = len(d.MetricNodes)
}
sm, e, last := s.telemetry.Snapshot()
d.SamplingCount = len(sm)
d.SamplingTime = last
d.SamplingError = e
s.render(w, r, "metrics", "Metrics", "Real counters and live samples collected by this panel.", "metrics", "MONITORING / METRICS", d)
subtitle := "Real counters and live samples collected by this panel."
if d.MetricsMode != "single" {
subtitle = "Compare independent EasyDNS installations using actual per-node counters and samples."
}
s.render(w, r, "metrics", "Metrics", subtitle, "metrics", "MONITORING / METRICS", d)
}
func (s *Server) audit(w http.ResponseWriter, r *http.Request) {
d := PageData{}