ef0669d5dd
Build / build (push) Successful in 10m37s
UI consistency
- ForgeHero now supports backHref, mono kicker, stats snippet, staggered
entrance animation, and a registration-tick divider
- Every route now opens with the same "THE FORGE // SECTION" eyebrow: projects,
sites, stacks, proxies, events, dns, deploy, settings, stale containers,
site/project detail + env/volumes/browse, new site wizard
- Stacks list/detail/new moved to the shared hero and brand-anchor eyebrow
- Toolbars migrated from bespoke buttons to the shared .forge-btn utilities
- Sidebar footline adds a live UTC "forge clock" and a vim-style g-prefix
quick-nav hint (g d/p/s/k/x/r/e/c jumps to each section)
Proxies page
- Server-side: merge static site proxy routes with instance routes and sort
by domain (internal/api/proxies.go, internal/store/static_sites.go)
- ProxyRoute gains a Source field ("instance" | "static_site")
- Frontend adds source filter tabs and per-source labels/badges
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package api
|
|
|
|
import (
|
|
"log/slog"
|
|
"net/http"
|
|
"sort"
|
|
)
|
|
|
|
// listProxyRoutes handles GET /api/proxies.
|
|
// Returns proxy routes from both Docker instances and static sites,
|
|
// merged and sorted by domain.
|
|
func (s *Server) listProxyRoutes(w http.ResponseWriter, r *http.Request) {
|
|
settings, err := s.store.GetSettings()
|
|
if err != nil {
|
|
slog.Error("failed to get settings for proxy routes", "error", err)
|
|
respondError(w, http.StatusInternalServerError, "internal server error")
|
|
return
|
|
}
|
|
|
|
instanceRoutes, err := s.store.ListProxyRoutes(settings.Domain)
|
|
if err != nil {
|
|
slog.Error("failed to list instance proxy routes", "error", err)
|
|
respondError(w, http.StatusInternalServerError, "internal server error")
|
|
return
|
|
}
|
|
|
|
siteRoutes, err := s.store.ListStaticSiteProxyRoutes(settings.Domain)
|
|
if err != nil {
|
|
slog.Error("failed to list static site proxy routes", "error", err)
|
|
respondError(w, http.StatusInternalServerError, "internal server error")
|
|
return
|
|
}
|
|
|
|
routes := append(instanceRoutes, siteRoutes...)
|
|
sort.SliceStable(routes, func(i, j int) bool {
|
|
if routes[i].Domain == routes[j].Domain {
|
|
return routes[i].ProjectName < routes[j].ProjectName
|
|
}
|
|
return routes[i].Domain < routes[j].Domain
|
|
})
|
|
|
|
respondJSON(w, http.StatusOK, routes)
|
|
}
|