From 3a7bed5a3e30ad3510e5f7fc13ca0cca0acce8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Sun, 29 Nov 2026 12:17:08 +0100 Subject: [PATCH] fix(monitors): stop selecting more regions than the limit allows The monitor form let users tick any number of regions and only the save failed with the region limit. The form now knows the organization's regions-per-monitor limit: it says how many regions a monitor may use, counts the ticked ones, and once the limit is reached locks the other regions that count towards it, in the list and on the map, until one is unticked. Own regions stay free unless they count. The server still enforces the limit. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3 --- internal/api/console.go | 2 + internal/api/limits_test.go | 16 + internal/i18n/locales/de.json | 2 + internal/i18n/locales/en.json | 2 + internal/web/assets/app.css | 7 + internal/web/assets/app.js | 23 + internal/web/monitors.templ | 27 +- internal/web/monitors_templ.go | 2451 ++++++++++++------------ internal/web/testdata/regionlimit.html | 40 + 9 files changed, 1383 insertions(+), 1187 deletions(-) create mode 100644 internal/web/testdata/regionlimit.html diff --git a/internal/api/console.go b/internal/api/console.go index 4a9c83d..4ba0534 100644 --- a/internal/api/console.go +++ b/internal/api/console.go @@ -941,6 +941,8 @@ func (s *Server) monitorEditor(c *gin.Context, p *principal, page web.Page, me w checked := slices.Contains(assigned, r.ID) || (idParam == "" && i == 0) f.Regions = append(f.Regions, web.RegionOption{ID: r.ID.String(), Name: r.Name, Own: r.OrgID != nil, Checked: checked, Live: live, Lat: r.Latitude, Lon: r.Longitude}) } + limits := s.orgLimits(ctx, p.Org) + f.RegionLimit, f.OwnRegionsCount = limits.RegionsPerMonitor, limits.OwnRegionsCount t, err := s.loadGroupTree(ctx, p.scope()) if err != nil { return nil, err diff --git a/internal/api/limits_test.go b/internal/api/limits_test.go index 1f3e7d2..b8692f6 100644 --- a/internal/api/limits_test.go +++ b/internal/api/limits_test.go @@ -52,6 +52,22 @@ func TestLimits(t *testing.T) { }) } + // The monitor form locks regions beyond the limit; own ones do not count. + _, _, html := owner.page("/monitors/new") + if !strings.Contains(html, `data-region-limit="1"`) { + t.Error("monitor form lacks the region limit") + } + for id, counted := range map[string]bool{p1: true, o1: false} { + i := strings.Index(html, `value="`+id+`"`) + if i < 0 { + t.Fatalf("monitor form lacks region %s", id) + } + tag := html[i : i+strings.Index(html[i:], ">")] + if strings.Contains(tag, "data-counted") != counted { + t.Errorf("region %s counted = %v, want %v", id, !counted, counted) + } + } + // Monitors, passive ones included. if st, body := owner.do("POST", "/api/v1/org/monitors", map[string]any{"name": "hb", "type": "heartbeat", "interval_seconds": 3600}); st != http.StatusCreated { t.Fatalf("heartbeat = %d %v", st, body) diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index 0953d59..b1ca4bf 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -1130,6 +1130,7 @@ "monitors.ping_intro": "Rufe diese URL am Ende jedes erfolgreichen Laufs auf, per GET, HEAD oder POST. Mit angehängtem /fail meldest du einen Fehler; ein POST-Body oder ?msg= wird als Meldung gespeichert.", "monitors.ping_secret": "Halte die URL geheim: Wer sie kennt, kann den Job als gesund melden. Nur Mitglieder, die diesen Monitor bearbeiten dürfen, sehen sie.", "monitors.ping_url": "Ping-URL", + "monitors.platform_regions_limit": "Bis zu {{.Max}} Plattform-Regionen pro Monitor; eigene Regionen zählen nicht.", "monitors.prom_empty_ok": "Keine Daten sind in Ordnung", "monitors.prom_hint": "Ziel ist die Basis-URL von Prometheus, z. B. https://prometheus.example.com. Thanos, Mimir und VictoriaMetrics funktionieren ebenso. Für geschützte Server Authorization-Header nutzen.", "monitors.prom_mode": "Serien", @@ -1146,6 +1147,7 @@ "monitors.recent": "Letzte Checks", "monitors.regions": "Regionen", "monitors.regions_hint": "Geprüft von einem zufälligen Checker jeder gewählten Region. Deine eigenen Regionen stehen oben.", + "monitors.regions_limit": "Bis zu {{.Max}} Regionen pro Monitor.", "monitors.results_title": "Prüfergebnisse", "monitors.search": "Nach Name oder Ziel suchen", "monitors.secret_unchanged": "unverändert", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index e3c256d..6917c22 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -1130,6 +1130,7 @@ "monitors.ping_intro": "Call this URL at the end of every successful run, with GET, HEAD or POST. Append /fail to report a failure; a POST body or ?msg= is stored as the message.", "monitors.ping_secret": "Keep the URL secret: anyone who knows it can report the job as healthy. Only members who may edit this monitor see it.", "monitors.ping_url": "Ping URL", + "monitors.platform_regions_limit": "Up to {{.Max}} platform regions per monitor; your own regions do not count.", "monitors.prom_empty_ok": "No data is fine", "monitors.prom_hint": "Target is the Prometheus base URL, e.g. https://prometheus.example.com. Thanos, Mimir and VictoriaMetrics work as well. Use Authorization headers for protected servers.", "monitors.prom_mode": "Series", @@ -1146,6 +1147,7 @@ "monitors.recent": "Recent checks", "monitors.regions": "Regions", "monitors.regions_hint": "Checked from a random checker in each selected region. Your own regions are listed first.", + "monitors.regions_limit": "Up to {{.Max}} regions per monitor.", "monitors.results_title": "Check results", "monitors.search": "Search by name or target", "monitors.secret_unchanged": "unchanged", diff --git a/internal/web/assets/app.css b/internal/web/assets/app.css index 40c5b26..2ba0606 100644 --- a/internal/web/assets/app.css +++ b/internal/web/assets/app.css @@ -180,6 +180,13 @@ .is-flipped > .region-pin { padding: 6px 8px 6px 11px; } .is-compact > .region-pin { padding: 6px 8px; } } +/* Regions locked by the monitor's region limit. */ +label.is-locked { opacity: 0.5; cursor: not-allowed; } +/* Opaque, so stacked pins do not show through each other. */ +.region-pin.is-disabled { color: var(--color-muted); cursor: not-allowed; box-shadow: none; } +.region-pin.is-disabled .region-pin-dot { background: var(--color-unknown); } +.is-hover > .region-pin.is-disabled, +.region-pin.is-disabled:hover { transform: none; } .region-pin:focus-visible { outline: 2px solid var(--color-maintenance); outline-offset: 2px; } .region-pick { width: 14px; diff --git a/internal/web/assets/app.js b/internal/web/assets/app.js index 51a8081..1156d2a 100644 --- a/internal/web/assets/app.js +++ b/internal/web/assets/app.js @@ -726,8 +726,12 @@ for (const el of document.querySelectorAll("input[data-tz-default]")) { pin.classList.toggle("is-checked", item.checked); row.classList.toggle("is-checked", item.checked); pin.setAttribute("aria-pressed", String(item.checked)); + // Locked once the monitor uses as many regions as it may. + pin.classList.toggle("is-disabled", item.disabled); + pin.setAttribute("aria-disabled", String(item.disabled)); }; paint(); + item.closest("[data-region-limit]")?.addEventListener("regionlimit", paint); item.addEventListener("change", () => { paint(); // A region ticked in the list comes into view on the map. @@ -802,5 +806,24 @@ for (const el of document.querySelectorAll("input[data-tz-default]")) { pick.setLngLat(point); }); }; + // A monitor may use only so many counted regions: once they are all + // ticked, the other counted ones are locked until one is unticked. The + // server enforces the limit either way. + for (const list of document.querySelectorAll("[data-region-limit]")) { + const limit = Number(list.dataset.regionLimit); + const counted = [...list.querySelectorAll("input[data-counted]")]; + const count = list.closest("fieldset")?.querySelector("[data-region-count]"); + const update = () => { + const n = counted.filter((i) => i.checked).length; + for (const i of counted) { + i.disabled = !i.checked && n >= limit; + i.closest("label")?.classList.toggle("is-locked", i.disabled); + } + if (count) count.textContent = `(${n}/${limit})`; + list.dispatchEvent(new Event("regionlimit")); + }; + list.addEventListener("change", update); + update(); + } for (const box of document.querySelectorAll("[data-region-map]")) initRegionMap(box); })(); diff --git a/internal/web/monitors.templ b/internal/web/monitors.templ index 43167ec..7198a93 100644 --- a/internal/web/monitors.templ +++ b/internal/web/monitors.templ @@ -726,6 +726,9 @@ type RegionOption struct { Lat, Lon *float64 } +// Counted reports whether r counts towards the form's region limit. +func (f MonitorForm) Counted(r RegionOption) bool { return !r.Own || f.OwnRegionsCount } + // RegionsMapped reports whether any region of the form has a location. func (f MonitorForm) RegionsMapped() bool { for _, r := range f.Regions { @@ -753,6 +756,10 @@ type MonitorForm struct { TopLevel bool Regions []RegionOption MinInterval int + // RegionLimit caps the counted regions a monitor uses; 0 is unlimited. + // Own regions count only with OwnRegionsCount. + RegionLimit int + OwnRegionsCount bool // Type-specific settings. Method string ExpectStatus string @@ -1132,10 +1139,25 @@ templ MonitorEditor(p Page, me Me, f MonitorForm) {
{ i18n.T(ctx, "monitors.regions") }

{ i18n.T(ctx, "monitors.regions_hint") }

+ if f.RegionLimit > 0 { +

+ if f.OwnRegionsCount { + { i18n.T(ctx, "monitors.regions_limit", "Max", f.RegionLimit) } + } else { + { i18n.T(ctx, "monitors.platform_regions_limit", "Max", f.RegionLimit) } + } + +

+ } if f.RegionsMapped() { @regionMap("select", "#monitor-regions") } -
+
0 { + data-region-limit={ strconv.Itoa(f.RegionLimit) } + } + > for _, r := range f.Regions {
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 475, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5716,51 +5795,51 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { return templ_7745c5c3_Err } if f.ID != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 467, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 479, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 471, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 480, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5810,7 +5889,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var277 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var280 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -5826,7 +5905,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 472, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 481, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5835,12 +5914,12 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } if len(v.Channels) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 473, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 482, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, ch := range v.Channels { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 474, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 483, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5855,149 +5934,149 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 475, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 484, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var278 string - templ_7745c5c3_Var278, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Name) + var templ_7745c5c3_Var281 string + templ_7745c5c3_Var281, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1217, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1242, Col: 22} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var278)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var281)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 476, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 485, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var279 string - templ_7745c5c3_Var279, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.type_"+ch.Type)) + var templ_7745c5c3_Var282 string + templ_7745c5c3_Var282, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.type_"+ch.Type)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1218, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1243, Col: 71} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var279)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var282)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 477, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 486, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var280 string - templ_7745c5c3_Var280, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Target) + var templ_7745c5c3_Var283 string + templ_7745c5c3_Var283, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Target) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1219, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1244, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var280)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var283)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 478, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 487, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 479, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 491, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 486, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 495, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 487, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 496, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 488, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 497, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 489, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 498, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6005,7 +6084,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 490, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 499, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6013,7 +6092,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 491, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 500, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6029,46 +6108,46 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 492, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 504, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6077,7 +6156,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } if v.EmailAvailable { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 496, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 505, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6085,7 +6164,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 497, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 506, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6093,79 +6172,79 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 498, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6173,30 +6252,30 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 507, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 516, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 508, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var294 string - templ_7745c5c3_Var294, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "error.email_not_configured")) + var templ_7745c5c3_Var297 string + templ_7745c5c3_Var297, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "error.email_not_configured")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1271, Col: 79} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1296, Col: 79} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var294)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var297)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 509, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 510, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 519, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6204,20 +6283,20 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 511, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var295 string - templ_7745c5c3_Var295, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.service_intro")) + var templ_7745c5c3_Var298 string + templ_7745c5c3_Var298, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.service_intro")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1276, Col: 89} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1301, Col: 89} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var295)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var298)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 512, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6225,81 +6304,81 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 513, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6307,118 +6386,118 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 522, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 538, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, pr := range v.Providers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 530, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 543, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if pr.Help != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 535, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var304 string - templ_7745c5c3_Var304, templ_7745c5c3_Err = templ.JoinStringErrs(pr.Help) + var templ_7745c5c3_Var307 string + templ_7745c5c3_Var307, templ_7745c5c3_Err = templ.JoinStringErrs(pr.Help) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1308, Col: 54} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1333, Col: 54} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var304)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var307)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 536, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6429,7 +6508,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 537, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 546, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6438,14 +6517,14 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 538, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 547, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var277), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var280), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6489,208 +6568,208 @@ func providerField(f ProviderField) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 539, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 572, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6715,85 +6794,85 @@ func groupSelect(name string, groups []GroupOption, selected string, allowNone b } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 564, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 582, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6836,7 +6915,7 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var322 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var325 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -6848,20 +6927,20 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 574, "

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

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var323 string - templ_7745c5c3_Var323, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.title")) + var templ_7745c5c3_Var326 string + templ_7745c5c3_Var326, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1404, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1429, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var323)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var326)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 575, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6870,69 +6949,69 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { return templ_7745c5c3_Err } if len(v.Groups) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 576, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 592, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 601, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 593, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 602, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7040,7 +7119,7 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 594, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 603, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7052,20 +7131,20 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 595, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 606, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7081,14 +7160,14 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 598, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 607, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var322), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var325), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7120,7 +7199,7 @@ func pingSection(url string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 599, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 608, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7128,55 +7207,55 @@ func pingSection(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 600, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var334 string - templ_7745c5c3_Var334, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_intro")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1459, Col: 83} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var334)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 601, "

