diff --git a/README.md b/README.md index ba230ad..b696846 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ Run as many API, checker and status page instances as you need; they share no lo | Hybrid | hosted | at the customer | at the customer | | Self-hosted | at the customer | at the customer | at the customer | -Checkers and status page servers reach the API over HTTPS and never the database, so they can run in other networks. +Checkers and status page servers reach the API over HTTPS and never the database, so they can run in other networks. Once one of an organization's own status page servers has connected, only its own servers serve its pages; the platform's no longer do. ## Usage diff --git a/internal/api/console.go b/internal/api/console.go index 76c09eb..da46ada 100644 --- a/internal/api/console.go +++ b/internal/api/console.go @@ -1016,19 +1016,31 @@ func (s *Server) channelsView(c *gin.Context, p *principal, page web.Page, me we return web.ChannelsPage(page, me, v), nil } -func (s *Server) pageURL(p store.StatusPage) string { +// pageURL is where p is reachable, or empty when only the organization's +// own status page servers serve it, at an address the platform does not +// know. +func (s *Server) pageURL(p store.StatusPage, ownServers bool) string { if p.CustomDomain != nil && p.DomainVerifiedAt != nil { return "https://" + *p.CustomDomain + "/" } + if ownServers { + return "" + } return strings.TrimSuffix(s.cfg.StatusPageURL, "/") + "/" + p.Slug } func (s *Server) statusPagesView(c *gin.Context, p *principal, page web.Page, me web.Me) (templ.Component, error) { ctx := c.Request.Context() - var rows []store.StatusPage + var ( + rows []store.StatusPage + own bool + ) err := s.db.Tx(ctx, p.scope(), func(q *store.Queries) error { var err error - rows, err = q.ListStatusPages(ctx) + if rows, err = q.ListStatusPages(ctx); err != nil { + return err + } + own, err = q.OrgServesOwnPages(ctx, &p.Org.ID) return err }) if err != nil { @@ -1041,7 +1053,7 @@ func (s *Server) statusPagesView(c *gin.Context, p *principal, page web.Page, me } v.Pages = append(v.Pages, web.PageRow{ ID: r.ID.String(), Title: r.Title, Slug: r.Slug, Published: r.Published, - URL: s.pageURL(r), Domain: deref(r.CustomDomain), Suspended: r.SuspendedAt != nil, + URL: s.pageURL(r, own), Domain: deref(r.CustomDomain), Suspended: r.SuspendedAt != nil, }) } return web.StatusPagesPage(page, me, v), nil @@ -1059,6 +1071,7 @@ func (s *Server) statusPageEditor(c *gin.Context, p *principal, page web.Page, m pageGroups []store.StatusPageGroup orgGroups []store.MonitorGroup monitors []store.Monitor + own bool ) err = s.db.Tx(ctx, p.scope(), func(q *store.Queries) error { var err error @@ -1074,7 +1087,10 @@ func (s *Server) statusPageEditor(c *gin.Context, p *principal, page web.Page, m if orgGroups, err = q.ListGroups(ctx); err != nil { return err } - monitors, err = q.ListMonitors(ctx) + if monitors, err = q.ListMonitors(ctx); err != nil { + return err + } + own, err = q.OrgServesOwnPages(ctx, &p.Org.ID) return err }) if errors.Is(err, pgx.ErrNoRows) { @@ -1089,7 +1105,7 @@ func (s *Server) statusPageEditor(c *gin.Context, p *principal, page web.Page, m Published: row.Published, ShowDetails: row.ShowComponentDetails, Suspended: row.SuspendedAt != nil, SuspendedReason: row.SuspendedReason, Accent: v.Theme.Accent, LogoURL: v.Theme.LogoURL, CSS: v.Theme.CSS, - URL: s.pageURL(row), Domain: deref(row.CustomDomain), DomainVerified: v.DomainVerified, + URL: s.pageURL(row, own), OwnServers: own, Domain: deref(row.CustomDomain), DomainVerified: v.DomainVerified, HasOrgGroups: len(orgGroups) > 0, } if v.DomainRecord != nil { diff --git a/internal/api/statuspages.go b/internal/api/statuspages.go index d84602c..17cf843 100644 --- a/internal/api/statuspages.go +++ b/internal/api/statuspages.go @@ -346,14 +346,22 @@ func (s *Server) agentPage(c *gin.Context) { fail(c, http.StatusBadRequest, "invalid_input") return } - var page store.StatusPage + var ( + page store.StatusPage + own bool + ) + a := agentOf(c) err := s.db.Tx(ctx, tenant.System(), func(q *store.Queries) error { var err error - page, err = q.FindPublishedPage(ctx, store.FindPublishedPageParams{Host: host, Slug: slug}) + if page, err = q.FindPublishedPage(ctx, store.FindPublishedPageParams{Host: host, Slug: slug}); err != nil || a.OrgID != nil { + return err + } + own, err = q.OrgServesOwnPages(ctx, &page.OrgID) return err }) - a := agentOf(c) - if errors.Is(err, pgx.ErrNoRows) || (err == nil && a.OrgID != nil && *a.OrgID != page.OrgID) { + // The platform's servers leave the pages of organizations that serve + // them on their own servers to those. + if errors.Is(err, pgx.ErrNoRows) || (err == nil && (own || a.OrgID != nil && *a.OrgID != page.OrgID)) { fail(c, http.StatusNotFound, "not_found") return } diff --git a/internal/api/statuspages_test.go b/internal/api/statuspages_test.go index b34cd1d..3750ea5 100644 --- a/internal/api/statuspages_test.go +++ b/internal/api/statuspages_test.go @@ -192,6 +192,26 @@ func TestStatusPages(t *testing.T) { st, body = editor.do("PUT", "/api/v1/org/statuspages/"+second, map[string]any{"slug": "x-second", "title": "x"}) expect(t, "edit page out of scope", st, body, http.StatusNotFound, "not_found") }) + + t.Run("own servers replace the platform's", func(t *testing.T) { + org := uuid.MustParse(owner.orgID()) + own := e.statuspageClient(t, &org) + if _, err := platform.Page(context.Background(), "", slug); err != nil { + t.Fatalf("platform server before the own one connected: %v", err) + } + if _, err := own.Hello(context.Background()); err != nil { + t.Fatal(err) + } + if _, err := platform.Page(context.Background(), "", slug); !errors.Is(err, agentapi.ErrNotFound) { + t.Errorf("platform server still gets the page: %v", err) + } + if snap, err := own.Page(context.Background(), "", slug); err != nil || snap.Title != "Acme Status" { + t.Errorf("own server Page() = %v, %v", snap.Title, err) + } + if _, _, html := owner.page("/statuspages/" + pageID); !strings.Contains(html, "own status page servers serve its pages") { + t.Error("the editor does not say who serves the pages") + } + }) } func editorEmail(b *browser) string { diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index a5e9dd7..04f4a5e 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -1256,6 +1256,8 @@ "pages.logo": "Logo-URL (https)", "pages.no_group": "Ohne Gruppe", "pages.open": "Öffnen", + "pages.own_servers": "Die Statusseiten dieser Organisation liefern nur ihre eigenen Statusseiten-Server aus, nicht die der Plattform. Ruf sie über die Adresse deiner Server auf oder verbinde eine eigene Domain, die auf sie zeigt.", + "pages.own_servers_short": "eigene Server", "pages.page_title": "Titel", "pages.published": "Veröffentlicht", "pages.section": "Abschnitt", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index fe99e85..f1e5841 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -1256,6 +1256,8 @@ "pages.logo": "Logo URL (https)", "pages.no_group": "No group", "pages.open": "Open", + "pages.own_servers": "Your organization's own status page servers serve its pages; the platform's do not. Open them at the address of your servers or connect a custom domain pointing at them.", + "pages.own_servers_short": "own servers", "pages.page_title": "Title", "pages.published": "Published", "pages.section": "Section", diff --git a/internal/store/agents.sql.go b/internal/store/agents.sql.go index 898a755..adc76c3 100644 --- a/internal/store/agents.sql.go +++ b/internal/store/agents.sql.go @@ -318,6 +318,22 @@ func (q *Queries) ListVisibleRegions(ctx context.Context) ([]Region, error) { return items, nil } +const orgServesOwnPages = `-- name: OrgServesOwnPages :one +SELECT EXISTS ( + SELECT 1 FROM agents + WHERE org_id = $1 AND kind = 'statuspage' AND last_seen_at IS NOT NULL +) +` + +// An organization serves its status pages itself once one of its own +// status page servers has connected. +func (q *Queries) OrgServesOwnPages(ctx context.Context, orgID *uuid.UUID) (bool, error) { + row := q.db.QueryRow(ctx, orgServesOwnPages, orgID) + var exists bool + err := row.Scan(&exists) + return exists, err +} + const setAgentAllowPrivate = `-- name: SetAgentAllowPrivate :execrows UPDATE agents SET allow_private = $1 WHERE id = $2 AND kind = 'checker' AND org_id = $3 diff --git a/internal/store/querier.go b/internal/store/querier.go index c8fc1ec..44654c6 100644 --- a/internal/store/querier.go +++ b/internal/store/querier.go @@ -289,6 +289,9 @@ type Querier interface { OrgIncidentUpdatesExport(ctx context.Context, orgID uuid.UUID) ([]OrgIncidentUpdatesExportRow, error) OrgIncidentsExport(ctx context.Context, orgID uuid.UUID) ([]OrgIncidentsExportRow, error) OrgMembersExport(ctx context.Context, orgID uuid.UUID) ([]OrgMembersExportRow, error) + // An organization serves its status pages itself once one of its own + // status page servers has connected. + OrgServesOwnPages(ctx context.Context, orgID *uuid.UUID) (bool, error) // Organizations user owns, with their member and owner counts. OwnedOrgs(ctx context.Context, userID uuid.UUID) ([]OwnedOrgsRow, error) // The public updates of incidents shown on a status page, newest first. diff --git a/internal/store/queries/agents.sql b/internal/store/queries/agents.sql index 4118574..1a72db3 100644 --- a/internal/store/queries/agents.sql +++ b/internal/store/queries/agents.sql @@ -54,3 +54,11 @@ WHERE id = $1 AND (last_seen_at IS NULL OR last_seen_at < now() - interval '30 s -- name: SetAgentAllowPrivate :execrows UPDATE agents SET allow_private = sqlc.arg(allow_private) WHERE id = sqlc.arg(id) AND kind = 'checker' AND org_id = sqlc.arg(org_id); + +-- name: OrgServesOwnPages :one +-- An organization serves its status pages itself once one of its own +-- status page servers has connected. +SELECT EXISTS ( + SELECT 1 FROM agents + WHERE org_id = $1 AND kind = 'statuspage' AND last_seen_at IS NOT NULL +); diff --git a/internal/web/statuspages.templ b/internal/web/statuspages.templ index 7d7332a..2377201 100644 --- a/internal/web/statuspages.templ +++ b/internal/web/statuspages.templ @@ -44,6 +44,8 @@ templ StatusPagesPage(p Page, me Me, v PagesView) { } if pg.Suspended { { i18n.T(ctx, "pages.suspended") } + } else if pg.Published && pg.URL == "" { + { i18n.T(ctx, "pages.own_servers_short") } } else if pg.Published { { i18n.T(ctx, "pages.open") } ↗ } else { @@ -89,6 +91,9 @@ type PageMonitorOption struct { // PageEditor is the data of the status page editor. type PageEditor struct { + // OwnServers is set when the organization's own status page servers + // serve its pages instead of the platform's. + OwnServers bool ID string Title string Slug string @@ -124,12 +129,15 @@ templ StatusPageEditor(p Page, me Me, e PageEditor) {

