From ca852c8299682ba2484833a3fab00dc924b68676 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?=
Date: Wed, 25 Nov 2026 23:21:26 +0100
Subject: [PATCH] feat(limits): limit the monitors shown on one status page
Platform admins set a default for how many monitors a status page may
show, and an override per organization, like the other limits. Saving a
page with more gives 422 page_monitor_limit; a page beyond a lowered
limit keeps its monitors but cannot grow. The page editor names the
limit and the organization's usage lists it.
Co-Authored-By: Claude Opus 5.5
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
---
internal/api/apidocs.go | 2 +-
internal/api/console.go | 1 +
internal/api/limits.go | 14 +-
internal/api/limits_test.go | 65 ++
internal/api/statuspages.go | 11 +
internal/i18n/locales/de.json | 3 +
internal/i18n/locales/en.json | 3 +
.../sql/00053_limit_monitors_per_page.sql | 7 +
internal/store/limits.sql.go | 21 +-
internal/store/models.go | 1 +
internal/store/orgs.sql.go | 15 +-
internal/store/querier.go | 1 +
internal/store/queries/limits.sql | 7 +-
internal/web/admin_orgs.templ | 6 +
internal/web/admin_orgs_templ.go | 138 ++--
internal/web/statuspages.templ | 5 +
internal/web/statuspages_templ.go | 727 +++++++++---------
17 files changed, 611 insertions(+), 416 deletions(-)
create mode 100644 internal/migrations/sql/00053_limit_monitors_per_page.sql
diff --git a/internal/api/apidocs.go b/internal/api/apidocs.go
index 1785996..96c237f 100644
--- a/internal/api/apidocs.go
+++ b/internal/api/apidocs.go
@@ -106,7 +106,7 @@ var endpoints = []endpoint{
description: "Platform checkers serve every organization; other organizations' work appears only as a count. `recent` is paged, newest first; a page may hold fewer results than `limit` when some belong to monitors you cannot read.",
resp: checkerActivity{}},
{method: "GET", path: "/api/v1/org/limits", tag: "Organization", summary: "Limits in effect for the organization and its usage",
- description: "0 means unlimited. Creating beyond a limit gives 422 monitor_limit, status_page_limit, region_limit or platform_region_limit.",
+ description: "0 means unlimited. Creating beyond a limit gives 422 monitor_limit, status_page_limit, page_monitor_limit, region_limit or platform_region_limit.",
resp: usageView{}},
{method: "GET", path: "/api/v1/org/check-types", tag: "Monitors", summary: "Monitor types members can create",
description: "`own_checkers_only` are the types the platform's checkers do not run: monitors of them use the organization's own regions only, or 422 check_type_own_checkers_only.",
diff --git a/internal/api/console.go b/internal/api/console.go
index e2a4498..cca61ac 100644
--- a/internal/api/console.go
+++ b/internal/api/console.go
@@ -1203,6 +1203,7 @@ func (s *Server) statusPageEditor(c *gin.Context, p *principal, page web.Page, m
e.RecordName, e.RecordValue = v.DomainRecord.Name, v.DomainRecord.Value
}
e.DomainChangesPerDay = domainChangesPerDay
+ e.MonitorLimit = s.orgLimits(c.Request.Context(), p.Org).MonitorsPerPage
if v.CNAMERecord != nil {
e.CNAMEValue = v.CNAMERecord.Value
}
diff --git a/internal/api/limits.go b/internal/api/limits.go
index ddd0767..aab72d5 100644
--- a/internal/api/limits.go
+++ b/internal/api/limits.go
@@ -36,6 +36,8 @@ type Limits struct {
OwnRegionsCount bool `json:"own_regions_count"`
// OrgsPerAccount limits the organizations an account owns.
OrgsPerAccount int `json:"orgs_per_account"`
+ // MonitorsPerPage limits the monitors one status page shows.
+ MonitorsPerPage int `json:"monitors_per_page"`
}
func (s *Server) defaultLimits() Limits {
@@ -79,6 +81,7 @@ func (s *Server) orgLimits(ctx context.Context, org store.Org) Limits {
override(&l.Monitors, org.LimitMonitors)
override(&l.StatusPages, org.LimitStatusPages)
override(&l.RegionsPerMonitor, org.LimitRegionsPerMonitor)
+ override(&l.MonitorsPerPage, org.LimitMonitorsPerPage)
if org.LimitOwnRegionsCount != nil {
l.OwnRegionsCount = *org.LimitOwnRegionsCount
}
@@ -189,6 +192,7 @@ type limitsRequest struct {
RegionsPerMonitor int `json:"regions_per_monitor" binding:"min=0,max=1000"`
OwnRegionsCount bool `json:"own_regions_count"`
OrgsPerAccount int `json:"orgs_per_account" binding:"min=0,max=100000"`
+ MonitorsPerPage int `json:"monitors_per_page" binding:"min=0,max=200"`
}
func (s *Server) adminSetLimits(c *gin.Context) {
@@ -243,6 +247,7 @@ type orgLimitsRequest struct {
StatusPages *int32 `json:"status_pages" binding:"omitempty,min=0,max=1000000"`
RegionsPerMonitor *int32 `json:"regions_per_monitor" binding:"omitempty,min=0,max=1000"`
OwnRegionsCount optBool `json:"own_regions_count"`
+ MonitorsPerPage *int32 `json:"monitors_per_page" binding:"omitempty,min=0,max=200"`
}
func (s *Server) adminSetOrgLimits(c *gin.Context) {
@@ -261,6 +266,7 @@ func (s *Server) adminSetOrgLimits(c *gin.Context) {
row, err := q.SetOrgLimits(ctx, store.SetOrgLimitsParams{
ID: id, Monitors: req.Monitors, StatusPages: req.StatusPages,
RegionsPerMonitor: req.RegionsPerMonitor, OwnRegionsCount: req.OwnRegionsCount.v,
+ MonitorsPerPage: req.MonitorsPerPage,
})
auditDetail(c, "slug", row.Slug)
return err
@@ -316,6 +322,7 @@ type orgLimitsView struct {
StatusPages *int32 `json:"status_pages"`
RegionsPerMonitor *int32 `json:"regions_per_monitor"`
OwnRegionsCount *bool `json:"own_regions_count"`
+ MonitorsPerPage *int32 `json:"monitors_per_page"`
}
type adminOwner struct {
@@ -342,9 +349,10 @@ func (s *Server) adminOrgs(ctx context.Context, search string, pg pageReq) ([]ad
o := &out[i]
o.moderatedOrg = moderatedOrg{r.ID, r.Slug, r.Name, r.SuspendedAt, r.SuspendedReason}
o.Created = r.CreatedAt.Format("2006-01-02")
- o.Overrides = orgLimitsView{r.LimitMonitors, r.LimitStatusPages, r.LimitRegionsPerMonitor, r.LimitOwnRegionsCount}
+ o.Overrides = orgLimitsView{r.LimitMonitors, r.LimitStatusPages, r.LimitRegionsPerMonitor, r.LimitOwnRegionsCount, r.LimitMonitorsPerPage}
o.Limits = s.orgLimits(ctx, store.Org{LimitMonitors: r.LimitMonitors, LimitStatusPages: r.LimitStatusPages,
- LimitRegionsPerMonitor: r.LimitRegionsPerMonitor, LimitOwnRegionsCount: r.LimitOwnRegionsCount})
+ LimitRegionsPerMonitor: r.LimitRegionsPerMonitor, LimitOwnRegionsCount: r.LimitOwnRegionsCount,
+ LimitMonitorsPerPage: r.LimitMonitorsPerPage})
o.Limits.OrgsPerAccount = defaults.OrgsPerAccount
o.Usage.Monitors, o.Usage.StatusPages = int(r.Monitors), int(r.StatusPages)
if r.OwnerID != uuid.Nil {
@@ -403,7 +411,7 @@ func (s *Server) orgsView(c *gin.Context, pg pageReq) (web.OrgsView, error) {
ID: o.ID.String(), Name: o.Name, Slug: o.Slug, Created: o.Created, Suspended: state(o.SuspendedAt, o.Reason),
Monitors: o.Usage.Monitors, StatusPages: o.Usage.StatusPages, Limits: webLimits(o.Limits),
MonitorsOverride: optInt(o.Overrides.Monitors), StatusPagesOverride: optInt(o.Overrides.StatusPages),
- RegionsOverride: optInt(o.Overrides.RegionsPerMonitor),
+ RegionsOverride: optInt(o.Overrides.RegionsPerMonitor), PerPageOverride: optInt(o.Overrides.MonitorsPerPage),
}
if o.Overrides.OwnRegionsCount != nil {
row.OwnRegionsOverride = strconv.FormatBool(*o.Overrides.OwnRegionsCount)
diff --git a/internal/api/limits_test.go b/internal/api/limits_test.go
index 40ef931..1f3e7d2 100644
--- a/internal/api/limits_test.go
+++ b/internal/api/limits_test.go
@@ -155,3 +155,68 @@ func TestLimits(t *testing.T) {
t.Error("the organization settings lack the usage")
}
}
+
+func TestMonitorsPerStatusPageLimit(t *testing.T) {
+ e := newEnv(t)
+ ctx := context.Background()
+ reset := func() {
+ _ = e.asSystem(t, func(tx pgx.Tx) error {
+ _, err := tx.Exec(ctx, `DELETE FROM platform_settings WHERE key = 'limits'`)
+ return err
+ })
+ }
+ reset()
+ t.Cleanup(reset)
+ admin := e.browser(t)
+ admin.signup("admin@"+uniq("mpp")+".test", uniq("mpp-admin-"))
+ if err := tenant.New(e.dbPool).Tx(ctx, tenant.Global(), func(q *store.Queries) error {
+ return q.MakeAdmin(ctx, admin.userIDSelf())
+ }); err != nil {
+ t.Fatal(err)
+ }
+ if st, body := admin.do("PUT", "/api/v1/admin/limits", map[string]any{"monitors_per_page": 2}); st != http.StatusNoContent {
+ t.Fatalf("set defaults = %d %v", st, body)
+ }
+
+ owner := e.browser(t)
+ owner.signup("o@"+uniq("mpp")+".test", uniq("mpp-"))
+ var ids []map[string]any
+ for range 3 {
+ _, m := owner.do("POST", "/api/v1/org/monitors", map[string]any{"name": "hb", "type": "heartbeat", "interval_seconds": 3600})
+ ids = append(ids, map[string]any{"monitor_id": m["id"]})
+ }
+ _, page := owner.do("POST", "/api/v1/org/statuspages", map[string]any{"slug": uniq("mpp-"), "title": "Status"})
+ set := func(n int) (int, map[string]any) {
+ return owner.do("PUT", "/api/v1/org/statuspages/"+page["id"].(string)+"/monitors", map[string]any{"monitors": ids[:n]})
+ }
+ if st, body := set(2); st != http.StatusNoContent {
+ t.Fatalf("two monitors = %d %v", st, body)
+ }
+ st, body := set(3)
+ expect(t, "three monitors", st, body, http.StatusUnprocessableEntity, "page_monitor_limit")
+ if _, _, html := owner.page("/statuspages/" + page["id"].(string)); !strings.Contains(html, "at most 2 monitors") {
+ t.Error("the editor does not name the limit")
+ }
+
+ // An override for the organization raises it; lowered again, the page
+ // keeps its monitors but cannot grow.
+ org := owner.orgID()
+ if st, body := admin.do("PUT", "/api/v1/admin/orgs/"+org+"/limits", map[string]any{"monitors_per_page": 3}); st != http.StatusNoContent {
+ t.Fatalf("override = %d %v", st, body)
+ }
+ if st, body := set(3); st != http.StatusNoContent {
+ t.Fatalf("three monitors with the override = %d %v", st, body)
+ }
+ admin.do("PUT", "/api/v1/admin/orgs/"+org+"/limits", map[string]any{"monitors_per_page": 1})
+ if st, body := set(3); st != http.StatusNoContent {
+ t.Errorf("saving a page beyond a lowered limit = %d %v", st, body)
+ }
+ if st, body := set(2); st != http.StatusNoContent {
+ t.Errorf("shrinking a page beyond a lowered limit = %d %v", st, body)
+ }
+ st, body = set(3)
+ expect(t, "growing again beyond the lowered limit", st, body, http.StatusUnprocessableEntity, "page_monitor_limit")
+ if _, _, html := admin.page("/admin"); !strings.Contains(html, "Monitors per status page") {
+ t.Error("the admin page does not offer the limit")
+ }
+}
diff --git a/internal/api/statuspages.go b/internal/api/statuspages.go
index 580f02a..f2506b3 100644
--- a/internal/api/statuspages.go
+++ b/internal/api/statuspages.go
@@ -698,6 +698,16 @@ func (s *Server) setPageMonitors(c *gin.Context) {
}
}
}
+ // A page beyond a lowered limit may keep its monitors but not add any.
+ if max := s.orgLimits(ctx, p.Org).MonitorsPerPage; max > 0 && len(req.Monitors) > max {
+ had, err := q.CountStatusPageMonitors(ctx, id)
+ if err != nil {
+ return err
+ }
+ if int64(len(req.Monitors)) > had {
+ return limitError{"page_monitor_limit", max}
+ }
+ }
if err := q.ClearStatusPageMonitors(ctx, id); err != nil {
return err
}
@@ -725,6 +735,7 @@ func (s *Server) setPageMonitors(c *gin.Context) {
case isForeignKeyViolation(err), isUniqueViolation(err, "status_page_monitors_pkey"):
// Unknown monitors, monitors of other orgs and duplicates.
fail(c, http.StatusUnprocessableEntity, "invalid_monitor")
+ case failLimit(c, err):
case err != nil:
internalError(c, err)
default:
diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json
index 8a3f293..0731453 100644
--- a/internal/i18n/locales/de.json
+++ b/internal/i18n/locales/de.json
@@ -619,6 +619,7 @@
"error.owner_cannot_be_removed": "Owner können nicht entfernt werden. Entziehe zuerst die Owner-Rechte.",
"error.owner_has_all_permissions": "Der Owner hat bereits alle Berechtigungen.",
"error.owner_only": "Nur Owner können ändern, wem die Organisation gehört.",
+ "error.page_monitor_limit": "Eine Statusseite darf höchstens {{.Max}} Monitore zeigen.",
"error.password_too_short": "Das Passwort braucht mindestens {{.Min}} Zeichen.",
"error.permission_escalation": "Du kannst keine Berechtigungen vergeben, die du selbst nicht hast.",
"error.platform_region_limit": "Ein Monitor darf aus höchstens {{.Max}} Plattform-Regionen geprüft werden; eigene Checker-Regionen zählen nicht.",
@@ -902,6 +903,7 @@
"limits.default": "Standard: {{.Value}}",
"limits.intro": "Gelten für jede Organisation und jeden Account ohne eigenen Wert, auch wenn du sie später änderst. 0 heißt unbegrenzt. Ein gesenktes Limit lässt alles Bestehende stehen; nur neue Monitore, Statusseiten, Regionen oder Organisationen werden abgelehnt.",
"limits.monitors": "Monitore",
+ "limits.monitors_per_page": "Monitore pro Statusseite",
"limits.org_title": "Kontingent",
"limits.orgs_per_account": "Organisationen pro Account",
"limits.own_false": "zählen nicht",
@@ -1290,6 +1292,7 @@
"pages.intro": "Öffentliche Seiten mit dem Zustand ausgewählter Monitore. Jede Seite kann eine eigene Domain nutzen oder als einzelne HTML-Datei exportiert werden.",
"pages.label": "Öffentlicher Name",
"pages.logo": "Logo-URL (https)",
+ "pages.monitor_limit": "Diese Seite darf höchstens {{.Max}} Monitore zeigen.",
"pages.monitors_all": "Alle hinzufügen",
"pages.monitors_none": "Alle entfernen",
"pages.no_group": "Ohne Gruppe",
diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json
index e39a590..f529bbd 100644
--- a/internal/i18n/locales/en.json
+++ b/internal/i18n/locales/en.json
@@ -619,6 +619,7 @@
"error.owner_cannot_be_removed": "Owners cannot be removed. Take their ownership away first.",
"error.owner_has_all_permissions": "The owner already has every permission.",
"error.owner_only": "Only owners can change who owns the organization.",
+ "error.page_monitor_limit": "A status page may show at most {{.Max}} monitors.",
"error.password_too_short": "The password needs at least {{.Min}} characters.",
"error.permission_escalation": "You cannot grant permissions you do not hold yourself.",
"error.platform_region_limit": "A monitor may be checked from at most {{.Max}} platform regions; your own checker regions do not count.",
@@ -902,6 +903,7 @@
"limits.default": "default: {{.Value}}",
"limits.intro": "Apply to every organization and account without an override of its own, also when you change them later. 0 means unlimited. Lowering a limit keeps everything that exists; only new monitors, status pages, regions or organizations are refused.",
"limits.monitors": "Monitors",
+ "limits.monitors_per_page": "Monitors per status page",
"limits.org_title": "Usage",
"limits.orgs_per_account": "Organizations per account",
"limits.own_false": "do not count",
@@ -1290,6 +1292,7 @@
"pages.intro": "Public pages showing the state of selected monitors. Each page can use its own domain or be exported as a single HTML file.",
"pages.label": "Public name",
"pages.logo": "Logo URL (https)",
+ "pages.monitor_limit": "This page may show at most {{.Max}} monitors.",
"pages.monitors_all": "Add all",
"pages.monitors_none": "Remove all",
"pages.no_group": "No group",
diff --git a/internal/migrations/sql/00053_limit_monitors_per_page.sql b/internal/migrations/sql/00053_limit_monitors_per_page.sql
new file mode 100644
index 0000000..9a72830
--- /dev/null
+++ b/internal/migrations/sql/00053_limit_monitors_per_page.sql
@@ -0,0 +1,7 @@
+-- +goose Up
+-- How many monitors one status page of the organization may show; NULL
+-- follows the platform default, 0 means unlimited.
+ALTER TABLE orgs ADD COLUMN limit_monitors_per_page integer CHECK (limit_monitors_per_page >= 0);
+
+-- +goose Down
+ALTER TABLE orgs DROP COLUMN limit_monitors_per_page;
diff --git a/internal/store/limits.sql.go b/internal/store/limits.sql.go
index 4df739e..c56c63e 100644
--- a/internal/store/limits.sql.go
+++ b/internal/store/limits.sql.go
@@ -15,6 +15,7 @@ import (
const adminListOrgs = `-- name: AdminListOrgs :many
SELECT o.id, o.slug, o.name, o.created_at, o.suspended_at, o.suspended_reason,
o.limit_monitors, o.limit_status_pages, o.limit_regions_per_monitor, o.limit_own_regions_count,
+ o.limit_monitors_per_page,
(SELECT count(*) FROM monitors m WHERE m.org_id = o.id)::integer AS monitors,
(SELECT count(*) FROM status_pages p WHERE p.org_id = o.id)::integer AS status_pages,
coalesce(ow.id, '00000000-0000-0000-0000-000000000000'::uuid)::uuid AS owner_id,
@@ -61,6 +62,7 @@ type AdminListOrgsRow struct {
LimitStatusPages *int32
LimitRegionsPerMonitor *int32
LimitOwnRegionsCount *bool
+ LimitMonitorsPerPage *int32
Monitors int32
StatusPages int32
OwnerID uuid.UUID
@@ -102,6 +104,7 @@ func (q *Queries) AdminListOrgs(ctx context.Context, arg AdminListOrgsParams) ([
&i.LimitStatusPages,
&i.LimitRegionsPerMonitor,
&i.LimitOwnRegionsCount,
+ &i.LimitMonitorsPerPage,
&i.Monitors,
&i.StatusPages,
&i.OwnerID,
@@ -133,6 +136,17 @@ func (q *Queries) CountMonitors(ctx context.Context, orgID uuid.UUID) (int64, er
return count, err
}
+const countStatusPageMonitors = `-- name: CountStatusPageMonitors :one
+SELECT count(*) FROM status_page_monitors WHERE page_id = $1
+`
+
+func (q *Queries) CountStatusPageMonitors(ctx context.Context, pageID uuid.UUID) (int64, error) {
+ row := q.db.QueryRow(ctx, countStatusPageMonitors, pageID)
+ var count int64
+ err := row.Scan(&count)
+ return count, err
+}
+
const countStatusPages = `-- name: CountStatusPages :one
SELECT count(*) FROM status_pages WHERE org_id = $1
`
@@ -157,8 +171,9 @@ func (q *Queries) LockOrgUsage(ctx context.Context, orgID uuid.UUID) error {
const setOrgLimits = `-- name: SetOrgLimits :one
UPDATE orgs SET limit_monitors = $1, limit_status_pages = $2,
- limit_regions_per_monitor = $3, limit_own_regions_count = $4
-WHERE id = $5
+ limit_regions_per_monitor = $3, limit_own_regions_count = $4,
+ limit_monitors_per_page = $5
+WHERE id = $6
RETURNING id, slug
`
@@ -167,6 +182,7 @@ type SetOrgLimitsParams struct {
StatusPages *int32
RegionsPerMonitor *int32
OwnRegionsCount *bool
+ MonitorsPerPage *int32
ID uuid.UUID
}
@@ -181,6 +197,7 @@ func (q *Queries) SetOrgLimits(ctx context.Context, arg SetOrgLimitsParams) (Set
arg.StatusPages,
arg.RegionsPerMonitor,
arg.OwnRegionsCount,
+ arg.MonitorsPerPage,
arg.ID,
)
var i SetOrgLimitsRow
diff --git a/internal/store/models.go b/internal/store/models.go
index 92e4e1b..b7f7c03 100644
--- a/internal/store/models.go
+++ b/internal/store/models.go
@@ -321,6 +321,7 @@ type Org struct {
LimitStatusPages *int32
LimitRegionsPerMonitor *int32
LimitOwnRegionsCount *bool
+ LimitMonitorsPerPage *int32
}
type PlatformIdentity struct {
diff --git a/internal/store/orgs.sql.go b/internal/store/orgs.sql.go
index 2cca851..fdd0a8a 100644
--- a/internal/store/orgs.sql.go
+++ b/internal/store/orgs.sql.go
@@ -13,7 +13,7 @@ import (
const createOrg = `-- name: CreateOrg :one
INSERT INTO orgs (id, slug, name) VALUES ($1, $2, $3)
-RETURNING id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count
+RETURNING id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count, limit_monitors_per_page
`
type CreateOrgParams struct {
@@ -41,6 +41,7 @@ func (q *Queries) CreateOrg(ctx context.Context, arg CreateOrgParams) (Org, erro
&i.LimitStatusPages,
&i.LimitRegionsPerMonitor,
&i.LimitOwnRegionsCount,
+ &i.LimitMonitorsPerPage,
)
return i, err
}
@@ -58,7 +59,7 @@ func (q *Queries) DeleteOrg(ctx context.Context, id uuid.UUID) (int64, error) {
}
const getOrg = `-- name: GetOrg :one
-SELECT id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count FROM orgs WHERE id = $1
+SELECT id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count, limit_monitors_per_page FROM orgs WHERE id = $1
`
func (q *Queries) GetOrg(ctx context.Context, id uuid.UUID) (Org, error) {
@@ -80,12 +81,13 @@ func (q *Queries) GetOrg(ctx context.Context, id uuid.UUID) (Org, error) {
&i.LimitStatusPages,
&i.LimitRegionsPerMonitor,
&i.LimitOwnRegionsCount,
+ &i.LimitMonitorsPerPage,
)
return i, err
}
const getOrgBySlug = `-- name: GetOrgBySlug :one
-SELECT id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count FROM orgs WHERE slug = $1
+SELECT id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count, limit_monitors_per_page FROM orgs WHERE slug = $1
`
func (q *Queries) GetOrgBySlug(ctx context.Context, slug string) (Org, error) {
@@ -107,12 +109,13 @@ func (q *Queries) GetOrgBySlug(ctx context.Context, slug string) (Org, error) {
&i.LimitStatusPages,
&i.LimitRegionsPerMonitor,
&i.LimitOwnRegionsCount,
+ &i.LimitMonitorsPerPage,
)
return i, err
}
const listOrgs = `-- name: ListOrgs :many
-SELECT id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count FROM orgs ORDER BY name
+SELECT id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count, limit_monitors_per_page FROM orgs ORDER BY name
`
func (q *Queries) ListOrgs(ctx context.Context) ([]Org, error) {
@@ -140,6 +143,7 @@ func (q *Queries) ListOrgs(ctx context.Context) ([]Org, error) {
&i.LimitStatusPages,
&i.LimitRegionsPerMonitor,
&i.LimitOwnRegionsCount,
+ &i.LimitMonitorsPerPage,
); err != nil {
return nil, err
}
@@ -168,7 +172,7 @@ func (q *Queries) SetOrgDisabledCheckTypes(ctx context.Context, arg SetOrgDisabl
const updateOrgPolicy = `-- name: UpdateOrgPolicy :one
UPDATE orgs SET require_totp = $2, require_sso = $3, api_token_max_days = $4, updated_at = now()
WHERE id = $1
-RETURNING id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count
+RETURNING id, slug, name, created_at, updated_at, require_totp, require_sso, api_token_max_days, disabled_check_types, suspended_at, suspended_reason, limit_monitors, limit_status_pages, limit_regions_per_monitor, limit_own_regions_count, limit_monitors_per_page
`
type UpdateOrgPolicyParams struct {
@@ -202,6 +206,7 @@ func (q *Queries) UpdateOrgPolicy(ctx context.Context, arg UpdateOrgPolicyParams
&i.LimitStatusPages,
&i.LimitRegionsPerMonitor,
&i.LimitOwnRegionsCount,
+ &i.LimitMonitorsPerPage,
)
return i, err
}
diff --git a/internal/store/querier.go b/internal/store/querier.go
index 08046f8..af1209d 100644
--- a/internal/store/querier.go
+++ b/internal/store/querier.go
@@ -56,6 +56,7 @@ type Querier interface {
CountOwnedOrgs(ctx context.Context, userID uuid.UUID) (int64, error)
CountOwners(ctx context.Context, orgID uuid.UUID) (int64, error)
CountRoleAssignments(ctx context.Context, roleID uuid.UUID) (int64, error)
+ CountStatusPageMonitors(ctx context.Context, pageID uuid.UUID) (int64, error)
CountStatusPages(ctx context.Context, orgID uuid.UUID) (int64, error)
CountSupportTicketsSince(ctx context.Context, arg CountSupportTicketsSinceParams) (int64, error)
CountUnusedRecoveryCodes(ctx context.Context, userID uuid.UUID) (int64, error)
diff --git a/internal/store/queries/limits.sql b/internal/store/queries/limits.sql
index 87669f9..13be9d4 100644
--- a/internal/store/queries/limits.sql
+++ b/internal/store/queries/limits.sql
@@ -9,9 +9,13 @@ SELECT count(*) FROM monitors WHERE org_id = $1;
-- name: CountStatusPages :one
SELECT count(*) FROM status_pages WHERE org_id = $1;
+-- name: CountStatusPageMonitors :one
+SELECT count(*) FROM status_page_monitors WHERE page_id = $1;
+
-- name: SetOrgLimits :one
UPDATE orgs SET limit_monitors = sqlc.narg(monitors), limit_status_pages = sqlc.narg(status_pages),
- limit_regions_per_monitor = sqlc.narg(regions_per_monitor), limit_own_regions_count = sqlc.narg(own_regions_count)
+ limit_regions_per_monitor = sqlc.narg(regions_per_monitor), limit_own_regions_count = sqlc.narg(own_regions_count),
+ limit_monitors_per_page = sqlc.narg(monitors_per_page)
WHERE id = sqlc.arg(id)
RETURNING id, slug;
@@ -25,6 +29,7 @@ RETURNING id, email;
-- keyset cursor.
SELECT o.id, o.slug, o.name, o.created_at, o.suspended_at, o.suspended_reason,
o.limit_monitors, o.limit_status_pages, o.limit_regions_per_monitor, o.limit_own_regions_count,
+ o.limit_monitors_per_page,
(SELECT count(*) FROM monitors m WHERE m.org_id = o.id)::integer AS monitors,
(SELECT count(*) FROM status_pages p WHERE p.org_id = o.id)::integer AS status_pages,
coalesce(ow.id, '00000000-0000-0000-0000-000000000000'::uuid)::uuid AS owner_id,
diff --git a/internal/web/admin_orgs.templ b/internal/web/admin_orgs.templ
index f038ea0..474a6bf 100644
--- a/internal/web/admin_orgs.templ
+++ b/internal/web/admin_orgs.templ
@@ -14,6 +14,7 @@ type LimitsView struct {
RegionsPerMonitor int
OwnRegionsCount bool
OrgsPerAccount int
+ MonitorsPerPage int
}
// OrgsView lists organizations for platform admins.
@@ -36,6 +37,7 @@ type OrgRow struct {
StatusPagesOverride string
RegionsOverride string
OwnRegionsOverride string
+ PerPageOverride string
Owner *ModeratedTarget
OwnerOrgs int
OwnerOrgLimit string
@@ -62,6 +64,7 @@ templ limitsSection(d LimitsView) {
@numberField(i18n.T(ctx, "limits.status_pages"), "status_pages", d.StatusPages, 0, 1000000, "")
@numberField(i18n.T(ctx, "limits.regions_per_monitor"), "regions_per_monitor", d.RegionsPerMonitor, 0, 1000, "")
@numberField(i18n.T(ctx, "limits.orgs_per_account"), "orgs_per_account", d.OrgsPerAccount, 0, 100000, "")
+ @numberField(i18n.T(ctx, "limits.monitors_per_page"), "monitors_per_page", d.MonitorsPerPage, 0, 200, "")
@checkbox(i18n.T(ctx, "limits.own_regions_count"), "own_regions_count", d.OwnRegionsCount)
{ i18n.T(ctx, "limits.own_regions_count_hint") }
@@ -149,6 +152,7 @@ templ orgsSection(v OrgsView) {
@overrideField(i18n.T(ctx, "limits.monitors"), "monitors", o.MonitorsOverride, v.Defaults.Monitors, 1000000)
@overrideField(i18n.T(ctx, "limits.status_pages"), "status_pages", o.StatusPagesOverride, v.Defaults.StatusPages, 1000000)
@overrideField(i18n.T(ctx, "limits.regions_per_monitor"), "regions_per_monitor", o.RegionsOverride, v.Defaults.RegionsPerMonitor, 1000)
+ @overrideField(i18n.T(ctx, "limits.monitors_per_page"), "monitors_per_page", o.PerPageOverride, v.Defaults.MonitorsPerPage, 200)
{ i18n.T(ctx, "limits.own_regions_count") }
@@ -207,6 +211,8 @@ templ usageSection(u UsageView) {
@usage(u.StatusPages, u.Limits.StatusPages)
{ i18n.T(ctx, "limits.regions_per_monitor") }
{ limitText(ctx, u.Limits.RegionsPerMonitor) }
+ { i18n.T(ctx, "limits.monitors_per_page") }
+ { limitText(ctx, u.Limits.MonitorsPerPage) }
if u.Limits.RegionsPerMonitor > 0 && !u.Limits.OwnRegionsCount {
{ i18n.T(ctx, "limits.own_regions_free") }
diff --git a/internal/web/admin_orgs_templ.go b/internal/web/admin_orgs_templ.go
index f5aab8f..2d84d64 100644
--- a/internal/web/admin_orgs_templ.go
+++ b/internal/web/admin_orgs_templ.go
@@ -23,6 +23,7 @@ type LimitsView struct {
RegionsPerMonitor int
OwnRegionsCount bool
OrgsPerAccount int
+ MonitorsPerPage int
}
// OrgsView lists organizations for platform admins.
@@ -45,6 +46,7 @@ type OrgRow struct {
StatusPagesOverride string
RegionsOverride string
OwnRegionsOverride string
+ PerPageOverride string
Owner *ModeratedTarget
OwnerOrgs int
OwnerOrgLimit string
@@ -92,7 +94,7 @@ func limitsSection(d LimitsView) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.intro"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 57, Col: 66}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 59, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -126,6 +128,10 @@ func limitsSection(d LimitsView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+ templ_7745c5c3_Err = numberField(i18n.T(ctx, "limits.monitors_per_page"), "monitors_per_page", d.MonitorsPerPage, 0, 200, "").Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
@@ -141,7 +147,7 @@ func limitsSection(d LimitsView) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_count_hint"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 67, Col: 89}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 70, Col: 89}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -154,7 +160,7 @@ func limitsSection(d LimitsView) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, 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/admin_orgs.templ`, Line: 68, Col: 129}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 71, Col: 129}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -194,7 +200,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(label)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 77, Col: 90}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 80, Col: 90}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -207,7 +213,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(name).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 80, Col: 14}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 83, Col: 14}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)
if templ_7745c5c3_Err != nil {
@@ -220,7 +226,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(max)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 84, Col: 26}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 87, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)
if templ_7745c5c3_Err != nil {
@@ -233,7 +239,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(value).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 85, Col: 16}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 88, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)
if templ_7745c5c3_Err != nil {
@@ -246,7 +252,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "limits.default", "Value", limitText(ctx, def))).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 86, Col: 76}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 89, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)
if templ_7745c5c3_Err != nil {
@@ -292,7 +298,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.intro"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 95, Col: 74}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 98, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -305,7 +311,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.Search).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 100, Col: 20}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 103, Col: 20}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)
if templ_7745c5c3_Err != nil {
@@ -318,7 +324,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "orgs.search")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 101, Col: 44}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 104, Col: 44}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14)
if templ_7745c5c3_Err != nil {
@@ -331,7 +337,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "orgs.search")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 102, Col: 43}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 105, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)
if templ_7745c5c3_Err != nil {
@@ -344,7 +350,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.search_button"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 105, Col: 142}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 108, Col: 142}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -362,7 +368,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.none"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 108, Col: 59}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 111, Col: 59}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -380,7 +386,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, 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/admin_orgs.templ`, Line: 114, Col: 72}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 117, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -393,7 +399,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, 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/admin_orgs.templ`, Line: 115, Col: 74}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 118, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -406,7 +412,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.monitors"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 116, Col: 73}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 119, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -419,7 +425,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.status_pages"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 117, Col: 77}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 120, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -432,7 +438,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, 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/admin_orgs.templ`, Line: 118, Col: 76}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 121, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
@@ -450,7 +456,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(o.Name)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 125, Col: 17}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 128, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -463,7 +469,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(o.Slug)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 126, Col: 66}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 129, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -489,7 +495,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(o.Owner.Name)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 131, Col: 48}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 134, Col: 48}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -532,7 +538,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(o.Created)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 139, Col: 72}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 142, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -545,7 +551,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.manage"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 144, Col: 96}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 147, Col: 96}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {
@@ -558,7 +564,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/admin/orgs/" + o.ID + "/limits").Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 146, Col: 61}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 149, Col: 61}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28)
if templ_7745c5c3_Err != nil {
@@ -571,7 +577,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.next()).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 146, Col: 102}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 149, Col: 102}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29)
if templ_7745c5c3_Err != nil {
@@ -584,7 +590,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.limits"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 147, Col: 113}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 150, Col: 113}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -610,6 +616,10 @@ func orgsSection(v OrgsView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+ templ_7745c5c3_Err = overrideField(i18n.T(ctx, "limits.monitors_per_page"), "monitors_per_page", o.PerPageOverride, v.Defaults.MonitorsPerPage, 200).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
@@ -617,7 +627,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_count"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 153, Col: 135}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 157, Col: 135}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
if templ_7745c5c3_Err != nil {
@@ -640,7 +650,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var32 string
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.default", "Value", i18n.T(ctx, "limits.own_"+strconv.FormatBool(v.Defaults.OwnRegionsCount))))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 155, Col: 187}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 159, Col: 187}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
if templ_7745c5c3_Err != nil {
@@ -663,7 +673,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_true"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 156, Col: 112}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 160, Col: 112}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
if templ_7745c5c3_Err != nil {
@@ -686,7 +696,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_false"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 157, Col: 115}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 161, Col: 115}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
if templ_7745c5c3_Err != nil {
@@ -699,7 +709,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var35 string
templ_7745c5c3_Var35, 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/admin_orgs.templ`, Line: 160, Col: 130}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 164, Col: 130}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
if templ_7745c5c3_Err != nil {
@@ -721,7 +731,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var36 string
templ_7745c5c3_Var36, 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/admin_orgs.templ`, Line: 164, Col: 84}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 168, Col: 84}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
if templ_7745c5c3_Err != nil {
@@ -739,7 +749,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/admin/users/" + o.Owner.ID + "/limits").Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 167, Col: 70}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 171, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var37)
if templ_7745c5c3_Err != nil {
@@ -752,7 +762,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.next()).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 167, Col: 111}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 171, Col: 111}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var38)
if templ_7745c5c3_Err != nil {
@@ -765,7 +775,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var39 string
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.target_owner"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 168, Col: 127}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 172, Col: 127}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
if templ_7745c5c3_Err != nil {
@@ -790,7 +800,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var40 string
templ_7745c5c3_Var40, 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/admin_orgs.templ`, Line: 171, Col: 132}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 175, Col: 132}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
if templ_7745c5c3_Err != nil {
@@ -892,7 +902,7 @@ func usage(used, max int) templ.Component {
var templ_7745c5c3_Var44 string
templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(used))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 191, Col: 83}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 195, Col: 83}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))
if templ_7745c5c3_Err != nil {
@@ -905,7 +915,7 @@ func usage(used, max int) templ.Component {
var templ_7745c5c3_Var45 string
templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(limitText(ctx, max))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 191, Col: 109}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 195, Col: 109}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
if templ_7745c5c3_Err != nil {
@@ -957,7 +967,7 @@ func usageSection(u UsageView) templ.Component {
var templ_7745c5c3_Var47 string
templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.monitors"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 204, Col: 39}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 208, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
if templ_7745c5c3_Err != nil {
@@ -978,7 +988,7 @@ func usageSection(u UsageView) templ.Component {
var templ_7745c5c3_Var48 string
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.status_pages"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 206, Col: 43}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 210, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
if templ_7745c5c3_Err != nil {
@@ -999,7 +1009,7 @@ func usageSection(u UsageView) templ.Component {
var templ_7745c5c3_Var49 string
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.regions_per_monitor"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 208, Col: 50}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 212, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
if templ_7745c5c3_Err != nil {
@@ -1012,36 +1022,62 @@ func usageSection(u UsageView) templ.Component {
var templ_7745c5c3_Var50 string
templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(limitText(ctx, u.Limits.RegionsPerMonitor))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 209, Col: 77}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 213, Col: 77}
}
_, 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, 81, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var51 string
+ templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.monitors_per_page"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 214, Col: 48}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var52 string
+ templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(limitText(ctx, u.Limits.MonitorsPerPage))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 215, Col: 75}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if u.Limits.RegionsPerMonitor > 0 && !u.Limits.OwnRegionsCount {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- var templ_7745c5c3_Var51 string
- templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_free"))
+ var templ_7745c5c3_Var53 string
+ templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_free"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 212, Col: 78}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 218, Col: 78}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51))
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/internal/web/statuspages.templ b/internal/web/statuspages.templ
index 8b6784c..ae6f416 100644
--- a/internal/web/statuspages.templ
+++ b/internal/web/statuspages.templ
@@ -118,6 +118,8 @@ type PageEditor struct {
SwitchOffAt string
// DomainChangesPerDay is how often the domain may be changed a day.
DomainChangesPerDay int
+ // MonitorLimit is how many monitors the page may show; 0 is any.
+ MonitorLimit int
RecordName string
RecordValue string
Suspended bool
@@ -273,6 +275,9 @@ templ StatusPageEditor(p Page, me Me, e PageEditor) {
if len(e.Monitors) == 0 {
{ i18n.T(ctx, "console.monitors.empty") }
} else {
+ if e.MonitorLimit > 0 {
+ { i18n.T(ctx, "pages.monitor_limit", "Max", e.MonitorLimit) }
+ }
{ i18n.T(ctx, "pages.monitors_all") }
{ i18n.T(ctx, "pages.monitors_none") }
diff --git a/internal/web/statuspages_templ.go b/internal/web/statuspages_templ.go
index 8f14964..9de1a61 100644
--- a/internal/web/statuspages_templ.go
+++ b/internal/web/statuspages_templ.go
@@ -346,13 +346,15 @@ type PageEditor struct {
SwitchOffAt string
// DomainChangesPerDay is how often the domain may be changed a day.
DomainChangesPerDay int
- RecordName string
- RecordValue string
- Suspended bool
- SuspendedReason string
- Groups []PageGroupRow
- HasOrgGroups bool
- Monitors []PageMonitorOption
+ // MonitorLimit is how many monitors the page may show; 0 is any.
+ MonitorLimit int
+ RecordName string
+ RecordValue string
+ Suspended bool
+ SuspendedReason string
+ Groups []PageGroupRow
+ HasOrgGroups bool
+ Monitors []PageMonitorOption
}
func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
@@ -391,7 +393,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 132, Col: 115}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 134, Col: 115}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -409,7 +411,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 135, Col: 43}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 137, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -423,7 +425,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 137, Col: 81}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 139, Col: 81}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -442,7 +444,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 142, Col: 46}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 144, Col: 46}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -460,7 +462,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(e.URL)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 145, Col: 35}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 147, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18)
if templ_7745c5c3_Err != nil {
@@ -473,7 +475,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 145, Col: 130}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 147, Col: 130}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -491,7 +493,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL("/api/v1/org/statuspages/" + e.ID + "/export")).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 147, Col: 74}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 149, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)
if templ_7745c5c3_Err != nil {
@@ -504,7 +506,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.export"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 147, Col: 140}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 149, Col: 140}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -522,7 +524,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 151, Col: 88}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 153, Col: 88}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
@@ -548,7 +550,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 156, Col: 47}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 158, Col: 47}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)
if templ_7745c5c3_Err != nil {
@@ -561,7 +563,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, 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: 156, Col: 102}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 158, Col: 102}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24)
if templ_7745c5c3_Err != nil {
@@ -590,7 +592,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 161, Col: 121}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 163, Col: 121}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -623,7 +625,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 166, Col: 86}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 168, Col: 86}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -636,7 +638,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 167, Col: 111}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 169, Col: 111}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {
@@ -661,7 +663,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.css"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 171, Col: 113}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 173, Col: 113}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
if templ_7745c5c3_Err != nil {
@@ -674,7 +676,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(e.CSS)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 172, Col: 160}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 174, Col: 160}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
if templ_7745c5c3_Err != nil {
@@ -695,7 +697,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 178, Col: 45}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 180, Col: 45}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var30)
if templ_7745c5c3_Err != nil {
@@ -708,7 +710,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 179, Col: 55}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 181, Col: 55}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31)
if templ_7745c5c3_Err != nil {
@@ -721,7 +723,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 182, Col: 34}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 184, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
if templ_7745c5c3_Err != nil {
@@ -743,7 +745,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID + "/groups/import").Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 191, Col: 65}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 193, Col: 65}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33)
if templ_7745c5c3_Err != nil {
@@ -756,7 +758,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "pages.groups_import_confirm")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 192, Col: 65}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 194, Col: 65}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34)
if templ_7745c5c3_Err != nil {
@@ -769,7 +771,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 193, Col: 54}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 195, Col: 54}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35)
if templ_7745c5c3_Err != nil {
@@ -782,7 +784,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 196, Col: 44}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 198, Col: 44}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
if templ_7745c5c3_Err != nil {
@@ -800,7 +802,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 199, Col: 75}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 201, Col: 75}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
if templ_7745c5c3_Err != nil {
@@ -823,7 +825,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(indent(g.Depth))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 203, Col: 48}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 205, Col: 48}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
if templ_7745c5c3_Err != nil {
@@ -836,7 +838,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var39 string
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: 206, Col: 25}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 208, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
if templ_7745c5c3_Err != nil {
@@ -849,7 +851,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var40 string
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: 207, Col: 72}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 209, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
if templ_7745c5c3_Err != nil {
@@ -862,7 +864,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var41 string
templ_7745c5c3_Var41, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID + "/groups/" + g.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 209, Col: 73}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 211, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var41)
if templ_7745c5c3_Err != nil {
@@ -875,7 +877,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var42 string
templ_7745c5c3_Var42, 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: 209, Col: 128}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 211, Col: 128}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var42)
if templ_7745c5c3_Err != nil {
@@ -900,7 +902,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var43 string
templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.parent"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 213, Col: 123}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 215, Col: 123}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
if templ_7745c5c3_Err != nil {
@@ -953,7 +955,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var46 string
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.none"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 215, Col: 58}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 217, Col: 58}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
if templ_7745c5c3_Err != nil {
@@ -972,7 +974,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var47 string
templ_7745c5c3_Var47, templ_7745c5c3_Err = templruntime.NewAttributeExpression(opt.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 218, Col: 37}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 220, Col: 37}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var47)
if templ_7745c5c3_Err != nil {
@@ -995,7 +997,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var48 string
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(opt.Label)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 218, Col: 86}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 220, Col: 86}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
if templ_7745c5c3_Err != nil {
@@ -1014,7 +1016,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var49 string
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.group_position"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 224, Col: 130}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 226, Col: 130}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
if templ_7745c5c3_Err != nil {
@@ -1035,7 +1037,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var50 string
templ_7745c5c3_Var50, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(g.Position)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 225, Col: 93}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 227, Col: 93}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var50)
if templ_7745c5c3_Err != nil {
@@ -1088,7 +1090,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var53 string
templ_7745c5c3_Var53, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID + "/groups/" + g.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 231, Col: 73}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 233, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var53)
if templ_7745c5c3_Err != nil {
@@ -1101,7 +1103,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var54 string
templ_7745c5c3_Var54, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "groups.delete_confirm")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 232, Col: 64}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 234, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var54)
if templ_7745c5c3_Err != nil {
@@ -1114,7 +1116,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 233, Col: 47}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 235, Col: 47}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var55)
if templ_7745c5c3_Err != nil {
@@ -1127,7 +1129,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
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: 235, Col: 43}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 237, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56))
if templ_7745c5c3_Err != nil {
@@ -1150,7 +1152,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var57 string
templ_7745c5c3_Var57, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID + "/groups").Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 243, Col: 60}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 245, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var57)
if templ_7745c5c3_Err != nil {
@@ -1163,7 +1165,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var58 string
templ_7745c5c3_Var58, 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: 243, Col: 97}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 245, Col: 97}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var58)
if templ_7745c5c3_Err != nil {
@@ -1184,7 +1186,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var59 string
templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.create"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 247, Col: 82}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 249, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59))
if templ_7745c5c3_Err != nil {
@@ -1205,7 +1207,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var60 string
templ_7745c5c3_Var60, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "sso.field.name")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 248, Col: 95}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 250, Col: 95}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var60)
if templ_7745c5c3_Err != nil {
@@ -1250,7 +1252,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var63 string
templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.parent"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 251, Col: 82}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 253, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))
if templ_7745c5c3_Err != nil {
@@ -1303,7 +1305,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var66 string
templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.none"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 253, Col: 54}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 255, Col: 54}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66))
if templ_7745c5c3_Err != nil {
@@ -1321,7 +1323,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var67 string
templ_7745c5c3_Var67, templ_7745c5c3_Err = templruntime.NewAttributeExpression(opt.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 255, Col: 32}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 257, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var67)
if templ_7745c5c3_Err != nil {
@@ -1334,7 +1336,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var68 string
templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(opt.Label)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 255, Col: 46}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 257, Col: 46}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68))
if templ_7745c5c3_Err != nil {
@@ -1352,7 +1354,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var69 string
templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.group_position"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 260, Col: 89}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 262, Col: 89}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69))
if templ_7745c5c3_Err != nil {
@@ -1373,7 +1375,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var70 string
templ_7745c5c3_Var70, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(len(e.Groups))).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 261, Col: 92}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 263, Col: 92}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var70)
if templ_7745c5c3_Err != nil {
@@ -1434,7 +1436,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var73 string
templ_7745c5c3_Var73, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID + "/monitors").Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 271, Col: 62}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 273, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var73)
if templ_7745c5c3_Err != nil {
@@ -1447,7 +1449,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var74 string
templ_7745c5c3_Var74, 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: 271, Col: 138}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 273, Col: 138}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var74)
if templ_7745c5c3_Err != nil {
@@ -1469,7 +1471,7 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
var templ_7745c5c3_Var75 string
templ_7745c5c3_Var75, 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: 274, Col: 81}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 276, Col: 81}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))
if templ_7745c5c3_Err != nil {
@@ -1480,218 +1482,237 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
return templ_7745c5c3_Err
}
} else {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
+ if e.MonitorLimit > 0 {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "")
+ 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, "pages.monitor_limit", "Max", e.MonitorLimit))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 279, Col: 102}
+ }
+ _, 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, 123, "
")
+ 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, "pages.monitors_all"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 277, Col: 160}
- }
- _, 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, 123, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var77 string
- templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.monitors_none"))
+ templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.monitors_all"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 278, Col: 162}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 282, Col: 160}
}
_, 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, 124, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- }
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- for _, m := range e.Monitors {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var78 string
- templ_7745c5c3_Var78, templ_7745c5c3_Err = templruntime.NewAttributeExpression(m.Name).Resolve(ctx)
+ templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.monitors_none"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 284, Col: 115}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 283, Col: 162}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var78)
+ _, 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, 129, "\"> ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ for _, m := range e.Monitors {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "\"> ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var80 string
+ templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(m.Name)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 291, Col: 24}
+ }
+ _, 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, 132, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if m.MonitorGroupPath != "" {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- var templ_7745c5c3_Var80 string
- templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(m.MonitorGroupPath)
+ var templ_7745c5c3_Var81 string
+ templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(m.MonitorGroupPath)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 288, Col: 74}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 293, Col: 74}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80))
+ _, 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, 132, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "\"> ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "\" class=\"w-1/2 border border-rule bg-transparent px-2 py-1 text-xs outline-none focus:border-ink\">")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var84 string
+ templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.no_group"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 300, Col: 59}
+ }
+ _, 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, 138, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, opt := range e.Groups {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "\"")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ if opt.ID == m.GroupID {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, " selected")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, ">")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var86 string
+ templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(opt.Label)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 302, 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, 143, " ")
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, 145, "\" placeholder=\"")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var88 string
+ templ_7745c5c3_Var88, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "pages.label")).Resolve(ctx)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 305, Col: 94}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var88)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "\" class=\"w-1/2 border border-rule bg-transparent px-2 py-1 text-xs outline-none focus:border-ink\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -1699,7 +1720,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, 146, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -1707,46 +1728,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, 147, "")
- 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_intro"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 310, Col: 75}
- }
- _, 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, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if e.Domain != "" {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if e.DomainVerified {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "
● ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "
● ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
switch e.VerifiedBy {
case "cname":
- var templ_7745c5c3_Var91 string
- templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_verified_by_cname"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 323, Col: 58}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- case "txt":
var templ_7745c5c3_Var92 string
- templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_verified_by_txt"))
+ templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_verified_by_cname"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 325, Col: 56}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 328, Col: 58}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- default:
+ case "txt":
var templ_7745c5c3_Var93 string
- templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_verified"))
+ templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_verified_by_txt"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 327, Col: 54}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 330, Col: 56}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- }
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- if e.MissingSince != "" {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
+ default:
var templ_7745c5c3_Var94 string
- templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_missing", "Since", e.MissingSince, "Date", e.SwitchOffAt))
+ templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_verified"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 331, Col: 146}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 332, Col: 54}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- } else if e.VerifiedBy != "" {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "
")
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ if e.MissingSince != "" {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "
")
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, "pages.domain_keep"))
+ templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_missing", "Since", e.MissingSince, "Date", e.SwitchOffAt))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 333, Col: 73}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 336, Col: 146}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95))
if templ_7745c5c3_Err != nil {
@@ -1848,22 +1851,40 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+ } else if e.VerifiedBy != "" {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "
")
+ 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, "pages.domain_keep"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 338, Col: 73}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var96))
+ 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
+ }
}
} else if e.CNAMEValue != "" && !e.OwnServers {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "
")
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, "pages.domain_cname_step"))
+ var templ_7745c5c3_Var97 string
+ templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_cname_step"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 336, Col: 51}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 341, Col: 51}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var96))
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var97))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -1875,33 +1896,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, 161, "
")
- 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, "pages.domain_alt_summary"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 340, Col: 116}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var97))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "")
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, "pages.domain_alt", "Target", e.CNAMEValue))
+ templ_7745c5c3_Var98, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_alt_summary"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 341, Col: 95}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 345, Col: 116}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var98))
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, 164, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var99 string
+ templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_alt", "Target", e.CNAMEValue))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 346, Col: 95}
+ }
+ _, 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, 165, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -1913,25 +1934,25 @@ 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, 164, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
- 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_Var99 string
- templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_verify"))
+ var templ_7745c5c3_Var100 string
+ templ_7745c5c3_Var100, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_verify"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 346, Col: 52}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 351, Col: 52}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99))
+ _, 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, 166, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -1944,32 +1965,14 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
return templ_7745c5c3_Err
}
if e.OwnServers {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var100 string
- templ_7745c5c3_Var100, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_cname_own"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 350, Col: 56}
- }
- _, 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, 168, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- } else {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "
")
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, "pages.domain_step_cname_unknown"))
+ templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_cname_own"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 352, Col: 60}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 355, Col: 56}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101))
if templ_7745c5c3_Err != nil {
@@ -1979,44 +1982,62 @@ func StatusPageEditor(p Page, me Me, e PageEditor) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+ } else {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var102 string
+ templ_7745c5c3_Var102, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_cname_unknown"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 357, Col: 60}
+ }
+ _, 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, 172, "
")
+ 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, 173, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- var templ_7745c5c3_Var102 string
- templ_7745c5c3_Var102, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_apex"))
+ var templ_7745c5c3_Var103 string
+ templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_apex"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 354, Col: 72}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 359, Col: 72}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var102))
+ _, 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, 172, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- var templ_7745c5c3_Var103 string
- templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_tls", "Count", e.DomainChangesPerDay))
+ var templ_7745c5c3_Var104 string
+ templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_tls", "Count", e.DomainChangesPerDay))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 356, Col: 107}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 361, Col: 107}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103))
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -2047,59 +2068,59 @@ func dnsRecordList(kind, name, value string) templ.Component {
}
ctx = templ.InitializeContext(ctx)
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var105 string
- templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(kind)
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 367, Col: 31}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var105))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var106 string
- templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(name)
+ templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(kind)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 368, Col: 30}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 372, Col: 31}
}
_, 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, 178, " ")
- 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, "pages.value"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 369, Col: 53}
- }
- _, 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, 179, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- var templ_7745c5c3_Var108 string
- templ_7745c5c3_Var108, templ_7745c5c3_Err = templ.JoinStringErrs(value)
+ var templ_7745c5c3_Var107 string
+ templ_7745c5c3_Var107, templ_7745c5c3_Err = templ.JoinStringErrs(name)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 370, Col: 31}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 373, Col: 30}
+ }
+ _, 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, 180, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var108 string
+ templ_7745c5c3_Var108, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.value"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 374, Col: 53}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var108))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var109 string
+ templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(value)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 375, Col: 31}
+ }
+ _, 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, 182, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -2124,46 +2145,46 @@ func verifyButton(pageID, label string) templ.Component {
}
ctx = templ.InitializeContext(ctx)
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "\" data-ok=\"")
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, label))
+ templ_7745c5c3_Var112, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "pages.domain_verified")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 375, Col: 247}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 380, Col: 131}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112))
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var112)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, " ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "\" data-reload class=\"mt-3 border border-ink px-3 py-1.5 text-sm hover:bg-ink hover:text-paper\">")
+ 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, label))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 380, Col: 247}
+ }
+ _, 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, 186, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}