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
@@ -446,3 +446,35 @@ templ pageMaintenance(heading string, items []agentapi.PageMaintenance) {
|
||||
</section>
|
||||
}
|
||||
}
|
||||
|
||||
// PublicNotFoundPage answers visitors of a status page that does not exist,
|
||||
// and of the bare status page domain, with a link to the home page if set.
|
||||
templ PublicNotFoundPage(cssHref, home string) {
|
||||
<!DOCTYPE html>
|
||||
<html lang={ i18n.Lang(ctx) }>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="robots" content="noindex"/>
|
||||
<title>{ i18n.T(ctx, "page.not_found_title") }</title>
|
||||
@faviconLinks()
|
||||
<link rel="stylesheet" href={ cssHref }/>
|
||||
</head>
|
||||
<body class="min-h-screen">
|
||||
<main class="mx-auto flex min-h-screen max-w-xl flex-col justify-center px-4 py-14 sm:px-6">
|
||||
<p class="mb-3 font-mono text-xs text-muted">404</p>
|
||||
<h1 class="mb-3 text-2xl font-semibold">{ i18n.T(ctx, "page.not_found_title") }</h1>
|
||||
<p class="mb-8 text-muted">{ i18n.T(ctx, "page.not_found") }</p>
|
||||
if home != "" {
|
||||
<p>
|
||||
<a href={ templ.SafeURL(home) } class="inline-block border border-ink px-4 py-2 text-sm hover:bg-ink hover:text-paper">{ i18n.T(ctx, "page.not_found_home") }</a>
|
||||
</p>
|
||||
}
|
||||
<p class="mt-14 flex items-center gap-1 font-mono text-xs text-muted">
|
||||
@brandMark("h-3.5 w-3.5")
|
||||
UptimeSebi
|
||||
</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
Reference in new issue
Block a user