feat(statuspages): error page linking a home page set by admins
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 6m52s
ci / test (pull_request) Successful in 15m30s
ci / build (pull_request) Successful in 16m56s
ci / image (pull_request) Successful in 6m1s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 6m52s
ci / test (pull_request) Successful in 15m30s
ci / build (pull_request) Successful in 16m56s
ci / image (pull_request) Successful in 6m1s
The bare status page domain and pages that do not exist answered with a plain "404 page not found". They now show an error page with a button to the platform's home page, which platform admins set under Admin. The status page servers receive it with the page index and keep it across restarts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
af992409ef
commit
1f90fe8470
17 files changed
+902
-395
No files matched your search
@@ -56,6 +56,8 @@ type Server struct {
|
||||
limits *versioned[Limits]
|
||||
// support caches how the platform runs support tickets.
|
||||
support *versioned[supportSettings]
|
||||
// pageHome caches the home page the status page servers link.
|
||||
pageHome *versioned[string]
|
||||
// draining, once closed, ends the long polls of checkers.
|
||||
draining <-chan struct{}
|
||||
// handler serves the requests agents send over their streams.
|
||||
@@ -99,6 +101,7 @@ func New(cfg config.API, d Deps) *Server {
|
||||
checkerNet: newVersioned[bool]("checker-network"),
|
||||
limits: newVersioned[Limits]("limits"),
|
||||
support: newVersioned[supportSettings]("support"),
|
||||
pageHome: newVersioned[string]("statuspage-home"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,6 +227,8 @@ func (s *Server) Mount(r gin.IRouter) {
|
||||
admin.PUT("/users/:id/suspension", s.adminSuspendUser)
|
||||
admin.DELETE("/users/:id", s.adminDeleteUser)
|
||||
admin.PUT("/checker-network", s.adminSetCheckerNetwork)
|
||||
admin.GET("/statuspage-home", s.adminGetStatusPageHome)
|
||||
admin.PUT("/statuspage-home", s.adminSetStatusPageHome)
|
||||
admin.GET("/legal", s.adminListLegal)
|
||||
admin.PUT("/legal/:kind", s.adminSaveLegal)
|
||||
admin.GET("/regions", s.adminListRegions)
|
||||
|
||||
Reference in new issue
Block a user