perf(statuspages): page, search and compress public status pages
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Failing after 13m31s
ci / test (pull_request) Successful in 13m30s
ci / build (pull_request) Skipped
ci / image (pull_request) Skipped

A status page with 3128 components was 30 MB of uncompressed HTML: all
components at once, each with 90 bars carrying a tooltip.

- The status page server gzips text responses.
- Status pages list 50 components at a time (?page=N) and offer a search
  (?q=) over component and group names once they have more than one
  page. Group headings keep the status and count of the whole group.
  Single-file exports still list every component.
- Rows linking a detail page draw their bars as one path per status,
  without tooltips; the detail page keeps them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-27 00:10:27 +01:00
1 parent 52d2ce25c9
commit b051f6c430
12 files changed
+4059 -3094

No files matched your search

+22
View File
@@ -192,6 +192,28 @@ templ bars(bs []Bar, height int) {
</svg>
}
// pathBars draws bars like bars, in a few paths and without tooltips.
templ pathBars(bs []Bar, height int) {
<svg
viewBox={ "0 0 " + strconv.Itoa(len(bs)*4) + " " + strconv.Itoa(height) }
preserveAspectRatio="none"
class="block w-full"
style={ "height:" + strconv.Itoa(height) + "px" }
role="img"
aria-label={ i18n.T(ctx, "monitors.uptime_chart") }
>
for _, p := range BarPaths(bs, height) {
<path
d={ p.D }
class={ templ.KV("fill-up", p.Status == StatusUp),
templ.KV("fill-degraded", p.Status == StatusDegraded),
templ.KV("fill-down", p.Status == StatusDown),
templ.KV("fill-rule", p.Status == StatusUnknown) }
></path>
}
</svg>
}
templ Dashboard(p Page, me Me, v DashboardView) {
@consoleShell(p, me) {
<div class="mb-6 flex flex-wrap items-center justify-between gap-x-4 gap-y-3">