With the resolver no longer storing traffic history or a query log, the pages built on them have nothing to show. The Dashboard becomes a Status page: health and the reasons for a degraded state, uptime, what is compiled (blocklist rules, local zone records), the cache with a flush button, per-pod upstream health and the listeners. Logs and Cache are removed along with the SSE client, the chart code and the recharts dependency. api.links (grafana, logs, metrics) names where the charts and the query log live. GET /api/links serves them and the Status page shows buttons for the ones that are set, or says how to set them. They are rendered as hrefs, so config validation refuses anything but http(s) and the page checks again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
11 lines
356 B
Go
11 lines
356 B
Go
package api
|
|
|
|
import "net/http"
|
|
|
|
// handleLinks returns the configured pointers to the metrics and log tools. The
|
|
// console builds its "Dashboards and logs" buttons from it; an empty value
|
|
// means that tool is not set up.
|
|
func (s *Server) handleLinks(w http.ResponseWriter, _ *http.Request) {
|
|
writeJSON(w, http.StatusOK, s.hooks.Store.Get().API.Links)
|
|
}
|