From 1f90fe8470e550360f8164e8c523ebb88dd6ba34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Thu, 26 Nov 2026 20:37:59 +0100 Subject: [PATCH] feat(statuspages): error page linking a home page set by admins 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 Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3 --- internal/agentapi/pages.go | 16 +- internal/api/apidocs.go | 5 + internal/api/audit.go | 1 + internal/api/pages.go | 2 +- internal/api/server.go | 5 + internal/api/statuspage_home.go | 77 +++ internal/api/statuspage_home_test.go | 46 ++ internal/api/statuspages.go | 2 +- internal/api/statuspages_test.go | 3 +- internal/i18n/locales/de.json | 9 +- internal/i18n/locales/en.json | 9 +- internal/statuspage/statuspage.go | 48 +- internal/statuspage/statuspage_test.go | 33 +- internal/web/public.templ | 32 + internal/web/public_templ.go | 144 +++++ internal/web/regions.templ | 20 +- internal/web/regions_templ.go | 845 ++++++++++++++----------- 17 files changed, 902 insertions(+), 395 deletions(-) create mode 100644 internal/api/statuspage_home.go create mode 100644 internal/api/statuspage_home_test.go diff --git a/internal/agentapi/pages.go b/internal/agentapi/pages.go index 02fdb3f..5930d56 100644 --- a/internal/agentapi/pages.go +++ b/internal/agentapi/pages.go @@ -362,14 +362,20 @@ type PageRef struct { Host string `json:"host,omitempty"` } +// PageIndex lists the pages a status page server serves. +type PageIndex struct { + Pages []PageRef `json:"pages"` + // HomeURL is the platform's home page, which the server links from + // its error page; empty for none. + HomeURL string `json:"home_url,omitempty"` +} + // Pages lists every page this status page server serves, so it can keep // them all cached before anyone visits. -func (c *Client) Pages(ctx context.Context) ([]PageRef, error) { - var out struct { - Pages []PageRef `json:"pages"` - } +func (c *Client) Pages(ctx context.Context) (PageIndex, error) { + var out PageIndex err := c.do(ctx, http.MethodGet, "/pages/index", nil, &out) - return out.Pages, err + return out, err } // ErrNotFound means no published page matches. diff --git a/internal/api/apidocs.go b/internal/api/apidocs.go index 734942b..463b6f5 100644 --- a/internal/api/apidocs.go +++ b/internal/api/apidocs.go @@ -318,6 +318,11 @@ var endpoints = []endpoint{ {method: "PUT", path: "/api/v1/admin/checker-network", tag: "Platform", summary: "Let platform checkers check private addresses or not", description: "Unset, they may on self-hosted installations and may not in the cloud edition. Applies from each checker's next poll.", perm: "platform admin", req: checkerNetwork{}, status: http.StatusNoContent}, + {method: "GET", path: "/api/v1/admin/statuspage-home", tag: "Platform", summary: "The home page linked from the status page servers' error page", perm: "platform admin", + resp: statusPageHome{}}, + {method: "PUT", path: "/api/v1/admin/statuspage-home", tag: "Platform", summary: "Set the home page linked from the status page servers' error page", + description: "Visitors of the bare status page domain and of pages that do not exist see an error page with a link to this URL. Empty links none.", + perm: "platform admin", req: statusPageHome{}, status: http.StatusNoContent}, {method: "GET", path: "/api/v1/admin/identity-providers", tag: "Platform", summary: "Identity providers for signing up and in", description: "With the callback URL to register at each provider. Secrets are never returned.", perm: "platform admin", resp: obj{"providers": []idpView{}, "callback_url": ""}}, diff --git a/internal/api/audit.go b/internal/api/audit.go index 678c49e..ace66a3 100644 --- a/internal/api/audit.go +++ b/internal/api/audit.go @@ -111,6 +111,7 @@ var auditActions = map[string]string{ "PUT /api/v1/org/legal/:kind": "org.legal_update", "PUT /api/v1/admin/check-types": "platform.check_types_update", "PUT /api/v1/admin/checker-network": "platform.checker_network_update", + "PUT /api/v1/admin/statuspage-home": "platform.statuspage_home_update", "PUT /api/v1/admin/limits": "platform.limits_update", "POST /api/v1/admin/identity-providers": "platform.idp_create", "PUT /api/v1/admin/identity-providers/:id": "platform.idp_update", diff --git a/internal/api/pages.go b/internal/api/pages.go index 0079d96..5f4e3d7 100644 --- a/internal/api/pages.go +++ b/internal/api/pages.go @@ -625,7 +625,7 @@ func (s *Server) adminPage(c *gin.Context) { for _, t := range check.Types { types = append(types, web.CheckTypeOption{Type: string(t), Enabled: !off[string(t)]}) } - web.Render(c, http.StatusOK, web.AdminPage(s.pageFor(c, "admin.title"), me, v, storageView(c, stats), types, s.platformPrivate(ctx), webLimits(s.platformLimits(ctx)), s.idpAdminView(ctx))) + web.Render(c, http.StatusOK, web.AdminPage(s.pageFor(c, "admin.title"), me, v, storageView(c, stats), types, s.platformPrivate(ctx), s.statusPageHome(ctx), webLimits(s.platformLimits(ctx)), s.idpAdminView(ctx))) } func (s *Server) adminStatusPagesPage(c *gin.Context) { diff --git a/internal/api/server.go b/internal/api/server.go index d680196..2d043a7 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -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) diff --git a/internal/api/statuspage_home.go b/internal/api/statuspage_home.go new file mode 100644 index 0000000..43b48bc --- /dev/null +++ b/internal/api/statuspage_home.go @@ -0,0 +1,77 @@ +package api + +import ( + "context" + "encoding/json" + "errors" + "net/http" + "strings" + + "github.com/gin-gonic/gin" + "github.com/jackc/pgx/v5" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/store" + "git.zb-server.de/ZB-Server/uptimesebi/internal/tenant" +) + +// The status page servers answer visitors of pages that do not exist, and +// of their bare domain, with a page linking the platform's home page. + +const settingStatusPageHome = "statuspage_home" + +type statusPageHome struct { + // URL is the home page linked from the status page servers' error + // page; empty links none. + URL string `json:"url" binding:"max=2000"` +} + +func (s *Server) statusPageHome(ctx context.Context) string { + v, err := s.pageHome.get(ctx, s.rdb, func(ctx context.Context) (string, error) { + var v statusPageHome + err := s.db.Tx(ctx, tenant.System(), func(q *store.Queries) error { + raw, err := q.GetPlatformSetting(ctx, settingStatusPageHome) + if errors.Is(err, pgx.ErrNoRows) { + return nil + } + if err != nil { + return err + } + return json.Unmarshal(raw, &v) + }) + return v.URL, err + }) + if err != nil { + s.log.WarnContext(ctx, "loading the status page home failed", "error", err) + return "" + } + return v +} + +func (s *Server) adminGetStatusPageHome(c *gin.Context) { + c.JSON(http.StatusOK, statusPageHome{URL: s.statusPageHome(c.Request.Context())}) +} + +func (s *Server) adminSetStatusPageHome(c *gin.Context) { + var req statusPageHome + if !bind(c, &req) { + return + } + req.URL = strings.TrimSpace(req.URL) + if req.URL != "" && !validLegalURL(req.URL) { + fail(c, http.StatusUnprocessableEntity, "invalid_legal_url") + return + } + ctx := c.Request.Context() + raw, _ := json.Marshal(req) + auditDetail(c, "url", req.URL) + if err := s.db.Tx(ctx, tenant.System(), func(q *store.Queries) error { + return q.SetPlatformSetting(ctx, store.SetPlatformSettingParams{Key: settingStatusPageHome, Value: raw}) + }); err != nil { + internalError(c, err) + return + } + if err := s.pageHome.bump(ctx, s.rdb); err != nil { + s.log.ErrorContext(ctx, "announcing the status page home failed", "error", err) + } + c.Status(http.StatusNoContent) +} diff --git a/internal/api/statuspage_home_test.go b/internal/api/statuspage_home_test.go new file mode 100644 index 0000000..97da321 --- /dev/null +++ b/internal/api/statuspage_home_test.go @@ -0,0 +1,46 @@ +package api_test + +import ( + "context" + "net/http" + "strings" + "testing" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/store" + "git.zb-server.de/ZB-Server/uptimesebi/internal/tenant" +) + +func TestStatusPageHome(t *testing.T) { + e := newEnv(t) + admin := e.browser(t) + admin.signup("a@"+uniq("home")+".test", uniq("home-")) + if err := tenant.New(e.dbPool).Tx(context.Background(), tenant.Global(), func(q *store.Queries) error { + return q.MakeAdmin(context.Background(), admin.userIDSelf()) + }); err != nil { + t.Fatal(err) + } + t.Cleanup(func() { admin.do("PUT", "/api/v1/admin/statuspage-home", map[string]any{"url": ""}) }) + pages := e.statuspageClient(t, nil) + + st, body := admin.do("PUT", "/api/v1/admin/statuspage-home", map[string]any{"url": "javascript:alert(1)"}) + expect(t, "script link", st, body, http.StatusUnprocessableEntity, "invalid_legal_url") + if st, body := admin.do("PUT", "/api/v1/admin/statuspage-home", map[string]any{"url": " https://example.test/ "}); st != http.StatusNoContent { + t.Fatalf("set home = %d %v", st, body) + } + if _, body := admin.do("GET", "/api/v1/admin/statuspage-home", nil); body["url"] != "https://example.test/" { + t.Errorf("home = %v", body) + } + index, err := pages.Pages(context.Background()) + if err != nil || index.HomeURL != "https://example.test/" { + t.Errorf("page index home = %q %v", index.HomeURL, err) + } + if _, _, html := admin.page("/admin"); !strings.Contains(html, `value="https://example.test/"`) { + t.Error("the admin page does not show the home page") + } + + owner := e.browser(t) + owner.signup("o@"+uniq("home")+".test", uniq("home-")) + if st, _ := owner.do("PUT", "/api/v1/admin/statuspage-home", map[string]any{"url": "https://evil.test/"}); st != http.StatusForbidden { + t.Errorf("non-admin sets the home page = %d, want 403", st) + } +} diff --git a/internal/api/statuspages.go b/internal/api/statuspages.go index 034ee5b..047f5dc 100644 --- a/internal/api/statuspages.go +++ b/internal/api/statuspages.go @@ -461,7 +461,7 @@ func (s *Server) agentPageIndex(c *gin.Context) { for i, r := range rows { out[i] = agentapi.PageRef{Slug: r.Slug, Host: r.Host} } - c.JSON(http.StatusOK, gin.H{"pages": out}) + c.JSON(http.StatusOK, agentapi.PageIndex{Pages: out, HomeURL: s.statusPageHome(ctx)}) } type statusPageRequest struct { diff --git a/internal/api/statuspages_test.go b/internal/api/statuspages_test.go index b96b49e..aae8dab 100644 --- a/internal/api/statuspages_test.go +++ b/internal/api/statuspages_test.go @@ -205,7 +205,8 @@ func TestStatusPages(t *testing.T) { own := e.statuspageClient(t, &org) lists := func(c *agentapi.Client) bool { t.Helper() - refs, err := c.Pages(context.Background()) + index, err := c.Pages(context.Background()) + refs := index.Pages if err != nil { t.Fatal(err) } diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index d521855..42986e4 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -1612,5 +1612,12 @@ "pages.subscribers_limit": "Neue Abos pro Woche für die Organisation: {{.Max}}", "pages.feeds": "Feed und API", "pages.feeds_hint": "Jede veröffentlichte Seite hat einen RSS-Feed und eine JSON-API zum Lesen, pro Besucher begrenzt:", - "audit.action.statuspage.subscriber_delete": "Abonnent einer Statusseite entfernt" + "audit.action.statuspage.subscriber_delete": "Abonnent einer Statusseite entfernt", + "page.not_found_title": "Seite nicht gefunden", + "page.not_found": "Unter dieser Adresse gibt es keine Statusseite, oder sie ist nicht veröffentlicht.", + "page.not_found_home": "Zur Hauptseite", + "admin.statuspage_home": "Hauptseite der Statusseiten", + "admin.statuspage_home_hint": "Wer die Statusseiten-Domain ohne Pfad oder eine Seite aufruft, die es nicht gibt, sieht eine Fehlerseite. Sie verlinkt diese Adresse, z. B. eure Website. Leer: kein Link.", + "admin.statuspage_home_url": "Adresse der Hauptseite", + "audit.action.platform.statuspage_home_update": "Hauptseite der Statusseiten geändert" } diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index d3c047d..35e314a 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -1612,5 +1612,12 @@ "pages.subscribers_limit": "New subscriptions per week for the organization: {{.Max}}", "pages.feeds": "Feed and API", "pages.feeds_hint": "Every published page has an RSS feed and a read-only JSON API, rate limited per visitor:", - "audit.action.statuspage.subscriber_delete": "Status page subscriber removed" + "audit.action.statuspage.subscriber_delete": "Status page subscriber removed", + "page.not_found_title": "Page not found", + "page.not_found": "There is no status page at this address, or it is not published.", + "page.not_found_home": "Go to the home page", + "admin.statuspage_home": "Status page home", + "admin.statuspage_home_hint": "Visitors of the bare status page domain and of pages that do not exist see an error page. It links this address, e.g. your website. Empty: no link.", + "admin.statuspage_home_url": "Home page URL", + "audit.action.platform.statuspage_home_update": "Status page home changed" } diff --git a/internal/statuspage/statuspage.go b/internal/statuspage/statuspage.go index 9ea8f6b..886e89c 100644 --- a/internal/statuspage/statuspage.go +++ b/internal/statuspage/statuspage.go @@ -63,7 +63,7 @@ type Source interface { // PageIfChanged answers agentapi.ErrNotModified when the page still // has checksum. PageIfChanged(ctx context.Context, host, slug, checksum string) (agentapi.PageSnapshot, error) - Pages(ctx context.Context) ([]agentapi.PageRef, error) + Pages(ctx context.Context) (agentapi.PageIndex, error) } // Server renders pages for one status page agent. @@ -78,7 +78,9 @@ type Server struct { dir string now func() time.Time - mu sync.Mutex + mu sync.Mutex + // home is the platform's home page, linked from the error page. + home string cache map[string]entry refreshing map[string]bool // again holds pages that changed while being refreshed, which are @@ -161,9 +163,39 @@ func (s *Server) loadDisk() error { if len(s.cache) > 0 { s.log.Info("loaded cached status pages", "count", len(s.cache)) } + if raw, err := os.ReadFile(filepath.Join(s.dir, homeFile)); err == nil { + s.home = string(raw) + } return nil } +// homeFile keeps the home page across restarts; not .json, which are pages. +const homeFile = "home.url" + +// setHome records the home page the error page links. +func (s *Server) setHome(url string) { + s.mu.Lock() + changed := s.home != url + s.home = url + s.mu.Unlock() + if changed && s.dir != "" { + if err := os.WriteFile(filepath.Join(s.dir, homeFile), []byte(url), 0o600); err != nil { + s.log.Warn("saving the home page failed", "error", err) + } + } +} + +// notFound answers visitors of a page that does not exist with a page +// leading to the platform's home page. +func (s *Server) notFound(c *gin.Context) { + s.localizeRequest(c) + s.mu.Lock() + home := s.home + s.mu.Unlock() + c.Header("Cache-Control", "no-store") + web.Render(c, http.StatusNotFound, web.PublicNotFoundPage("/static/dist/app.css", home)) +} + func (s *Server) fileFor(key string) string { sum := sha256.Sum256([]byte(key)) return filepath.Join(s.dir, hex.EncodeToString(sum[:16])+".json") @@ -237,7 +269,7 @@ func (s *Server) serve(c *gin.Context) { key, base = "host:"+host, "/" } else { if len(parts) == 0 { - c.Status(http.StatusNotFound) + s.notFound(c) return } slug, parts = parts[0], parts[1:] @@ -261,7 +293,11 @@ func (s *Server) serve(c *gin.Context) { } e, ok := s.lookup(c.Request.Context(), key, host, slug) if !ok { - c.Status(http.StatusNotFound) + if rt.kind == routeFeed || rt.kind == routeAPI { + c.Status(http.StatusNotFound) + } else { + s.notFound(c) + } return } if rt.kind == routeLegal { @@ -523,11 +559,13 @@ func (s *Server) Run(ctx context.Context) { func (s *Server) Sync(ctx context.Context) { ctx, cancel := context.WithTimeout(ctx, syncInterval) defer cancel() - refs, err := s.src.Pages(ctx) + index, err := s.src.Pages(ctx) if err != nil { s.log.WarnContext(ctx, "listing status pages failed", "error", err) return } + s.setHome(index.HomeURL) + refs := index.Pages todo := map[string]entry{} s.mu.Lock() for key, e := range s.cache { diff --git a/internal/statuspage/statuspage_test.go b/internal/statuspage/statuspage_test.go index 599f104..63580c7 100644 --- a/internal/statuspage/statuspage_test.go +++ b/internal/statuspage/statuspage_test.go @@ -25,6 +25,7 @@ type fakeSource struct { err error delay time.Duration pages map[string]agentapi.PageSnapshot + home string } // PageIfChanged counts calls and answers like the API, sending pages @@ -65,16 +66,16 @@ func (f *fakeSource) page(ctx context.Context, host, slug string) (agentapi.Page } // Pages lists the fake's pages by their keys: "host|" or "|slug". -func (f *fakeSource) Pages(context.Context) ([]agentapi.PageRef, error) { +func (f *fakeSource) Pages(context.Context) (agentapi.PageIndex, error) { f.mu.Lock() defer f.mu.Unlock() if f.err != nil { - return nil, f.err + return agentapi.PageIndex{}, f.err } - var out []agentapi.PageRef + out := agentapi.PageIndex{HomeURL: f.home} for k := range f.pages { host, slug, _ := strings.Cut(k, "|") - out = append(out, agentapi.PageRef{Host: host, Slug: slug}) + out.Pages = append(out.Pages, agentapi.PageRef{Host: host, Slug: slug}) } return out, nil } @@ -128,6 +129,26 @@ func (h harness) get(host, path string) (int, string) { return w.Code, w.Body.String() } +// The error page links the platform's home page, also after a restart +// while the API is down. +func TestNotFoundLinksHome(t *testing.T) { + dir := t.TempDir() + now := time.Now() + src := newSource() + h := newHarness(t, src, dir, &now) + if code, body := h.get("status.example.test", "/"); code != 404 || strings.Contains(body, "Zur Hauptseite") { + t.Errorf("error page without a home page = %d, links one: %t", code, strings.Contains(body, "Zur Hauptseite")) + } + src.home = "https://example.test/" + h.srv.Sync(context.Background()) + restarted := newHarness(t, &fakeSource{err: errors.New("connection refused")}, dir, &now) + for _, hs := range []harness{h, restarted} { + if code, body := hs.get("status.example.test", "/gone"); code != 404 || !strings.Contains(body, `href="https://example.test/"`) { + t.Errorf("error page = %d, lacks the link to the home page", code) + } + } +} + func TestRouting(t *testing.T) { now := time.Now() h := newHarness(t, newSource(), t.TempDir(), &now) @@ -138,8 +159,8 @@ func TestRouting(t *testing.T) { }{ {"status.example.test", "/acme", 200, "Acme status"}, {"status.example.test:8082", "/acme", 200, "Alle Systeme funktionieren"}, - {"status.example.test", "/missing", 404, ""}, - {"status.example.test", "/", 404, ""}, + {"status.example.test", "/missing", 404, "Seite nicht gefunden"}, + {"status.example.test", "/", 404, "Seite nicht gefunden"}, {"status.acme.test", "/", 200, "Acme on own domain"}, {"status.acme.test", "/acme", 404, ""}, {"other.test", "/", 404, ""}, diff --git a/internal/web/public.templ b/internal/web/public.templ index 86b3a82..dcc9579 100644 --- a/internal/web/public.templ +++ b/internal/web/public.templ @@ -446,3 +446,35 @@ templ pageMaintenance(heading string, items []agentapi.PageMaintenance) { } } + +// 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) { + + + + + + + { i18n.T(ctx, "page.not_found_title") } + @faviconLinks() + + + +
+

