Skip to content

Commit 88632e7

Browse files
committed
Remove the simple view UI. It's not very useful.
1 parent d943aba commit 88632e7

4 files changed

Lines changed: 0 additions & 57 deletions

File tree

dnscrypt-proxy/monitoring_ui.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -822,29 +822,6 @@ func (ui *MonitoringUI) handleRoot(w http.ResponseWriter, r *http.Request) {
822822
return
823823
}
824824

825-
// If this is a simple version request, return a simple page
826-
if r.URL.Query().Get("simple") == "1" {
827-
// Simple page has dynamic content - no cache
828-
setDynamicCacheHeaders(w)
829-
830-
metrics := ui.metricsCollector.GetMetrics()
831-
832-
// Create a simple HTML page with the metrics
833-
simpleHTML := fmt.Sprintf(SimpleHTMLTemplate,
834-
metrics["total_queries"],
835-
metrics["queries_per_second"],
836-
metrics["uptime_seconds"],
837-
metrics["cache_hit_ratio"].(float64)*100,
838-
metrics["cache_hits"],
839-
metrics["cache_misses"],
840-
time.Now().Format(time.RFC1123))
841-
842-
w.Header().Set("Content-Type", "text/html")
843-
w.Write([]byte(simpleHTML))
844-
dlog.Debugf("Sent simple HTML page")
845-
return
846-
}
847-
848825
// Serve the main dashboard page - cache for 5 minutes since template is static
849826
setStaticCacheHeaders(w, 300)
850827
w.Header().Set("Content-Type", "text/html")

dnscrypt-proxy/static/templates/dashboard.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
<header>
7777
<h1>DNSCrypt Proxy Monitoring Dashboard</h1>
7878
<div style="position: absolute; top: 10px; right: 10px;">
79-
<a href="/?simple=1" style="color: white; text-decoration: underline; margin-right: 15px;">Simple View</a>
8079
<a href="/api/metrics" target="_blank" style="color: white; text-decoration: underline;">Raw Data</a>
8180
</div>
8281
</header>

dnscrypt-proxy/static/templates/simple.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

dnscrypt-proxy/templates.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import (
66

77
// Embedded templates and static files using go:embed
88
//
9-
//go:embed static/templates/simple.html
10-
var SimpleHTMLTemplate string
11-
129
//go:embed static/templates/dashboard.html
1310
var MainHTMLTemplate string
1411

0 commit comments

Comments
 (0)