Drop the external demo: the Widgets tab is the demo
The hamlab-demo site, its Widgets-tab button, the demo_url config key and the make publish target that fed it are all gone, along with the public read-only token it needed. The example stays in examples/external-demo as something to read. The installer one-liner already comes from Gitea releases. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b5454c1022
commit
363ff02bda
@@ -1013,9 +1013,8 @@ func (s *Server) me(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
_, rebootErr := os.Stat("/run/reboot-required")
|
||||
updateVersion, _ := s.behind()
|
||||
var demoURL, addr string
|
||||
var addr string
|
||||
s.cfg.View(func(c *config.Config) {
|
||||
demoURL = c.DemoURL
|
||||
if h, _, err := net.SplitHostPort(c.Listen); err == nil && h != "" && h != "0.0.0.0" && h != "::" {
|
||||
addr = h // the address this console listens on, for the machine menu
|
||||
}
|
||||
@@ -1023,7 +1022,7 @@ func (s *Server) me(w http.ResponseWriter, r *http.Request) {
|
||||
jsonOK(w, 200, map[string]any{
|
||||
"host": s.hostName(), "user": s.user, "account": actorOf(r).User, "version": s.version,
|
||||
"load": load, "uptime": uptime, "service_started": s.started,
|
||||
"reboot_needed": rebootErr == nil, "fingerprint": s.fingerprint, "arch": runtime.GOARCH, "demo_url": demoURL, "addr": addr,
|
||||
"reboot_needed": rebootErr == nil, "fingerprint": s.fingerprint, "arch": runtime.GOARCH, "addr": addr,
|
||||
"update_available": updateVersion,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -70,9 +70,6 @@ type Config struct {
|
||||
TLS string `json:"tls,omitempty"` // "auto" → self-signed cert in the data dir; "" → plain HTTP
|
||||
Tokens []Token `json:"tokens,omitempty"`
|
||||
Nodes []Node `json:"nodes,omitempty"`
|
||||
// DemoURL, when set, is linked from the Widgets tab: a page outside Ham Lab that
|
||||
// shows the sensor API being used (examples/external-demo).
|
||||
DemoURL string `json:"demo_url,omitempty"`
|
||||
// Updates: where a newer build comes from. See UpdateSource.
|
||||
Updates UpdateSource `json:"update,omitempty"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user