404

+

{ i18n.T(ctx, "page.not_found_title") }

+

{ i18n.T(ctx, "page.not_found") }

+ if home != "" { +

+ { i18n.T(ctx, "page.not_found_home") } +

+ } +

+ @brandMark("h-3.5 w-3.5") + UptimeSebi +

+
+ + +} diff --git a/internal/web/public_templ.go b/internal/web/public_templ.go index 112e1a6..ed587ad 100644 --- a/internal/web/public_templ.go +++ b/internal/web/public_templ.go @@ -2251,4 +2251,148 @@ func pageMaintenance(heading string, items []agentapi.PageMaintenance) templ.Com }) } +// 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. +func PublicNotFoundPage(cssHref, home string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var110 string + templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "page.not_found_title")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/public.templ`, Line: 459, Col: 47} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = faviconLinks().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "

404

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var112 string + templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "page.not_found_title")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/public.templ`, Line: 466, Col: 81} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var113 string + templ_7745c5c3_Var113, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "page.not_found")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/public.templ`, Line: 467, Col: 62} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var113)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if home != "" { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var115 string + templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "page.not_found_home")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/public.templ`, Line: 470, Col: 161} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = brandMark("h-3.5 w-3.5").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 197, " UptimeSebi

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + var _ = templruntime.GeneratedTemplate diff --git a/internal/web/regions.templ b/internal/web/regions.templ index 635e98e..17e2715 100644 --- a/internal/web/regions.templ +++ b/internal/web/regions.templ @@ -195,7 +195,7 @@ templ RegionsPage(p Page, me Me, v RegionsView) { } } -templ AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []CheckTypeOption, platformPrivate bool, limits LimitsView, idps IDPAdminView) { +templ AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []CheckTypeOption, platformPrivate bool, pageHome string, limits LimitsView, idps IDPAdminView) { @consoleShell(p, me) { @settingsHeading("admin.title", "admin.intro") @adminLinks() @@ -203,6 +203,7 @@ templ AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes [] @limitsSection(limits) @regionsBody(v) @checkerNetworkSection(platformPrivate) + @statusPageHomeSection(pageHome) @checkTypesSection(checkTypes, "/admin/check-types", "/admin", "admin.check_types_intro") @storageSection(storage) } @@ -228,6 +229,23 @@ templ checkerNetworkSection(allow bool) { } +// statusPageHomeSection sets the home page the status page servers link +// from their error page. +templ statusPageHomeSection(url string) { +
+ @sectionHeading("admin.statuspage_home") +

{ i18n.T(ctx, "admin.statuspage_home_hint") }

+
+ @formError() + + +
+
+} + // checkTypesSection lets the platform or an organization choose the // check types it offers. templ checkTypesSection(types []CheckTypeOption, api, next, introID string) { diff --git a/internal/web/regions_templ.go b/internal/web/regions_templ.go index 0d470f7..574e4c8 100644 --- a/internal/web/regions_templ.go +++ b/internal/web/regions_templ.go @@ -872,7 +872,7 @@ func RegionsPage(p Page, me Me, v RegionsView) templ.Component { }) } -func AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []CheckTypeOption, platformPrivate bool, limits LimitsView, idps IDPAdminView) templ.Component { +func AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []CheckTypeOption, platformPrivate bool, pageHome string, limits LimitsView, idps IDPAdminView) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -925,6 +925,10 @@ func AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []C if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + templ_7745c5c3_Err = statusPageHomeSection(pageHome).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } templ_7745c5c3_Err = checkTypesSection(checkTypes, "/admin/check-types", "/admin", "admin.check_types_intro").Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -995,7 +999,7 @@ func checkerNetworkSection(allow bool) templ.Component { var templ_7745c5c3_Var47 string templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.platform_private_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 225, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 226, Col: 87} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) if templ_7745c5c3_Err != nil { @@ -1008,7 +1012,7 @@ func checkerNetworkSection(allow bool) templ.Component { var templ_7745c5c3_Var48 string templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.save")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 226, Col: 129} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 227, Col: 129} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) if templ_7745c5c3_Err != nil { @@ -1022,6 +1026,101 @@ func checkerNetworkSection(allow bool) templ.Component { }) } +// statusPageHomeSection sets the home page the status page servers link +// from their error page. +func statusPageHomeSection(url string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = sectionHeading("admin.statuspage_home").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var50 string + templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.statuspage_home_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 237, Col: 80} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = formError().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + // checkTypesSection lets the platform or an organization choose the // check types it offers. func checkTypesSection(types []CheckTypeOption, api, next, introID string) templ.Component { @@ -1041,7 +1140,7 @@ func checkTypesSection(types []CheckTypeOption, api, next, introID string) templ } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1049,46 +1148,46 @@ func checkTypesSection(types []CheckTypeOption, api, next, introID string) templ if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var50 string - templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, introID)) + var templ_7745c5c3_Var55 string + templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, introID)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 236, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 254, Col: 59} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1096,89 +1195,89 @@ func checkTypesSection(types []CheckTypeOption, api, next, introID string) templ if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, t := range types { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1232,7 +1331,7 @@ func moderationSection(v ModerationView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1240,191 +1339,191 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var58 string - templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.intro")) + var templ_7745c5c3_Var63 string + templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.intro")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 287, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 305, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var58)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Pages) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var63 string - templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.none")) + var templ_7745c5c3_Var68 string + templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.none")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 300, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 318, Col: 65} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, pg := range v.Pages { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var64 string - templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.page")) + var templ_7745c5c3_Var69 string + templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.page")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 306, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 324, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var65 string - templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.org")) + var templ_7745c5c3_Var70 string + templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.org")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 307, Col: 72} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 325, Col: 72} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var66 string - templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.owner")) + var templ_7745c5c3_Var71 string + templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.owner")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 308, Col: 74} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 326, Col: 74} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var67 string - templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.created")) + var templ_7745c5c3_Var72 string + templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.created")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 309, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 327, Col: 76} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"hover:underline\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var69 string - templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Title) + var templ_7745c5c3_Var74 string + templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 316, Col: 119} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 334, Col: 119} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var70 string - templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Slug) + var templ_7745c5c3_Var75 string + templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Slug) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 317, Col: 67} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 335, Col: 67} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1432,33 +1531,33 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var71 string - templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Name) + var templ_7745c5c3_Var76 string + templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 321, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 339, Col: 22} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var72 string - templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Detail) + var templ_7745c5c3_Var77 string + templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Detail) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 322, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 340, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var77)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1466,25 +1565,25 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if pg.Owner != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var73 string - templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Owner.Name) + var templ_7745c5c3_Var78 string + templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Owner.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 327, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 345, Col: 49} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1493,38 +1592,38 @@ func moderationSection(v ModerationView) templ.Component { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "–") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "–") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var74 string - templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Created) + var templ_7745c5c3_Var79 string + templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Created) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 333, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 351, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var75 string - templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.actions")) + var templ_7745c5c3_Var80 string + templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.actions")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 338, Col: 103} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 356, Col: 103} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1537,20 +1636,20 @@ func moderationSection(v ModerationView) templ.Component { return templ_7745c5c3_Err } if pg.Owner != nil && pg.Owner.Admin { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var76 string - templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.owner_is_admin")) + var templ_7745c5c3_Var81 string + templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.owner_is_admin")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 343, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 361, Col: 84} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1560,12 +1659,12 @@ func moderationSection(v ModerationView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1574,7 +1673,7 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1600,61 +1699,61 @@ func moderationState(suspended string, draft bool) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if suspended != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var78 string - templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.suspended")) + var templ_7745c5c3_Var83 string + templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.suspended")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 363, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 381, Col: 40} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if suspended != "-" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var79 string - templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs("· " + suspended) + var templ_7745c5c3_Var84 string + templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs("· " + suspended) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 365, Col: 60} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 383, Col: 60} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else if draft { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var80 string - templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.draft")) + var templ_7745c5c3_Var85 string + templ_7745c5c3_Var85, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.draft")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 369, Col: 81} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 387, Col: 81} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var85)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1682,46 +1781,46 @@ func moderationActions(kind, api, suspended, name, next string) templ.Component } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var82 string - templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.target_"+kind)) + var templ_7745c5c3_Var87 string + templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.target_"+kind)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 377, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 395, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "\" class=\"mb-2\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1730,121 +1829,121 @@ func moderationActions(kind, api, suspended, name, next string) templ.Component return templ_7745c5c3_Err } if suspended != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1869,72 +1968,72 @@ func adminLinks() templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var94 string - templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.title")) + var templ_7745c5c3_Var99 string + templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 407, Col: 102} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 425, Col: 102} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var95 string - templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.title")) + var templ_7745c5c3_Var100 string + templ_7745c5c3_Var100, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 408, Col: 88} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 426, Col: 88} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var100)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var96 string - templ_7745c5c3_Var96, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "audit.platform_title")) + var templ_7745c5c3_Var101 string + templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "audit.platform_title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 409, Col: 99} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 427, Col: 99} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var96)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var97 string - templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "legal.platform_title")) + var templ_7745c5c3_Var102 string + templ_7745c5c3_Var102, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "legal.platform_title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 410, Col: 99} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 428, Col: 99} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var97)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var102)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var98 string - templ_7745c5c3_Var98, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "support.admin_title")) + var templ_7745c5c3_Var103 string + templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "support.admin_title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 411, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 429, Col: 100} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var98)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1959,7 +2058,7 @@ func AdminStatusPagesPage(p Page, me Me, v ModerationView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var100 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var105 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -1971,20 +2070,20 @@ func AdminStatusPagesPage(p Page, me Me, v ModerationView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "

← ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var101 string - templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) + var templ_7745c5c3_Var106 string + templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 417, Col: 109} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 435, Col: 109} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var106)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1994,7 +2093,7 @@ func AdminStatusPagesPage(p Page, me Me, v ModerationView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var100), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var105), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2019,7 +2118,7 @@ func AdminOrgsPage(p Page, me Me, v OrgsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var103 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var108 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -2031,20 +2130,20 @@ func AdminOrgsPage(p Page, me Me, v OrgsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "

← ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var104 string - templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) + var templ_7745c5c3_Var109 string + templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 424, Col: 109} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 442, Col: 109} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var109)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2054,7 +2153,7 @@ func AdminOrgsPage(p Page, me Me, v OrgsView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var103), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var108), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2081,173 +2180,173 @@ func agentInstall(in InstallView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var107 string - templ_7745c5c3_Var107, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_heading")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 433, Col: 78} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var107)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var109 string - templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_auto_hint")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 438, Col: 83} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var109)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var110 string - templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_oneliner")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 439, Col: 114} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "\" class=\"mt-6 border-t border-rule pt-4\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var112 string - templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_statuspage_hint")) + templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_heading")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 441, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 451, Col: 78} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var114 string + templ_7745c5c3_Var114, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_auto_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 456, Col: 83} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var114)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var115 string + templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_oneliner")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 457, Col: 114} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var117 string + templ_7745c5c3_Var117, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_statuspage_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 459, Col: 115} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var117)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var118 string + templ_7745c5c3_Var118, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_compose")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 461, Col: 82} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var118)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, kind := range []string{"checker", "statuspage"} { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "

compose.yaml

")
+			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "\" class=\"mt-3\">

compose.yaml

")
 			if templ_7745c5c3_Err != nil {
 				return templ_7745c5c3_Err
 			}
-			var templ_7745c5c3_Var115 string
-			templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(in.Compose[kind])
+			var templ_7745c5c3_Var120 string
+			templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.JoinStringErrs(in.Compose[kind])
 			if templ_7745c5c3_Err != nil {
-				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 447, Col: 105}
+				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 465, Col: 105}
 			}
-			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115))
+			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var120))
 			if templ_7745c5c3_Err != nil {
 				return templ_7745c5c3_Err
 			}
-			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "

.env

.env

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "\" class=\"overflow-x-auto border border-rule p-2 font-mono text-xs\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var117 string - templ_7745c5c3_Var117, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_compose_hint")) + var templ_7745c5c3_Var122 string + templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_compose_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 450, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 468, Col: 84} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var117)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }