Self-contained HTTP/HTTPS/TCP/UDP reverse proxy manager written in Go, with SQLite storage, a Bootstrap 5 admin UI (Go templates, no JS framework), and a REST API under /api/v1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTXFrNP1imCW7jtfL5SZrw
17 lines
380 B
Go
17 lines
380 B
Go
package web
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/owen/vibeproxy/internal/stats"
|
|
)
|
|
|
|
func (h *Web) handleDashboard(w http.ResponseWriter, r *http.Request) {
|
|
d, err := stats.Compute(h.db, h.store.Current())
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
return
|
|
}
|
|
render(w, "dashboard", PageData{Active: "dashboard", Title: "Dashboard", Data: d})
|
|
}
|