")
-		if templ_7745c5c3_Err != nil {
-			return templ_7745c5c3_Err
-		}
-		var templ_7745c5c3_Var335 string
-		templ_7745c5c3_Var335, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 " + url + "\n")
-		if templ_7745c5c3_Err != nil {
-			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1460, Col: 137}
-		}
-		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var335))
-		if templ_7745c5c3_Err != nil {
-			return templ_7745c5c3_Err
-		}
-		var templ_7745c5c3_Var336 string
-		templ_7745c5c3_Var336, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 --data-raw \"$output\" " + url + "/fail")
-		if templ_7745c5c3_Err != nil {
-			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1460, Col: 208}
-		}
-		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var336))
-		if templ_7745c5c3_Err != nil {
-			return templ_7745c5c3_Err
-		}
-		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 602, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var337 string - templ_7745c5c3_Var337, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_secret")) + templ_7745c5c3_Var337, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_intro")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1461, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1484, Col: 83} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var337)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 603, "

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

")
+		if templ_7745c5c3_Err != nil {
+			return templ_7745c5c3_Err
+		}
+		var templ_7745c5c3_Var338 string
+		templ_7745c5c3_Var338, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 " + url + "\n")
+		if templ_7745c5c3_Err != nil {
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1485, Col: 137}
+		}
+		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var338))
+		if templ_7745c5c3_Err != nil {
+			return templ_7745c5c3_Err
+		}
+		var templ_7745c5c3_Var339 string
+		templ_7745c5c3_Var339, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 --data-raw \"$output\" " + url + "/fail")
+		if templ_7745c5c3_Err != nil {
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1485, Col: 208}
+		}
+		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var339))
+		if templ_7745c5c3_Err != nil {
+			return templ_7745c5c3_Err
+		}
+		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 611, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var340 string + templ_7745c5c3_Var340, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_secret")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1486, Col: 84} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var340)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 612, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7222,20 +7301,20 @@ func dbFields(typ string, d DBForm) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 604, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var339 string - templ_7745c5c3_Var339, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.db_hint")) + var templ_7745c5c3_Var342 string + templ_7745c5c3_Var342, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.db_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1487, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1512, Col: 69} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var339)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var342)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 605, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7263,33 +7342,33 @@ func dbFields(typ string, d DBForm) templ.Component { return templ_7745c5c3_Err } if typ != "redis" && typ != "mongodb" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 606, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7321,56 +7400,56 @@ func secretField(label, name string, set bool) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 609, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7396,66 +7475,66 @@ func tlsField(value string, modes ...string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 615, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7480,20 +7559,20 @@ func brokerFields(typ string, b BrokerForm) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 623, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var351 string - templ_7745c5c3_Var351, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.broker_hint_"+typ)) + var templ_7745c5c3_Var354 string + templ_7745c5c3_Var354, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.broker_hint_"+typ)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1535, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1560, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var351)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var354)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 624, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7520,66 +7599,66 @@ func brokerFields(typ string, b BrokerForm) templ.Component { return templ_7745c5c3_Err } case "kafka": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 625, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7642,7 +7721,7 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var356 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var359 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -7654,45 +7733,45 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 633, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var357 string - templ_7745c5c3_Var357, templ_7745c5c3_Err = templ.JoinStringErrs("← " + i18n.T(ctx, "incidents.all")) + var templ_7745c5c3_Var360 string + templ_7745c5c3_Var360, templ_7745c5c3_Err = templ.JoinStringErrs("← " + i18n.T(ctx, "incidents.all")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1582, Col: 120} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1607, Col: 120} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var357)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var360)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 634, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.Row.Title != "" { - var templ_7745c5c3_Var358 string - templ_7745c5c3_Var358, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Title) + var templ_7745c5c3_Var361 string + templ_7745c5c3_Var361, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1585, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1610, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var358)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var361)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - var templ_7745c5c3_Var359 string - templ_7745c5c3_Var359, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var362 string + templ_7745c5c3_Var362, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1587, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1612, Col: 19} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var359)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var362)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 635, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 644, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7700,46 +7779,46 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 636, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 646, "\" class=\"hover:underline\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var361 string - templ_7745c5c3_Var361, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var364 string + templ_7745c5c3_Var364, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1592, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1617, Col: 100} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var361)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var364)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 638, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 647, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var362 string - templ_7745c5c3_Var362, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Started + " · " + v.Row.Duration) + var templ_7745c5c3_Var365 string + templ_7745c5c3_Var365, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Started + " · " + v.Row.Duration) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1593, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1618, Col: 87} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var362)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var365)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 639, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 648, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7747,18 +7826,18 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 640, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 649, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, e := range v.Timeline { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 641, "
    1. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 650, "
    2. ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } switch e.Kind { case "update": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 642, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7766,107 +7845,107 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 643, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 652, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var363 string - templ_7745c5c3_Var363, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var366 string + templ_7745c5c3_Var366, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1605, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1630, Col: 51} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var363)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var366)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 644, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 653, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.Author != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 645, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 654, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var364 string - templ_7745c5c3_Var364, templ_7745c5c3_Err = templ.JoinStringErrs(e.Author) + var templ_7745c5c3_Var367 string + templ_7745c5c3_Var367, templ_7745c5c3_Err = templ.JoinStringErrs(e.Author) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1607, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1632, Col: 46} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var364)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var367)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 646, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 655, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if !e.Public { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 647, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var365 string - templ_7745c5c3_Var365, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.internal")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1610, Col: 94} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var365)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 648, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 649, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 657, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 653, "

      ") + if v.CanWrite { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 658, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 662, "

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7874,103 +7953,103 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 654, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 663, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } case "resolved": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 655, "

      ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var369 string - templ_7745c5c3_Var369, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.recovered")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1620, Col: 85} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var369)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 656, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var370 string - templ_7745c5c3_Var370, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1620, Col: 136} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var370)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 657, "

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

      ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var371 string - templ_7745c5c3_Var371, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.began")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1622, Col: 83} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var371)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 659, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 664, "

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var372 string - templ_7745c5c3_Var372, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + templ_7745c5c3_Var372, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.recovered")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1622, Col: 134} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1645, Col: 85} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var372)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 660, "

      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 665, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var373 string + templ_7745c5c3_Var373, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1645, Col: 136} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var373)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 666, "

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

      ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var374 string + templ_7745c5c3_Var374, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.began")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1647, Col: 83} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var374)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 668, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var375 string + templ_7745c5c3_Var375, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1647, Col: 134} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var375)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 669, "

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Row.Cause) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 661, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var373 string - templ_7745c5c3_Var373, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(v.Row.Cause, " · ")) + var templ_7745c5c3_Var376 string + templ_7745c5c3_Var376, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(v.Row.Cause, " · ")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1624, Col: 90} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1649, Col: 90} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var373)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var376)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 662, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 663, "
    3. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 672, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 664, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 673, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 665, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 693, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 702, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var356), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var359), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8268,7 +8347,7 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var387 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var390 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -8284,7 +8363,7 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 694, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 703, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8292,12 +8371,12 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 695, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 704, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range IncidentStatuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 696, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 705, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8305,12 +8384,12 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 697, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 706, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 698, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 707, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8319,139 +8398,139 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan return templ_7745c5c3_Err } if len(statuses) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 699, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var388 string - templ_7745c5c3_Var388, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident_statuses.none")) + var templ_7745c5c3_Var391 string + templ_7745c5c3_Var391, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident_statuses.none")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1686, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1711, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var388)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var391)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 700, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 701, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 710, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range statuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 702, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 711, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if canManage { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 703, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8461,80 +8540,80 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 712, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 721, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 713, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 722, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if canManage { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 714, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 719, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 728, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var387), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var390), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8566,76 +8645,76 @@ func sortSwitch(opts []SortOption) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 720, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 736, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8697,25 +8776,25 @@ func arrangeList(ms []MonitorRow) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if len(ms) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 728, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/web/testdata/regionlimit.html b/internal/web/testdata/regionlimit.html new file mode 100644 index 0000000..6bf9586 --- /dev/null +++ b/internal/web/testdata/regionlimit.html @@ -0,0 +1,40 @@ + +
+

+
+ + + + +
+
+

+
+
+
+