{ e.Title }

- if e.Published { + if e.Published && e.URL != "" { { i18n.T(ctx, "pages.open") } ↗ } { i18n.T(ctx, "pages.export") }
+ if e.OwnServers { +

{ i18n.T(ctx, "pages.own_servers") }

+ }
@sectionHeading("pages.settings") diff --git a/internal/web/statuspages_templ.go b/internal/web/statuspages_templ.go index df76498..7f15358 100644 --- a/internal/web/statuspages_templ.go +++ b/internal/web/statuspages_templ.go @@ -171,72 +171,90 @@ func StatusPagesPage(p Page, me Me, v PagesView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - } else if pg.Published { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var8 string - templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(pg.URL)).ResolveURL(ctx) + templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.own_servers_short")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 48, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 48, Col: 88} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\" class=\"ml-auto text-muted hover:text-ink\" target=\"_blank\" rel=\"noopener\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else if pg.Published { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" class=\"ml-auto text-muted hover:text-ink\" target=\"_blank\" rel=\"noopener\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var10 string - templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.draft")) + templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.open")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 50, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 50, Col: 141} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, " ↗") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var11 string + templ_7745c5c3_Var11, 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/statuspages.templ`, Line: 52, Col: 76} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -244,7 +262,7 @@ func StatusPagesPage(p Page, me Me, v PagesView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -264,7 +282,7 @@ func StatusPagesPage(p Page, me Me, v PagesView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -301,6 +319,9 @@ type PageMonitorOption struct { // PageEditor is the data of the status page editor. type PageEditor struct { + // OwnServers is set when the organization's own status page servers + // serve its pages instead of the platform's. + OwnServers bool ID string Title string Slug string @@ -339,7 +360,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var12 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var13 := 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 { @@ -351,133 +372,156 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "

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

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var13 string - templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.title")) + var templ_7745c5c3_Var14 string + templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 115, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 120, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.Suspended { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var14 string - templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.suspended_notice")) + var templ_7745c5c3_Var15 string + templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.suspended_notice")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 118, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 123, Col: 43} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.SuspendedReason != "" { - var templ_7745c5c3_Var15 string - templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(" " + i18n.T(ctx, "console.suspended_reason", "Reason", e.SuspendedReason)) + var templ_7745c5c3_Var16 string + templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(" " + i18n.T(ctx, "console.suspended_reason", "Reason", e.SuspendedReason)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 120, Col: 81} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 125, Col: 81} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var16 string - templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(e.Title) + var templ_7745c5c3_Var17 string + templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(e.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 125, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 130, Col: 46} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - if e.Published { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "") + if e.Published && e.URL != "" { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\" target=\"_blank\" rel=\"noopener\" class=\"text-muted hover:text-ink\">") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var19 string + templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.open")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 133, Col: 130} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, " ↗ ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if e.OwnServers { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var22 string + templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.own_servers")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 139, Col: 88} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -485,33 +529,33 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -527,20 +571,20 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var23 string - templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.description")) + var templ_7745c5c3_Var25 string + templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.description")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 141, Col: 121} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 149, Col: 121} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -548,7 +592,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -560,33 +604,33 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var24 string - templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.show_details_hint")) + var templ_7745c5c3_Var26 string + templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.show_details_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 146, Col: 86} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 154, Col: 86} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var25 string - templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.theme")) + var templ_7745c5c3_Var27 string + templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.theme")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 147, Col: 111} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 155, Col: 111} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -598,33 +642,33 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -632,46 +676,46 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\" data-confirm=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var31 string + templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "pages.delete_confirm")).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 167, Col: 55} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "\" data-next=\"/statuspages\" class=\"mt-6 text-sm text-down hover:underline\">") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var32 string + templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.delete")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 170, Col: 34} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -680,152 +724,152 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { return templ_7745c5c3_Err } if e.HasOrgGroups { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "\" data-ok=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var35 string + templ_7745c5c3_Var35, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "pages.groups_imported")).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 181, Col: 54} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "\" data-reload class=\"border border-rule px-2.5 py-1 text-xs hover:border-ink\">") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var36 string + templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.groups_import")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 184, Col: 44} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var35 string - templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.groups_intro")) + var templ_7745c5c3_Var37 string + templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.groups_intro")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 179, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 187, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(e.Groups) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, g := range e.Groups { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "
    • ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var37 string - templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 186, Col: 25} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var39 string - templ_7745c5c3_Var39, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID + "/groups/" + g.ID).Resolve(ctx) + templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 189, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 194, Col: 25} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var39) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" data-method=\"put\" data-next=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var40 string - templ_7745c5c3_Var40, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/statuspages/" + e.ID).Resolve(ctx) + templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.edit")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 189, Col: 128} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 195, Col: 72} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var40) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\" class=\"mt-3 max-w-sm\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -837,20 +881,20 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, ">
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1025,95 +1069,95 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { 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, "\" data-next=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var55 string + templ_7745c5c3_Var55, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/statuspages/" + e.ID).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 221, Col: 47} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var55) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "\" class=\"text-sm text-down hover:underline\">") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var56 string + templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.delete")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 223, Col: 43} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "\" class=\"border border-rule p-3\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1121,82 +1165,16 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { 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, 116, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1371,33 +1415,33 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { 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 } @@ -1406,205 +1450,205 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { return templ_7745c5c3_Err } if len(e.Monitors) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var73 string - templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.empty")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 254, Col: 81} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1612,7 +1656,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1620,33 +1664,33 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1662,155 +1706,155 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.Domain != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.DomainVerified { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "

● ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var86 string - templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_verified")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 293, Col: 82} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var87 string - templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_cname")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 294, Col: 78} - } - _, 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, 146, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "

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

● ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var88 string - templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_instructions")) + templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_verified")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 296, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 301, Col: 82} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "

TXT
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var89 string - templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(e.RecordName) + templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_cname")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 299, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 302, Col: 78} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) 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, 151, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var90 string - templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.value")) + templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_instructions")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 300, Col: 60} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 304, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90)) 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, 153, "

TXT
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var91 string - templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(e.RecordValue) + templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(e.RecordName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 301, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 307, Col: 45} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "
") 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, 160, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var12), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var13), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }