From feaa1e930de98168fb214cc121ed19e121c9cd59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Wed, 25 Nov 2026 23:18:09 +0100 Subject: [PATCH 1/4] feat(console): filter the monitor list by status The status counts above the monitor list are now links: one shows only the monitors of that status as a flat list, the active one shows all again. The filter combines with the search and the range and is kept by the search form and the pager; an unknown status shows everything. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3 --- internal/api/console.go | 50 +- internal/api/dashboard_filter_test.go | 57 + internal/i18n/locales/de.json | 8 + internal/i18n/locales/en.json | 8 + internal/web/monitors.templ | 72 +- internal/web/monitors_templ.go | 4775 +++++++++++++------------ 6 files changed, 2692 insertions(+), 2278 deletions(-) create mode 100644 internal/api/dashboard_filter_test.go diff --git a/internal/api/console.go b/internal/api/console.go index aefd208..e2a4498 100644 --- a/internal/api/console.go +++ b/internal/api/console.go @@ -97,6 +97,7 @@ func (s *Server) dashboard(c *gin.Context) { v.Unchecked++ } } + v.Filters = statusFilters(c, v.Counts, v.Filter) for id, since := range s.regionsWithoutChecker(c.Request.Context(), data.usedRegions) { v.DeadRegions = append(v.DeadRegions, web.DeadRegion{Name: data.regionOf[id].Name, Since: since.Local().Format("2006-01-02 15:04")}) } @@ -127,6 +128,46 @@ func sortMonitors(ms []web.MonitorRow) { }) } +// dashboardStatuses are the statuses the dashboard counts, in order. +var dashboardStatuses = []web.Status{web.StatusUp, web.StatusDegraded, web.StatusDown, web.StatusUnknown, web.StatusMaintenance, web.StatusPaused} + +// dashboardURL is the dashboard with key set to value, or removed when +// value is empty, keeping the search and range but not the page. +func dashboardURL(c *gin.Context, key, value string) string { + q := url.Values{} + for _, k := range []string{"q", "range", "status"} { + if v := c.Query(k); v != "" { + q.Set(k, v) + } + } + if value == "" { + q.Del(key) + } else { + q.Set(key, value) + } + if len(q) == 0 { + return "/" + } + return "/?" + q.Encode() +} + +// statusFilters are the counts of the statuses present, each linking to +// its monitors, the active one back to all. +func statusFilters(c *gin.Context, counts map[web.Status]int, active web.Status) []web.StatusFilter { + var out []web.StatusFilter + for _, st := range dashboardStatuses { + if counts[st] == 0 && st != active { + continue + } + f := web.StatusFilter{Status: st, Count: counts[st], Active: st == active, URL: dashboardURL(c, "status", string(st))} + if f.Active { + f.URL = dashboardURL(c, "status", "") + } + out = append(out, f) + } + return out +} + // dashboardPage narrows the dashboard to a search or one group, pages it // and caps every group's own monitors. It reports false after answering // with an error. @@ -155,12 +196,19 @@ func (s *Server) dashboardPage(c *gin.Context, v *web.DashboardView, data monito } } var info pageInfo + if f := web.Status(c.Query("status")); slices.Contains(dashboardStatuses, f) { + v.Filter = f + v.AllURL = dashboardURL(c, "status", "") + } switch group := c.Query("group"); { - case strings.TrimSpace(c.Query("q")) != "": + case strings.TrimSpace(c.Query("q")) != "" || v.Filter != "": v.Search = strings.TrimSpace(c.Query("q")) needle := strings.ToLower(v.Search) var hits []web.MonitorRow for _, m := range data.rows { + if v.Filter != "" && m.Status != v.Filter { + continue + } if strings.Contains(strings.ToLower(m.Name), needle) || strings.Contains(strings.ToLower(m.Target), needle) { hits = append(hits, m) } diff --git a/internal/api/dashboard_filter_test.go b/internal/api/dashboard_filter_test.go new file mode 100644 index 0000000..d30ec1f --- /dev/null +++ b/internal/api/dashboard_filter_test.go @@ -0,0 +1,57 @@ +package api_test + +import ( + "net/http" + "strings" + "testing" +) + +func TestDashboardFiltersByStatus(t *testing.T) { + e := newEnv(t) + _, region := e.platformChecker(t, uniq("eu-")) + owner := e.browser(t) + owner.signup("o@"+uniq("flt")+".test", uniq("flt-")) + create := func(name string) string { + t.Helper() + st, m := owner.do("POST", "/api/v1/org/monitors", map[string]any{"name": name, "type": "http", "target": "https://" + strings.ToLower(name) + ".test", "interval_seconds": 60, "regions": []string{region}}) + if st != http.StatusCreated { + t.Fatalf("create %s = %d %v", name, st, m) + } + return m["id"].(string) + } + create("Alpha") + create("Beta") + gamma := create("Gamma") + owner.do("PUT", "/api/v1/org/monitors/"+gamma, map[string]any{"name": "Gamma", "type": "http", "target": "https://gamma.test", "interval_seconds": 60, "regions": []string{region}, "enabled": false}) + + _, _, all := owner.page("/") + for _, want := range []string{`href="/?status=unknown"`, `href="/?status=paused"`, "Show only the 2 monitors that are no data", "Show only the 1 monitor that is paused"} { + if !strings.Contains(all, want) { + t.Errorf("the dashboard lacks %q", want) + } + } + + _, _, paused := owner.page("/?status=paused") + if !strings.Contains(paused, "Gamma") || strings.Contains(paused, "Alpha") || strings.Contains(paused, "Beta") { + t.Error("?status=paused does not show only the paused monitor") + } + // The active filter links back to all, and the search keeps it. + if !strings.Contains(paused, `aria-current="true"`) || !strings.Contains(paused, `title="Show all statuses"`) { + t.Error("the active filter is not marked") + } + if !strings.Contains(paused, `name="status" value="paused"`) { + t.Error("the search form drops the status filter") + } + + _, _, both := owner.page("/?status=unknown&q=alp") + if !strings.Contains(both, "Alpha") || strings.Contains(both, "Beta") || strings.Contains(both, "Gamma") { + t.Error("status filter and search do not combine") + } + if _, _, none := owner.page("/?status=down"); !strings.Contains(none, "No monitor has this status right now.") { + t.Error("an empty filter does not say so") + } + // An unknown status shows everything. + if _, _, bogus := owner.page("/?status=bogus"); !strings.Contains(bogus, "Alpha") || !strings.Contains(bogus, "Gamma") { + t.Error("an unknown status filter hides monitors") + } +} diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index 5ba0d1c..0528950 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -1064,6 +1064,13 @@ "monitors.docker_host": "Docker-Host (unix://-Socket oder tcp://host:2375)", "monitors.edit": "Monitor bearbeiten", "monitors.expect_status": "Erwarteter Status (z. B. 2xx, 301)", + "monitors.filter_clear": "Alle Status anzeigen", + "monitors.filter_label": "Monitore nach Status anzeigen", + "monitors.filter_only": "Nur", + "monitors.filter_show": { + "one": "Nur den {{.Count}} Monitor mit Status „{{.Status}}“ anzeigen", + "other": "Nur die {{.Count}} Monitore mit Status „{{.Status}}“ anzeigen" + }, "monitors.follow_redirects": "Weiterleitungen folgen", "monitors.game_min_free_slots": "Mindestens freie Plätze", "monitors.game_min_free_slots_hint": "0 prüft nur, ob der Server antwortet.", @@ -1094,6 +1101,7 @@ "monitors.no_data_since": "keine Daten seit {{.Time}}", "monitors.no_match": "Kein Monitor gefunden.", "monitors.no_results": "Noch keine Ergebnisse.", + "monitors.no_status_match": "Gerade hat kein Monitor diesen Status.", "monitors.op_absent": "fehlt", "monitors.op_contains": "enthält", "monitors.op_eq": "gleich", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index 0b5b463..4b0d5f8 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -1064,6 +1064,13 @@ "monitors.docker_host": "Docker host (unix:// socket or tcp://host:2375)", "monitors.edit": "Edit monitor", "monitors.expect_status": "Expected status (e.g. 2xx, 301)", + "monitors.filter_clear": "Show all statuses", + "monitors.filter_label": "Show monitors by status", + "monitors.filter_only": "Only", + "monitors.filter_show": { + "one": "Show only the {{.Count}} monitor that is {{.Status}}", + "other": "Show only the {{.Count}} monitors that are {{.Status}}" + }, "monitors.follow_redirects": "Follow redirects", "monitors.game_min_free_slots": "Minimum free slots", "monitors.game_min_free_slots_hint": "0 only checks that the server answers.", @@ -1094,6 +1101,7 @@ "monitors.no_data_since": "no data since {{.Time}}", "monitors.no_match": "No monitor matches.", "monitors.no_results": "No results yet.", + "monitors.no_status_match": "No monitor has this status right now.", "monitors.op_absent": "is absent", "monitors.op_contains": "contains", "monitors.op_eq": "equals", diff --git a/internal/web/monitors.templ b/internal/web/monitors.templ index a996f6c..cce770c 100644 --- a/internal/web/monitors.templ +++ b/internal/web/monitors.templ @@ -65,7 +65,14 @@ type DashboardView struct { Empty bool CanWrite bool Counts map[Status]int - Range string + // Filters are the status counts, each linking to the monitors of + // that status. + Filters []StatusFilter + // Filter, if set, lists Results of that status instead of the tree. + Filter Status + // AllURL leaves the status filter, keeping the search and range. + AllURL string + Range string Ranges []RangeOption // Unchecked counts the monitors no region has reported for recently. Unchecked int @@ -73,6 +80,15 @@ type DashboardView struct { DeadRegions []DeadRegion } +// StatusFilter is one status count; URL shows only its monitors, or all +// again when it is the active filter. +type StatusFilter struct { + Status Status + Count int + URL string + Active bool +} + // DeadRegion is a region without a live checker since Since. type DeadRegion struct { Name, Since string @@ -163,14 +179,24 @@ templ Dashboard(p Page, me Me, v DashboardView) {

{ i18n.T(ctx, "console.monitors.title") }

@rangeSwitch(v.Ranges) - for _, s := range []Status{StatusUp, StatusDegraded, StatusDown, StatusUnknown, StatusMaintenance, StatusPaused} { - if v.Counts[s] > 0 { - - @statusDot(s) - { strconv.Itoa(v.Counts[s]) } - + if v.CanWrite { { i18n.T(ctx, "monitors.new") } } @@ -191,6 +217,9 @@ templ Dashboard(p Page, me Me, v DashboardView) { if v.Range != "" { } + if v.Filter != "" { + + } { i18n.T(ctx, "console.monitors.empty") }

- case v.Search != "": -

← { i18n.T(ctx, "monitors.all") }

+ case v.Search != "" || v.Filter != "": +

+ ← { i18n.T(ctx, "monitors.all") } + if v.Filter != "" { + + { i18n.T(ctx, "monitors.filter_only") } + @statusDot(v.Filter) + { i18n.T(ctx, "status."+string(v.Filter)) } + × + + } +

if len(v.Results) == 0 { -

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

+ if v.Search == "" { +

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

+ } else { +

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

+ } } else {
@monitorList(v.Results) @@ -1589,3 +1632,10 @@ templ IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMa } } + +func filterTitle(ctx context.Context, f StatusFilter) string { + if f.Active { + return i18n.T(ctx, "monitors.filter_clear") + } + return i18n.T(ctx, "monitors.filter_show", "Status", i18n.T(ctx, "status."+string(f.Status)), "Count", f.Count) +} diff --git a/internal/web/monitors_templ.go b/internal/web/monitors_templ.go index a3d9eb1..d20a6b6 100644 --- a/internal/web/monitors_templ.go +++ b/internal/web/monitors_templ.go @@ -74,14 +74,30 @@ type DashboardView struct { Empty bool CanWrite bool Counts map[Status]int - Range string - Ranges []RangeOption + // Filters are the status counts, each linking to the monitors of + // that status. + Filters []StatusFilter + // Filter, if set, lists Results of that status instead of the tree. + Filter Status + // AllURL leaves the status filter, keeping the search and range. + AllURL string + Range string + Ranges []RangeOption // Unchecked counts the monitors no region has reported for recently. Unchecked int // DeadRegions are regions of the monitors without a live checker. DeadRegions []DeadRegion } +// StatusFilter is one status count; URL shows only its monitors, or all +// again when it is the active filter. +type StatusFilter struct { + Status Status + Count int + URL string + Active bool +} + // DeadRegion is a region without a live checker since Since. type DeadRegion struct { Name, Since string @@ -137,7 +153,7 @@ func rangeSwitch(opts []RangeOption) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.range")).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 108, Col: 133} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 124, Col: 133} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2) if templ_7745c5c3_Err != nil { @@ -156,7 +172,7 @@ func rangeSwitch(opts []RangeOption) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(o.Key) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 111, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 127, Col: 73} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -174,7 +190,7 @@ func rangeSwitch(opts []RangeOption) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.range_not_enough")).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 113, Col: 105} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 129, Col: 105} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4) if templ_7745c5c3_Err != nil { @@ -187,7 +203,7 @@ func rangeSwitch(opts []RangeOption) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(o.Key) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 113, Col: 136} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 129, Col: 136} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -205,7 +221,7 @@ func rangeSwitch(opts []RangeOption) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(o.URL)).ResolveURL(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 115, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 131, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6) if templ_7745c5c3_Err != nil { @@ -218,7 +234,7 @@ func rangeSwitch(opts []RangeOption) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(o.Key) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 115, Col: 88} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 131, Col: 88} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -290,7 +306,7 @@ func statusDot(s Status) templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "status."+string(s))).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 130, Col: 42} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 146, Col: 42} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) if templ_7745c5c3_Err != nil { @@ -342,7 +358,7 @@ func bars(bs []Bar, height int) templ.Component { var templ_7745c5c3_Var13 string templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression("0 0 " + strconv.Itoa(len(bs)*4) + " " + strconv.Itoa(height)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 136, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 152, Col: 73} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13) if templ_7745c5c3_Err != nil { @@ -355,7 +371,7 @@ func bars(bs []Bar, height int) templ.Component { var templ_7745c5c3_Var14 string templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("height:" + strconv.Itoa(height) + "px") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 139, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 155, Col: 49} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { @@ -368,7 +384,7 @@ func bars(bs []Bar, height int) templ.Component { var templ_7745c5c3_Var15 string templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.uptime_chart")).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 141, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 157, Col: 51} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15) if templ_7745c5c3_Err != nil { @@ -390,7 +406,7 @@ func bars(bs []Bar, height int) templ.Component { var templ_7745c5c3_Var16 string templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(i * 4)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 145, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 161, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) if templ_7745c5c3_Err != nil { @@ -403,7 +419,7 @@ func bars(bs []Bar, height int) templ.Component { var templ_7745c5c3_Var17 string templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(height)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 148, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 164, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) if templ_7745c5c3_Err != nil { @@ -451,7 +467,7 @@ func bars(bs []Bar, height int) templ.Component { var templ_7745c5c3_Var20 string templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(b.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 154, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 170, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) if templ_7745c5c3_Err != nil { @@ -506,7 +522,7 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { var templ_7745c5c3_Var23 string templ_7745c5c3_Var23, 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: 163, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 179, Col: 76} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) if templ_7745c5c3_Err != nil { @@ -520,187 +536,204 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - for _, s := range []Status{StatusUp, StatusDegraded, StatusDown, StatusUnknown, StatusMaintenance, StatusPaused} { - if v.Counts[s] > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = statusDot(s).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var24 string - templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(v.Counts[s])) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 170, Col: 40} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - } - if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var25 string - templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.new")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 175, Col: 149} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if v.CanWrite { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var31 string - templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.search")).Resolve(ctx) + templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.new")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 199, Col: 48} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 201, Col: 149} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\" class=\"w-full border border-rule bg-transparent px-2.5 py-1.5 text-sm outline-none focus:border-ink\"> ") + for _, r := range v.DeadRegions { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var32 string + templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.dead_region", "Region", r.Name, "Since", r.Since)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 208, Col: 81} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + if v.Unchecked > 0 { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var33 string + templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.unchecked_banner", "Count", v.Unchecked)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 211, Col: 72} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -709,63 +742,266 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - switch { - case v.Empty: - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "

") + if !v.Empty { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var33 string - templ_7745c5c3_Var33, 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/monitors.templ`, Line: 207, Col: 112} + if v.Range != "" { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - case v.Search != "": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "

← ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var34 string - templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.all")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 209, Col: 107} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - if len(v.Results) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "

") + if v.Filter != "" { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + switch { + case v.Empty: + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var40 string + templ_7745c5c3_Var40, 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/monitors.templ`, Line: 236, Col: 112} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case v.Search != "" || v.Filter != "": + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "

← ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var41 string + templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.all")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 239, Col: 84} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if v.Filter != "" { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var42 string + templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.filter_only")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 242, Col: 44} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = statusDot(v.Filter).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var43 string + templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "status."+string(v.Filter))) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 244, Col: 74} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " ×") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if len(v.Results) == 0 { + if v.Search == "" { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var47 string + templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.no_status_match")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 251, Col: 116} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "

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

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var48 string + templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.no_match")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 253, Col: 109} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -773,12 +1009,12 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -788,38 +1024,38 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { } default: if v.Focus != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var36 string - templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.all")) + var templ_7745c5c3_Var49 string + templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.all")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 221, Col: 81} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 264, Col: 81} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " › ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, " › ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var37 string - templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(v.Focus) + var templ_7745c5c3_Var50 string + templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(v.Focus) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 223, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 266, Col: 41} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) + _, 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, 62, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -837,7 +1073,7 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -845,38 +1081,38 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var38 string - templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.range_note", "Range", v.Range)) + var templ_7745c5c3_Var51 string + templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.range_note", "Range", v.Range)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 234, Col: 104} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 277, Col: 104} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) + _, 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, 66, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var39 string - templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.manage")) + var templ_7745c5c3_Var52 string + templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.manage")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 236, Col: 108} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 279, Col: 108} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) + _, 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, 68, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -908,25 +1144,25 @@ func monitorList(ms []MonitorRow) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if len(ms) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1068,33 +1304,33 @@ func moreLink(g GroupNode) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if g.More > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "\" class=\"block border-b border-rule py-2.5 text-sm text-muted hover:text-ink\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var50 string - templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.show_all", "Count", g.More+len(g.Monitors))) + var templ_7745c5c3_Var63 string + templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.show_all", "Count", g.More+len(g.Monitors))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 270, Col: 182} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 313, Col: 182} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, " →") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, " →") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1122,7 +1358,7 @@ func groupBlock(g GroupNode) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1130,33 +1366,33 @@ func groupBlock(g GroupNode) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var52 string - templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) + var templ_7745c5c3_Var65 string + templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 280, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 323, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var53 string - templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(g.Total)) + var templ_7745c5c3_Var66 string + templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(g.Total)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 281, Col: 81} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 324, Col: 81} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1174,7 +1410,7 @@ func groupBlock(g GroupNode) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1264,7 +1500,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var55 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var68 := 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 { @@ -1276,20 +1512,20 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "

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

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var56 string - templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.title")) + var templ_7745c5c3_Var69 string + templ_7745c5c3_Var69, 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: 360, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 403, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1297,133 +1533,133 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var57 string - templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Name) + var templ_7745c5c3_Var70 string + templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 365, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 408, Col: 43} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var58 string - templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type_"+v.Row.Type)) + var templ_7745c5c3_Var71 string + templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type_"+v.Row.Type)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 368, Col: 47} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 411, Col: 47} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var58)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.Row.Target != "" { - var templ_7745c5c3_Var59 string - templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Row.Target) + var templ_7745c5c3_Var72 string + templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Row.Target) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 370, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 413, Col: 29} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - var templ_7745c5c3_Var60 string - templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Interval) + var templ_7745c5c3_Var73 string + templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Interval) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 372, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 415, Col: 26} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var60)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "\" class=\"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_Var62 string - templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) + var templ_7745c5c3_Var75 string + templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 376, Col: 173} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 419, Col: 173} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.Row.Unchecked { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var63 string - templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.unchecked_banner", "Count", 1)) + var templ_7745c5c3_Var76 string + templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.unchecked_banner", "Count", 1)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 380, Col: 126} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 423, Col: 126} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) + _, 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, 104, "

") + 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, 105, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var64 string - templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.history", "Range", v.Range)) + var templ_7745c5c3_Var77 string + templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.history", "Range", v.Range)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 384, Col: 123} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 427, Col: 123} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64)) + _, 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, 106, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1431,33 +1667,33 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var65 string - templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.sla")) + var templ_7745c5c3_Var78 string + templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.sla")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 388, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 431, Col: 39} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65)) + _, 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, 108, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var66 string - templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Uptime) + var templ_7745c5c3_Var79 string + templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Uptime) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 389, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 432, Col: 49} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1466,69 +1702,69 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } if v.Latency.Points != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var67 string - templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.latency")) + var templ_7745c5c3_Var80 string + templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.latency")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 394, Col: 44} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 437, Col: 44} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67)) + _, 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, 111, " max ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, " max ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var68 string - templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(v.Latency.MaxMS)) + var templ_7745c5c3_Var81 string + templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(v.Latency.MaxMS)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 395, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 438, Col: 46} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68)) + _, 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, 112, " ms
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "\" fill=\"none\" class=\"stroke-ink\" stroke-width=\"1.5\" vector-effect=\"non-scaling-stroke\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Regions) > 1 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1536,25 +1772,25 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range v.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var71 string - templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) + var templ_7745c5c3_Var84 string + templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 408, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 451, Col: 38} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) + _, 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, 119, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1566,38 +1802,38 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer templ_7745c5c3_Buffer := templ.GetBuffer() var templ_7745c5c3_ElementScripts []templ.ComponentScript - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var75 string - templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(r.Uptime) + var templ_7745c5c3_Var88 string + templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(r.Uptime) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 410, Col: 140} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 453, Col: 140} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) + _, 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, 124, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "

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

") 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, "monitors.by_region_hint")) + var templ_7745c5c3_Var89 string + templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.by_region_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 414, Col: 79} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 457, Col: 79} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1657,12 +1893,12 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Maintenance) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1674,12 +1910,12 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1687,7 +1923,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { 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, 152, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1696,38 +1932,38 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer templ_7745c5c3_Buffer := templ.GetBuffer() var templ_7745c5c3_ElementScripts []templ.ComponentScript - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, ">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var80 string - templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(e.Label) + var templ_7745c5c3_Var93 string + templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(e.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 431, Col: 56} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 474, Col: 56} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80)) + _, 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, 137, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var81 string - templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(e.Value) + var templ_7745c5c3_Var94 string + templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(e.Value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 432, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 475, Col: 45} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81)) + _, 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, 138, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1780,20 +2016,20 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var82 string - templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinStringErrs(v.Uptime90) + var templ_7745c5c3_Var95 string + templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(v.Uptime90) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 440, Col: 48} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 483, Col: 48} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1801,7 +2037,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1809,12 +2045,12 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range v.Row.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1822,43 +2058,43 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { 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, 165, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var83 string - templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) + var templ_7745c5c3_Var96 string + templ_7745c5c3_Var96, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 451, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 494, Col: 21} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83)) + _, 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, 146, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var84 string - templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) + var templ_7745c5c3_Var97 string + templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 452, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 495, Col: 77} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84)) + _, 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, 147, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "") 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, 168, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Incidents) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1871,43 +2107,43 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } if v.MoreIncidents { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "\" class=\"mt-3 inline-block text-sm text-muted hover:text-ink\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var86 string - templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.all_of_monitor")) + var templ_7745c5c3_Var99 string + templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.all_of_monitor")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 463, Col: 166} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 506, Col: 166} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86)) + _, 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, 152, " →") + 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, 153, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1917,7 +2153,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1930,44 +2166,44 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } if v.MoreResults { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "\" class=\"mt-3 inline-block text-sm text-muted hover:text-ink\">") 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, "monitors.all_results")) + var templ_7745c5c3_Var101 string + templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.all_results")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 474, Col: 165} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 517, Col: 165} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, " →") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, " →") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var55), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var68), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1992,38 +2228,38 @@ func resultTable(rows []ResultRow) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range rows { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "") 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, 181, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var90 string - templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinStringErrs(r.Time) + var templ_7745c5c3_Var103 string + templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(r.Time) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 486, Col: 85} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 529, Col: 85} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90)) + _, 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, 162, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var91 string - templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(r.Region) + var templ_7745c5c3_Var104 string + templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(r.Region) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 487, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 530, Col: 40} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91)) + _, 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, 163, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2031,89 +2267,89 @@ func resultTable(rows []ResultRow) 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, 184, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if r.OK { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "●") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "●") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "●") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "●") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var92 string - templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(r.Latency) + var templ_7745c5c3_Var105 string + templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(r.Latency) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 498, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 541, Col: 59} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92)) + _, 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, 168, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var93 string - templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) + var templ_7745c5c3_Var106 string + templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 500, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 543, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93)) + _, 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, 169, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if r.EvidenceURL != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "\" class=\"ml-2 underline underline-offset-2 hover:text-ink\">") 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, "evidence.show")) + var templ_7745c5c3_Var108 string + templ_7745c5c3_Var108, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "evidence.show")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 502, Col: 136} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 545, Col: 136} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95)) + _, 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, 172, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "") 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, 194, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2145,7 +2381,7 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var97 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var110 := 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 { @@ -2157,33 +2393,33 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "

← ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, "\" class=\"text-muted hover:text-ink\">← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var99 string - templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) + var templ_7745c5c3_Var112 string + templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 521, Col: 129} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 564, Col: 129} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2192,20 +2428,20 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { return templ_7745c5c3_Err } if len(v.Rows) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "

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

") 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, "monitors.no_results")) + var templ_7745c5c3_Var113 string + templ_7745c5c3_Var113, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.no_results")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 524, Col: 108} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 567, Col: 108} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var100)) + _, 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, 179, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2215,7 +2451,7 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 200, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2225,7 +2461,7 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var97), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var110), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2250,12 +2486,12 @@ func incidentList(rows []IncidentRow, showMonitor bool, custom []CustomIncidentS } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2431,33 +2667,33 @@ func quickStatus(r IncidentRow, custom []CustomIncidentStatus) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 198, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 218, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var111 string - templ_7745c5c3_Var111, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.set_status")) + var templ_7745c5c3_Var124 string + templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.set_status")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 562, Col: 148} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 605, Col: 148} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var111)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 199, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 220, "\" data-next=\"/incidents\" class=\"mt-3 grid gap-2 border border-rule p-3 sm:w-80\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2465,134 +2701,134 @@ func quickStatus(r IncidentRow, custom []CustomIncidentStatus) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 201, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range IncidentStatuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 202, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 226, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } for _, st := range custom { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 207, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 231, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 212, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 235, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2626,7 +2862,7 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var121 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var134 := 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 { @@ -2643,82 +2879,82 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { return templ_7745c5c3_Err } if v.Monitor != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 216, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var122 string - templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.of_monitor")) + var templ_7745c5c3_Var135 string + templ_7745c5c3_Var135, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.of_monitor")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 597, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 640, Col: 41} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var135)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 217, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 238, "\" class=\"font-medium hover:underline\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var124 string - templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) + var templ_7745c5c3_Var137 string + templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 598, Col: 105} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 641, Col: 105} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var137)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 219, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 239, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var125 string - templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.all")) + var templ_7745c5c3_Var138 string + templ_7745c5c3_Var138, 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: 599, Col: 94} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 642, Col: 94} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var138)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 220, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 221, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Rows) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 222, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var126 string - templ_7745c5c3_Var126, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.none")) + var templ_7745c5c3_Var139 string + templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.none")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 603, Col: 103} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 646, Col: 103} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var126)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var139)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 223, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2728,7 +2964,7 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 224, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2738,7 +2974,7 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var121), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var134), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2887,46 +3123,46 @@ func headersField(value string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 225, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2950,46 +3186,46 @@ func typeFields(typ, current string) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var131 := templ.GetChildren(ctx) + templ_7745c5c3_Var144 := templ.GetChildren(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 229, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 253, " class=\"mb-2\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ_7745c5c3_Var131.Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = templ_7745c5c3_Var144.Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 234, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3014,95 +3250,95 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 235, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3127,7 +3363,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var141 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var154 := 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 { @@ -3139,115 +3375,115 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if f.ID == "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 245, "← ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, "← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var142 string - templ_7745c5c3_Var142, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.title")) + var templ_7745c5c3_Var155 string + templ_7745c5c3_Var155, 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: 771, Col: 93} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 814, Col: 93} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var142)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, "← ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 268, "\" class=\"text-muted hover:text-ink\">← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var144 string - templ_7745c5c3_Var144, templ_7745c5c3_Err = templ.JoinStringErrs(f.Name) + var templ_7745c5c3_Var157 string + templ_7745c5c3_Var157, templ_7745c5c3_Err = templ.JoinStringErrs(f.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 773, Col: 97} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 816, Col: 97} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var144)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var157)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var145 string - templ_7745c5c3_Var145, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, p.TitleID)) + var templ_7745c5c3_Var158 string + templ_7745c5c3_Var158, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, p.TitleID)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 776, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 819, Col: 65} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var145)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var158)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 251, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, " class=\"grid max-w-4xl gap-x-12 md:grid-cols-2\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3259,20 +3495,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 257, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var148 string - templ_7745c5c3_Var148, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.title")) + var templ_7745c5c3_Var161 string + templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 792, Col: 117} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 835, Col: 117} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var148)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 258, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3280,33 +3516,33 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 259, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var149 string - templ_7745c5c3_Var149, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.monitor_hint")) + var templ_7745c5c3_Var162 string + templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.monitor_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 794, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 837, Col: 82} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var149)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var162)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 294, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3414,25 +3650,25 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 275, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var155 string - templ_7745c5c3_Var155, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.target_hint")) + var templ_7745c5c3_Var168 string + templ_7745c5c3_Var168, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.target_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 815, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 858, Col: 83} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var168)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, t := range []string{"postgres", "mysql", "mssql", "mongodb", "redis"} { - templ_7745c5c3_Var156 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var169 := 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 { @@ -3450,13 +3686,13 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var156), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var169), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } for _, t := range []string{"mqtt", "kafka", "rabbitmq"} { - templ_7745c5c3_Var157 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var170 := 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 { @@ -3474,12 +3710,12 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var157), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var170), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Var158 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var171 := 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 { @@ -3491,20 +3727,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var159 string - templ_7745c5c3_Var159, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.grpc_hint")) + var templ_7745c5c3_Var172 string + templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.grpc_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 828, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 871, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var159)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var172)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3518,11 +3754,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("grpc", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var158), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("grpc", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var171), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var160 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var173 := 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 { @@ -3534,20 +3770,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var161 string - templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.smtp_hint")) + var templ_7745c5c3_Var174 string + templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.smtp_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 833, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 876, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3561,11 +3797,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("smtp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var160), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("smtp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var173), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var162 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var175 := 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 { @@ -3577,20 +3813,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var163 string - templ_7745c5c3_Var163, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.radius_hint")) + var templ_7745c5c3_Var176 string + templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.radius_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 838, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 881, Col: 77} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var163)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3612,223 +3848,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("radius", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var162), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("radius", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var175), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var164 := 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 { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var165 string - templ_7745c5c3_Var165, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_hint")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 845, Col: 75} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var165)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = secretField(i18n.T(ctx, "monitors.snmp_community"), "config.community", f.Proto.CommunitySet).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = valueField(i18n.T(ctx, "monitors.snmp_oid"), "config.oid", f.Proto.OID, "1.3.6.1.2.1.1.3.0", false).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 292, "
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = valueField(i18n.T(ctx, "monitors.snmp_value"), "config.value", f.Proto.Value, "", false).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, "
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return nil - }) - templ_7745c5c3_Err = typeFields("snmp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var164), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Var172 := 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 { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var173 string - templ_7745c5c3_Var173, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.steam_hint")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 869, Col: 76} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var173)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return nil - }) - templ_7745c5c3_Err = typeFields("steam", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var172), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Var174 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var177 := 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 { @@ -3844,12 +3868,12 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var175 string - templ_7745c5c3_Var175, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.minecraft_hint")) + var templ_7745c5c3_Var178 string + templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 873, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 888, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var178)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3857,30 +3881,30 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var176 string - templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.minecraft_edition")) + var templ_7745c5c3_Var179 string + templ_7745c5c3_Var179, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_version")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 875, Col: 130} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 890, Col: 125} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var179)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 305, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - for _, e := range []string{"java", "bedrock"} { + for _, v := range []string{"2c", "1"} { templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = typeFields("minecraft", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var174), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("snmp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var177), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var179 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var185 := 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 { @@ -3938,20 +4037,157 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var180 string - templ_7745c5c3_Var180, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.docker_hint")) + var templ_7745c5c3_Var186 string + templ_7745c5c3_Var186, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.steam_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 885, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 912, Col: 76} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var180)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var186)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, "

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

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) + templ_7745c5c3_Err = typeFields("steam", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var185), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var187 := 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 { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var188 string + templ_7745c5c3_Var188, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.minecraft_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 916, Col: 80} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var188)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 324, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) + templ_7745c5c3_Err = typeFields("minecraft", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var187), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var192 := 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 { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var193 string + templ_7745c5c3_Var193, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.docker_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 928, Col: 77} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var193)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3961,11 +4197,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("docker", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var179), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("docker", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var192), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var181 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var194 := 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 { @@ -3977,219 +4213,219 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 314, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var182 string - templ_7745c5c3_Var182, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.alertmanager_hint")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 890, Col: 49} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var182)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 315, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var183 string - templ_7745c5c3_Var183, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.title")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 891, Col: 111} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var183)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 316, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var184 string - templ_7745c5c3_Var184, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 894, Col: 123} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var184)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - for i, m := range f.Matchers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var195 string - templ_7745c5c3_Var195, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers_hint")) + templ_7745c5c3_Var195, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.alertmanager_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 906, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 933, Col: 49} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var195)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var196 string + templ_7745c5c3_Var196, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.title")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 934, Col: 111} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var196)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var197 string + templ_7745c5c3_Var197, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 937, Col: 123} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var197)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for i, m := range f.Matchers { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 338, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var208 string + templ_7745c5c3_Var208, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 949, Col: 80} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var208)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 354, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4199,11 +4435,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("alertmanager", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var181), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("alertmanager", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var194), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var196 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var209 := 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 { @@ -4215,20 +4451,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var197 string - templ_7745c5c3_Var197, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.heartbeat_hint")) + var templ_7745c5c3_Var210 string + templ_7745c5c3_Var210, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.heartbeat_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 911, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 954, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var197)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var210)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4238,11 +4474,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("heartbeat", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var196), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("heartbeat", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var209), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var198 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var211 := 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 { @@ -4254,66 +4490,66 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4339,11 +4575,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("http", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var198), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("http", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var211), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var202 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var215 := 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 { @@ -4355,203 +4591,203 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 345, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var203 string - templ_7745c5c3_Var203, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_hint")) + var templ_7745c5c3_Var216 string + templ_7745c5c3_Var216, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 933, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 976, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var203)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var216)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4569,11 +4805,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("prometheus", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var202), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("prometheus", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var215), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var215 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var228 := 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 { @@ -4585,92 +4821,92 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 366, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4682,203 +4918,203 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 376, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 396, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var221 string - templ_7745c5c3_Var221, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions")) + var templ_7745c5c3_Var234 string + templ_7745c5c3_Var234, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 982, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1025, Col: 125} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var221)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var234)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 377, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var222 string - templ_7745c5c3_Var222, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions_hint")) + var templ_7745c5c3_Var235 string + templ_7745c5c3_Var235, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 983, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1026, Col: 82} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var222)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var235)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 378, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, a := range f.Assertions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 379, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 404, "\" class=\"border border-rule bg-transparent px-1 py-1 font-mono text-xs\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, op := range AssertionOps { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 385, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 409, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 390, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 413, "\" class=\"min-w-0 border border-rule bg-transparent px-2 py-1 font-mono text-xs outline-none focus:border-ink\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 394, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 414, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = typeFields("json", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var215), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("json", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var228), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var233 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var246 := 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 { @@ -4890,66 +5126,66 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 395, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4963,11 +5199,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("dns", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var233), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("dns", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var246), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var237 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var250 := 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 { @@ -4989,11 +5225,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("tls", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var237), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("tls", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var250), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 403, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 423, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5001,17 +5237,17 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 404, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 426, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5019,7 +5255,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 407, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 427, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5027,141 +5263,141 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 408, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 431, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var238 string - templ_7745c5c3_Var238, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions")) + var templ_7745c5c3_Var251 string + templ_7745c5c3_Var251, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1021, Col: 121} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1064, Col: 121} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var238)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var251)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 412, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var239 string - templ_7745c5c3_Var239, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions_hint")) + var templ_7745c5c3_Var252 string + templ_7745c5c3_Var252, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1022, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1065, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var239)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var252)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 413, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range f.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 414, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 442, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 423, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 443, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5174,57 +5410,57 @@ 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, 424, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 447, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 428, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 448, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var141), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var154), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5268,7 +5504,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var249 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var262 := 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 { @@ -5284,7 +5520,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, 429, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 449, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5293,12 +5529,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, 430, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 450, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, ch := range v.Channels { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 431, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 451, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5313,149 +5549,149 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 432, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 452, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var250 string - templ_7745c5c3_Var250, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Name) + var templ_7745c5c3_Var263 string + templ_7745c5c3_Var263, 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: 1087, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1130, Col: 22} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var250)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var263)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 433, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 453, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var251 string - templ_7745c5c3_Var251, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.type_"+ch.Type)) + var templ_7745c5c3_Var264 string + templ_7745c5c3_Var264, 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: 1088, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1131, Col: 71} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var251)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var264)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 434, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 454, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var252 string - templ_7745c5c3_Var252, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Target) + var templ_7745c5c3_Var265 string + templ_7745c5c3_Var265, 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: 1089, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1132, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var252)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var265)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 435, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 455, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 436, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 462, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 443, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 463, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 444, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 464, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 445, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 465, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 446, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 466, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5463,7 +5699,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, 447, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 467, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5471,7 +5707,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, 448, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 468, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5487,46 +5723,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, 449, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 472, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5535,7 +5771,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, 453, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 473, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5543,7 +5779,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, 454, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 474, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5551,79 +5787,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, 455, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5631,30 +5867,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, 464, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 484, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 465, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var266 string - templ_7745c5c3_Var266, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "error.email_not_configured")) + var templ_7745c5c3_Var279 string + templ_7745c5c3_Var279, 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: 1141, Col: 79} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1184, Col: 79} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var266)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var279)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 466, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 467, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 487, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5662,20 +5898,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, 468, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var267 string - templ_7745c5c3_Var267, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.service_intro")) + var templ_7745c5c3_Var280 string + templ_7745c5c3_Var280, 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: 1146, Col: 89} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1189, Col: 89} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var267)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var280)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 469, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5683,81 +5919,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, 470, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5765,118 +6001,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, 479, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 506, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, pr := range v.Providers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 487, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 511, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if pr.Help != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 492, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var276 string - templ_7745c5c3_Var276, templ_7745c5c3_Err = templ.JoinStringErrs(pr.Help) + var templ_7745c5c3_Var289 string + templ_7745c5c3_Var289, 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: 1178, Col: 54} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1221, Col: 54} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var276)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var289)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 493, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5887,7 +6123,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 494, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 514, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5896,14 +6132,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, 495, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 515, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var249), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var262), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5947,208 +6183,208 @@ func providerField(f ProviderField) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 496, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 540, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6173,85 +6409,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, 521, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 550, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6294,7 +6530,7 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var294 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var307 := 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 { @@ -6306,20 +6542,20 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 531, "

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

← ") 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, "console.monitors.title")) + var templ_7745c5c3_Var308 string + templ_7745c5c3_Var308, 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: 1274, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1317, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var295)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var308)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 532, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6328,69 +6564,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, 533, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 553, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, g := range v.Groups { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 534, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 555, "\">
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var297 string - templ_7745c5c3_Var297, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) + var templ_7745c5c3_Var310 string + templ_7745c5c3_Var310, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1281, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1324, Col: 21} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var297)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var310)) 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, 556, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if g.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 537, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 557, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var298 string - templ_7745c5c3_Var298, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) + var templ_7745c5c3_Var311 string + templ_7745c5c3_Var311, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1284, Col: 99} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1327, Col: 99} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var298)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var311)) 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, 559, "\" data-method=\"put\" data-next=\"/groups\" class=\"mt-3 w-72\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6402,20 +6638,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, 540, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 562, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6431,66 +6667,66 @@ 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, 543, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 566, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 547, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 567, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 548, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 568, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 549, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 569, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 550, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 570, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6498,7 +6734,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, 551, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 571, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6510,20 +6746,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, 552, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 574, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6539,14 +6775,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, 555, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 575, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var294), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var307), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6578,7 +6814,7 @@ func pingSection(url string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 556, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 576, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6586,55 +6822,55 @@ func pingSection(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 557, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var306 string - templ_7745c5c3_Var306, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_intro")) + var templ_7745c5c3_Var319 string + templ_7745c5c3_Var319, 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: 1329, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1372, Col: 83} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var306)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var319)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 558, "

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

")
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		var templ_7745c5c3_Var307 string
-		templ_7745c5c3_Var307, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 " + url + "\n")
+		var templ_7745c5c3_Var320 string
+		templ_7745c5c3_Var320, 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: 1330, Col: 137}
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1373, Col: 137}
 		}
-		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var307))
+		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var320))
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		var templ_7745c5c3_Var308 string
-		templ_7745c5c3_Var308, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 --data-raw \"$output\" " + url + "/fail")
+		var templ_7745c5c3_Var321 string
+		templ_7745c5c3_Var321, 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: 1330, Col: 208}
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1373, Col: 208}
 		}
-		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var308))
+		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var321))
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 559, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var309 string - templ_7745c5c3_Var309, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_secret")) + var templ_7745c5c3_Var322 string + templ_7745c5c3_Var322, 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: 1331, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1374, Col: 84} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var309)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var322)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 560, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6680,20 +6916,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, 561, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var311 string - templ_7745c5c3_Var311, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.db_hint")) + var templ_7745c5c3_Var324 string + templ_7745c5c3_Var324, 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: 1357, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1400, Col: 69} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var311)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var324)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 562, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6721,33 +6957,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, 563, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6779,56 +7015,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, 566, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6854,66 +7090,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, 572, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6938,20 +7174,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, 580, "

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

") 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, "monitors.broker_hint_"+typ)) + var templ_7745c5c3_Var336 string + templ_7745c5c3_Var336, 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: 1405, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1448, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var323)) + _, 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, 581, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6978,66 +7214,66 @@ func brokerFields(typ string, b BrokerForm) templ.Component { return templ_7745c5c3_Err } case "kafka": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 582, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7100,7 +7336,7 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var328 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var341 := 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 { @@ -7112,45 +7348,45 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 590, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var329 string - templ_7745c5c3_Var329, templ_7745c5c3_Err = templ.JoinStringErrs("← " + i18n.T(ctx, "incidents.all")) + var templ_7745c5c3_Var342 string + templ_7745c5c3_Var342, 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: 1452, Col: 120} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1495, Col: 120} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var329)) + _, 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, 591, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.Row.Title != "" { - var templ_7745c5c3_Var330 string - templ_7745c5c3_Var330, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Title) + var templ_7745c5c3_Var343 string + templ_7745c5c3_Var343, 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: 1455, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1498, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var330)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var343)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - var templ_7745c5c3_Var331 string - templ_7745c5c3_Var331, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var344 string + templ_7745c5c3_Var344, 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: 1457, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1500, Col: 19} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var331)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var344)) 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, 612, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7158,46 +7394,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, 593, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 614, "\" class=\"hover:underline\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var333 string - templ_7745c5c3_Var333, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var346 string + templ_7745c5c3_Var346, 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: 1462, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1505, Col: 100} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var333)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var346)) 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, 615, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var334 string - templ_7745c5c3_Var334, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Started + " · " + v.Row.Duration) + var templ_7745c5c3_Var347 string + templ_7745c5c3_Var347, 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: 1463, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1506, Col: 87} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var334)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var347)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 596, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 616, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7205,18 +7441,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, 597, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 617, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, e := range v.Timeline { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 598, "
    1. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 618, "
    2. ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } switch e.Kind { case "update": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 599, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7224,107 +7460,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, 600, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 620, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var335 string - templ_7745c5c3_Var335, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var348 string + templ_7745c5c3_Var348, 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: 1475, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1518, Col: 51} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var335)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var348)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 601, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 621, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.Author != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 602, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 622, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var336 string - templ_7745c5c3_Var336, templ_7745c5c3_Err = templ.JoinStringErrs(e.Author) + var templ_7745c5c3_Var349 string + templ_7745c5c3_Var349, 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: 1477, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1520, Col: 46} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var336)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var349)) 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, 623, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if !e.Public { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 604, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 624, "") 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, "incident.internal")) + var templ_7745c5c3_Var350 string + templ_7745c5c3_Var350, 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: 1480, Col: 94} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1523, Col: 94} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var337)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var350)) 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, 625, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 606, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 629, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 610, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7332,103 +7568,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, 611, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 631, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } case "resolved": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 612, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var341 string - templ_7745c5c3_Var341, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.recovered")) + var templ_7745c5c3_Var354 string + templ_7745c5c3_Var354, 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: 1490, Col: 85} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1533, Col: 85} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var341)) + _, 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, 613, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 633, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var342 string - templ_7745c5c3_Var342, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var355 string + templ_7745c5c3_Var355, 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: 1490, Col: 136} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1533, Col: 136} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var342)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var355)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 614, "

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

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

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var343 string - templ_7745c5c3_Var343, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.began")) + var templ_7745c5c3_Var356 string + templ_7745c5c3_Var356, 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: 1492, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1535, Col: 83} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var343)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var356)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 616, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 636, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var344 string - templ_7745c5c3_Var344, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var357 string + templ_7745c5c3_Var357, 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: 1492, Col: 134} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1535, Col: 134} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var344)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var357)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 617, "

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

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

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var345 string - templ_7745c5c3_Var345, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(v.Row.Cause, " · ")) + var templ_7745c5c3_Var358 string + templ_7745c5c3_Var358, 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: 1494, Col: 90} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1537, Col: 90} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var345)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var358)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 619, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 620, "
    3. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 640, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 621, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 641, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 622, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 650, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 670, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var328), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var341), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7726,7 +7962,7 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var359 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var372 := 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 { @@ -7742,7 +7978,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, 651, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 671, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7750,12 +7986,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, 652, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 672, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range IncidentStatuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 653, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 673, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7763,12 +7999,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, 654, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 674, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 655, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 675, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7777,139 +8013,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, 656, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var360 string - templ_7745c5c3_Var360, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident_statuses.none")) + var templ_7745c5c3_Var373 string + templ_7745c5c3_Var373, 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: 1556, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1599, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var360)) + _, 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, 657, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 658, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 678, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range statuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 659, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 679, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if canManage { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 660, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7919,80 +8155,80 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 669, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 689, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 670, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 690, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if canManage { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 671, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 696, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var359), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var372), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8000,4 +8236,11 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan }) } +func filterTitle(ctx context.Context, f StatusFilter) string { + if f.Active { + return i18n.T(ctx, "monitors.filter_clear") + } + return i18n.T(ctx, "monitors.filter_show", "Status", i18n.T(ctx, "status."+string(f.Status)), "Count", f.Count) +} + var _ = templruntime.GeneratedTemplate -- 2.54.1 From 4cde0f7e5617de6307e18e489d3e5d14cbeb1215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Wed, 25 Nov 2026 23:19:27 +0100 Subject: [PATCH 2/4] feat(console): add or remove all monitors of a status page, skip signup when signed in The status page editor gets "Add all" and "Remove all" above its monitor list. Opening the signup page while signed in leads to the monitor list, as the login page already did. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3 --- internal/api/dashboard_filter_test.go | 28 + internal/api/pages.go | 5 + internal/i18n/locales/de.json | 2 + internal/i18n/locales/en.json | 2 + internal/web/assets/app.js | 9 + internal/web/statuspages.templ | 5 + internal/web/statuspages_templ.go | 793 +++++++++++++------------- 7 files changed, 463 insertions(+), 381 deletions(-) diff --git a/internal/api/dashboard_filter_test.go b/internal/api/dashboard_filter_test.go index d30ec1f..a367188 100644 --- a/internal/api/dashboard_filter_test.go +++ b/internal/api/dashboard_filter_test.go @@ -55,3 +55,31 @@ func TestDashboardFiltersByStatus(t *testing.T) { t.Error("an unknown status filter hides monitors") } } + +func TestSignupSendsSignedInUsersToTheMonitors(t *testing.T) { + e := newEnv(t) + visitor := e.browser(t) + if st, path, _ := visitor.page("/signup"); st != http.StatusOK || path != "/signup" { + t.Fatalf("signup for a visitor = %d at %s", st, path) + } + owner := e.browser(t) + owner.signup("o@"+uniq("su")+".test", uniq("su-")) + if st, path, html := owner.page("/signup"); st != http.StatusOK || path != "/" || !strings.Contains(html, "Monitors") { + t.Errorf("signup when signed in ended at %s (%d), want the monitor list", path, st) + } +} + +func TestPageEditorOffersAddAndRemoveAll(t *testing.T) { + e := newEnv(t) + _, region := e.platformChecker(t, uniq("eu-")) + owner := e.browser(t) + owner.signup("o@"+uniq("pa")+".test", uniq("pa-")) + owner.do("POST", "/api/v1/org/monitors", map[string]any{"name": "Shop", "type": "http", "target": "https://shop.test", "interval_seconds": 60, "regions": []string{region}}) + _, p := owner.do("POST", "/api/v1/org/statuspages", map[string]any{"slug": uniq("pa-"), "title": "Status"}) + _, _, html := owner.page("/statuspages/" + p["id"].(string)) + for _, want := range []string{`data-check-all="on"`, `data-check-all="off"`, "Add all", "Remove all"} { + if !strings.Contains(html, want) { + t.Errorf("the page editor lacks %q", want) + } + } +} diff --git a/internal/api/pages.go b/internal/api/pages.go index 21e4cb8..0079d96 100644 --- a/internal/api/pages.go +++ b/internal/api/pages.go @@ -122,6 +122,11 @@ func (s *Server) signupOptions(ctx context.Context) (bool, []web.IDPButton, erro } func (s *Server) signupPage(c *gin.Context) { + // Signed in already: straight to the monitors. + if auth.Current(c) != nil { + c.Redirect(http.StatusSeeOther, "/") + return + } email, providers, err := s.signupOptions(c.Request.Context()) if err != nil { internalError(c, err) diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index 0528950..8a3f293 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -1290,6 +1290,8 @@ "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.monitors_all": "Alle hinzufügen", + "pages.monitors_none": "Alle entfernen", "pages.no_group": "Ohne Gruppe", "pages.open": "Öffnen", "pages.own_servers": "Die Statusseiten dieser Organisation liefern nur ihre eigenen Statusseiten-Server aus, nicht die der Plattform. Ruf sie über die Adresse deiner Server auf oder verbinde eine eigene Domain, die auf sie zeigt.", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index 4b0d5f8..e39a590 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -1290,6 +1290,8 @@ "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.monitors_all": "Add all", + "pages.monitors_none": "Remove all", "pages.no_group": "No group", "pages.open": "Open", "pages.own_servers": "Your organization's own status page servers serve its pages; the platform's do not. Open them at the address of your servers or connect a custom domain pointing at them.", diff --git a/internal/web/assets/app.js b/internal/web/assets/app.js index 347894d..5bec5f5 100644 --- a/internal/web/assets/app.js +++ b/internal/web/assets/app.js @@ -186,6 +186,15 @@ navToggle.setAttribute("aria-expanded", String(open)); return; } + // Ticks or clears every checkbox named by data-check-all in its form. + const checkAll = ev.target.closest("[data-check-all]"); + if (checkAll) { + const on = checkAll.dataset.checkAll === "on"; + checkAll.closest("form")?.querySelectorAll(checkAll.dataset.checkTarget).forEach((box) => { + box.checked = on; + }); + return; + } const locale = ev.target.closest("[data-locale]"); if (locale) { await api.post("/locale", { locale: locale.dataset.locale }).catch(() => {}); diff --git a/internal/web/statuspages.templ b/internal/web/statuspages.templ index d2d787a..8b6784c 100644 --- a/internal/web/statuspages.templ +++ b/internal/web/statuspages.templ @@ -272,6 +272,11 @@ templ StatusPageEditor(p Page, me Me, e PageEditor) { @formError() if len(e.Monitors) == 0 {

{ i18n.T(ctx, "console.monitors.empty") }

+ } else { +

+ + +

}
    for _, m := range e.Monitors { diff --git a/internal/web/statuspages_templ.go b/internal/web/statuspages_templ.go index c576aab..8f14964 100644 --- a/internal/web/statuspages_templ.go +++ b/internal/web/statuspages_templ.go @@ -1479,188 +1479,219 @@ 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, 122, "
      ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - for _, m := range e.Monitors { - 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 } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "
    ") + 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_Var79 string + templ_7745c5c3_Var79, 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: 286, Col: 24} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if m.MonitorGroupPath != "" { + 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.MonitorGroupPath) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 288, Col: 74} + } + _, 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 + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "
    • ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "
    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1668,7 +1699,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, 143, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "
    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1676,46 +1707,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, 144, "

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

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var88 string - templ_7745c5c3_Var88, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/statuspages/" + e.ID).Resolve(ctx) + 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: 306, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 310, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var88) + _, 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, 147, "\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1731,108 +1762,108 @@ 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, 148, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.Domain != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "
    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.DomainVerified { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "

    ● ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "

    ● ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } switch e.VerifiedBy { case "cname": - var templ_7745c5c3_Var89 string - templ_7745c5c3_Var89, 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: 318, Col: 58} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - case "txt": - var templ_7745c5c3_Var90 string - templ_7745c5c3_Var90, 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: 320, Col: 56} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - default: var templ_7745c5c3_Var91 string - templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_step_verified")) + 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: 322, Col: 54} + 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 } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "

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

    ") - 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_missing", "Since", e.MissingSince, "Date", e.SwitchOffAt)) + templ_7745c5c3_Var92, 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: 326, Col: 146} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 325, Col: 56} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "

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

    ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } + default: var templ_7745c5c3_Var93 string - templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_keep")) + templ_7745c5c3_Var93, 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: 328, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 327, Col: 54} } _, 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, 155, "

    ") + } + 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 + } + 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)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 331, Col: 146} + } + _, 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, "

    ") + 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")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 333, Col: 73} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } } else if e.CNAMEValue != "" && !e.OwnServers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "

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

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var94 string - templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.domain_cname_step")) + var templ_7745c5c3_Var96 string + templ_7745c5c3_Var96, 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: 331, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 336, Col: 51} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94)) + _, 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, 157, "

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

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1844,62 +1875,32 @@ 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, 158, "
    ") - 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_alt_summary")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 335, Col: 116} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - 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_alt", "Target", e.CNAMEValue)) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 336, Col: 95} - } - _, 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 - } - templ_7745c5c3_Err = dnsRecordList("TXT", e.RecordName, e.RecordValue).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = verifyButton(e.ID, "pages.verify").Render(ctx, templ_7745c5c3_Buffer) - 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 - } - } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "

    ") + 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_step_verify")) + 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: 341, Col: 52} + 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, "

    ") + 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)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 341, Col: 95} + } + _, 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, "

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -1912,80 +1913,110 @@ 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, "
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "

    ") + 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")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 346, Col: 52} + } + _, 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, 166, "

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = dnsRecordList("TXT", e.RecordName, e.RecordValue).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = verifyButton(e.ID, "pages.verify").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } if e.OwnServers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "

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

    ") 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_step_cname_own")) + 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: 345, Col: 56} + 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_Var98)) + _, 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, 165, "

    ") + 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, 166, "

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

    ") 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_cname_unknown")) + var templ_7745c5c3_Var101 string + templ_7745c5c3_Var101, 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: 347, Col: 60} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 352, Col: 60} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "

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

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

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

    ") 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_apex")) + var templ_7745c5c3_Var102 string + templ_7745c5c3_Var102, 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: 349, Col: 72} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 354, Col: 72} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var100)) + _, 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, 169, "

    ") + 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, 170, "

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

    ") 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_tls", "Count", e.DomainChangesPerDay)) + var templ_7745c5c3_Var103 string + templ_7745c5c3_Var103, 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: 351, Col: 107} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 356, Col: 107} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) + _, 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, 171, "

    ") + 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, 172, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2016,59 +2047,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, 173, "
    ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var103 string - templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(kind) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 362, Col: 31} - } - _, 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, 174, "
    ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var104 string - templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(name) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 363, Col: 30} - } - _, 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, 175, "
    ") + 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(i18n.T(ctx, "pages.value")) + 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: 364, Col: 53} + 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, 176, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "
    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var106 string - templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(value) + templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 365, Col: 31} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 368, Col: 30} } _, 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, 177, "
    ") + 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) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 370, Col: 31} + } + _, 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, "
    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2093,46 +2124,46 @@ func verifyButton(pageID, label string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } -- 2.54.1 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 3/4] 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)
") 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, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var89 string - templ_7745c5c3_Var89, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/statuspages/" + e.ID + "/domain").Resolve(ctx) + templ_7745c5c3_Var89, 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: 311, Col: 60} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/statuspages.templ`, Line: 315, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var89) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "\" data-method=\"put\" data-next=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "\" data-method=\"put\" data-next=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var91 string + templ_7745c5c3_Var91, 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: 316, Col: 115} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var91) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1762,83 +1783,65 @@ 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, 151, "
") + 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, 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 } -- 2.54.1 From b0d4bcc002438273282ba95defcd45a7c07bb510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Wed, 25 Nov 2026 23:35:02 +0100 Subject: [PATCH 4/4] feat(console): sort the monitor list and put monitors in an order of one's own The monitor list gets a sort switcher: the organization's own order, by default, or by name, status (problems first), uptime (worst first) or latency (slowest first). The choice is remembered in a cookie; paging follows it. "Arrange monitors" shows the whole tree with each group's monitors to drag, or move with up and down, into the order wanted; every change is saved at once through PUT /api/v1/org/monitors/order, which needs write access to every monitor given and is audited. Monitors without a position follow the positioned ones, by name. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3 --- internal/api/apidocs.go | 3 + internal/api/audit.go | 1 + internal/api/console.go | 100 +- internal/api/dashboard_filter_test.go | 66 + internal/api/monitororder.go | 66 + internal/api/server.go | 1 + internal/i18n/locales/de.json | 12 + internal/i18n/locales/en.json | 12 + .../migrations/sql/00054_monitor_position.sql | 7 + internal/store/models.go | 1 + internal/store/monitors.sql.go | 35 +- internal/store/querier.go | 1 + internal/store/queries/monitors.sql | 3 + internal/web/assets/app.js | 49 + internal/web/monitors.templ | 86 +- internal/web/monitors_templ.go | 5599 +++++++++-------- 16 files changed, 3389 insertions(+), 2653 deletions(-) create mode 100644 internal/api/monitororder.go create mode 100644 internal/migrations/sql/00054_monitor_position.sql diff --git a/internal/api/apidocs.go b/internal/api/apidocs.go index 96c237f..19a0691 100644 --- a/internal/api/apidocs.go +++ b/internal/api/apidocs.go @@ -90,6 +90,9 @@ var endpoints = []endpoint{ {method: "POST", path: "/api/v1/org/monitors", tag: "Monitors", summary: "Create a monitor", description: "`type` is one of http, json, prometheus, tcp, tls, dns, icmp, postgres, mysql, mssql, mongodb, redis, mqtt, kafka, rabbitmq, grpc, smtp, radius, snmp, steam, minecraft, docker, heartbeat or alertmanager (GET /api/v1/org/check-types lists those offered); `config` depends on it (see HTTPConfig, JSONConfig, PrometheusConfig, DNSConfig, TLSConfig, DBConfig, BrokerConfig, GRPCConfig, SMTPConfig, RADIUSConfig, SNMPConfig, GameConfig, DockerConfig, HeartbeatConfig, AlertmanagerConfig). Passwords, RADIUS secrets and SNMP communities are stored encrypted and never returned: `secrets_set` names those set, and an update that leaves one empty keeps it. Heartbeat and alertmanager monitors take neither target nor regions; heartbeats return their `ping_url`. Omit `alert_group_ids` to assign the default alert group; an empty array disables notifications.", perm: "monitors.write", req: monitorRequest{}, status: http.StatusCreated, resp: monitorView{}}, + {method: "PUT", path: "/api/v1/org/monitors/order", tag: "Monitors", summary: "Put monitors in the organization's own order", perm: "monitors.write", + description: "Positions follow the order of monitor_ids, usually the monitors of one group; the monitor list sorted by its own order shows positioned monitors first, the rest by name. Needs write access to every monitor given.", + req: monitorOrderRequest{}}, {method: "PUT", path: "/api/v1/org/monitors/:id", tag: "Monitors", summary: "Change a monitor", perm: "monitors.write", description: "Omitting alert_group_ids preserves existing assignments; an empty array removes all alert groups.", req: monitorRequest{}, resp: monitorView{}}, diff --git a/internal/api/audit.go b/internal/api/audit.go index 2191ac2..822192b 100644 --- a/internal/api/audit.go +++ b/internal/api/audit.go @@ -64,6 +64,7 @@ var auditActions = map[string]string{ "PUT /api/v1/org/policy": "org.policy_update", "POST /api/v1/org/monitors": "monitor.create", "PUT /api/v1/org/monitors/:id": "monitor.update", + "PUT /api/v1/org/monitors/order": "monitor.order", "DELETE /api/v1/org/monitors/:id": "monitor.delete", "POST /api/v1/org/alertmanager/receivers": "alertmanager.receiver_create", "DELETE /api/v1/org/alertmanager/receivers/:id": "alertmanager.receiver_delete", diff --git a/internal/api/console.go b/internal/api/console.go index cca61ac..aa82529 100644 --- a/internal/api/console.go +++ b/internal/api/console.go @@ -6,6 +6,7 @@ import ( "encoding/json" "errors" "fmt" + "math" "net" "net/http" "net/url" @@ -79,10 +80,10 @@ func (s *Server) dashboard(c *gin.Context) { } v.Root = buildGroupNodes(data.tree, data.rows) v.Empty = len(data.rows) == 0 && len(v.Root.Children) == 0 + v.CanWrite = writableAnywhere(p, data.tree) if !s.dashboardPage(c, &v, data) { return } - v.CanWrite = writableAnywhere(p, data.tree) v.Range = data.rng.Key var earliest time.Time for _, m := range data.byID { @@ -113,14 +114,64 @@ const groupMonitorsShown = 50 // ungrouped names the pseudo-group of monitors outside any group. const ungrouped = "none" -func monitorKey(m web.MonitorRow) cursor { - id, _ := uuid.Parse(m.ID) - return cursor{S: strings.ToLower(m.Name), ID: id} +// monitorSort is an order of the monitor list: the organization's own, +// or by name, status (problems first), uptime (worst first) or latency +// (slowest first). Monitors without a position or data come last. +type monitorSort string + +var monitorSorts = []monitorSort{"custom", "name", "status", "uptime", "latency"} + +const sortCookie = "monitor_sort" + +// sortOf returns the order asked for, remembering it in a cookie, or the +// one remembered, or the organization's own. +func sortOf(c *gin.Context) monitorSort { + if q := monitorSort(c.Query("sort")); slices.Contains(monitorSorts, q) { + c.SetSameSite(http.SameSiteLaxMode) + c.SetCookie(sortCookie, string(q), 365*24*3600, "/", "", c.Request.TLS != nil, true) + return q + } + if v, err := c.Cookie(sortCookie); err == nil && slices.Contains(monitorSorts, monitorSort(v)) { + return monitorSort(v) + } + return "custom" } -func sortMonitors(ms []web.MonitorRow) { +// key orders m by o as a string, so pages can continue after it. +func (o monitorSort) key(m web.MonitorRow) cursor { + id, _ := uuid.Parse(m.ID) + name := strings.ToLower(m.Name) + var k string + switch o { + case "name": + k = name + case "status": + k = fmt.Sprintf("%d|%s", statusRank[m.Status], name) + case "uptime": + if m.Ratio < 0 { + k = "1|" + name + } else { + k = fmt.Sprintf("0|%.9f|%s", m.Ratio, name) + } + case "latency": + if m.LatencyMS < 0 { + k = "1|" + name + } else { + k = fmt.Sprintf("0|%010d|%s", math.MaxInt32-m.LatencyMS, name) + } + default: + if m.Position < 0 { + k = "1|" + name + } else { + k = fmt.Sprintf("0|%010d|%s", m.Position, name) + } + } + return cursor{S: k, ID: id} +} + +func (o monitorSort) sort(ms []web.MonitorRow) { slices.SortFunc(ms, func(a, b web.MonitorRow) int { - ka, kb := monitorKey(a), monitorKey(b) + ka, kb := o.key(a), o.key(b) if c := strings.Compare(ka.S, kb.S); c != 0 { return c } @@ -135,7 +186,7 @@ var dashboardStatuses = []web.Status{web.StatusUp, web.StatusDegraded, web.Statu // value is empty, keeping the search and range but not the page. func dashboardURL(c *gin.Context, key, value string) string { q := url.Values{} - for _, k := range []string{"q", "range", "status"} { + for _, k := range []string{"q", "range", "status", "arrange"} { if v := c.Query(k); v != "" { q.Set(k, v) } @@ -176,6 +227,20 @@ func (s *Server) dashboardPage(c *gin.Context, v *web.DashboardView, data monito if !ok { return false } + order := sortOf(c) + v.Sort = string(order) + for _, o := range monitorSorts { + v.Sorts = append(v.Sorts, web.SortOption{Key: string(o), Active: o == order, URL: dashboardURL(c, "sort", string(o))}) + } + // Arranging by hand shows the whole tree in the organization's order. + arranging := order == "custom" && v.CanWrite && c.Query("q") == "" && c.Query("status") == "" && c.Query("group") == "" + v.Arrange = arranging && c.Query("arrange") == "1" + if arranging { + v.ArrangeURL = dashboardURL(c, "arrange", "1") + if v.Arrange { + v.ArrangeURL = dashboardURL(c, "arrange", "") + } + } link := func(group string) string { q := url.Values{"group": {group}} if r := c.Query("range"); r != "" { @@ -185,8 +250,8 @@ func (s *Server) dashboardPage(c *gin.Context, v *web.DashboardView, data monito } var capNode func(n *web.GroupNode) capNode = func(n *web.GroupNode) { - sortMonitors(n.Monitors) - if len(n.Monitors) > groupMonitorsShown { + order.sort(n.Monitors) + if len(n.Monitors) > groupMonitorsShown && !v.Arrange { n.More = len(n.Monitors) - groupMonitorsShown n.Monitors = n.Monitors[:groupMonitorsShown] n.MoreURL = link(cmp.Or(n.ID, ungrouped)) @@ -213,8 +278,8 @@ func (s *Server) dashboardPage(c *gin.Context, v *web.DashboardView, data monito hits = append(hits, m) } } - sortMonitors(hits) - v.Results, info = pageSlice(hits, pg, monitorKey) + order.sort(hits) + v.Results, info = pageSlice(hits, pg, order.key) case group != "": var focus web.GroupNode found := false @@ -239,8 +304,8 @@ func (s *Server) dashboardPage(c *gin.Context, v *web.DashboardView, data monito c.Redirect(http.StatusSeeOther, "/") return false } - sortMonitors(focus.Monitors) - focus.Monitors, info = pageSlice(focus.Monitors, pg, monitorKey) + order.sort(focus.Monitors) + focus.Monitors, info = pageSlice(focus.Monitors, pg, order.key) for i := range focus.Children { capNode(&focus.Children[i]) } @@ -448,7 +513,10 @@ func (s *Server) loadMonitorData(ctx context.Context, p *principal, rng web.Time continue } d.byID[m.ID] = m - row := web.MonitorRow{ID: m.ID.String(), Name: m.Name, Type: m.Type, Target: m.Target, Latency: "–", Uptime: "–"} + row := web.MonitorRow{ID: m.ID.String(), Name: m.Name, Type: m.Type, Target: m.Target, Latency: "–", Uptime: "–", Position: -1, LatencyMS: -1} + if m.Position != nil { + row.Position = int(*m.Position) + } keys := idStrings(regionsOf[m.ID]) if check.Passive(check.Type(m.Type)) { // The target of a heartbeat is its secret ping token. @@ -509,8 +577,10 @@ func (s *Server) loadMonitorData(ctx context.Context, p *principal, rng web.Time sum += l } row.Latency = fmt.Sprintf("%d ms", sum/int32(len(latencies))) + row.LatencyMS = int(sum / int32(len(latencies))) } - row.Uptime = web.SLAText(d.slaFor(m, rng.Window)) + row.Ratio = d.slaFor(m, rng.Window) + row.Uptime = web.SLAText(row.Ratio) row.Bars = web.UptimeBars(d.buckets[m.ID], now, rng.Bucket, rng.Bars(), rng.Layout) d.rows = append(d.rows, row) } diff --git a/internal/api/dashboard_filter_test.go b/internal/api/dashboard_filter_test.go index a367188..5202c51 100644 --- a/internal/api/dashboard_filter_test.go +++ b/internal/api/dashboard_filter_test.go @@ -83,3 +83,69 @@ func TestPageEditorOffersAddAndRemoveAll(t *testing.T) { } } } + +func TestMonitorOrder(t *testing.T) { + e := newEnv(t) + _, region := e.platformChecker(t, uniq("eu-")) + owner := e.browser(t) + owner.signup("o@"+uniq("ord")+".test", uniq("ord-")) + ids := map[string]string{} + for _, n := range []string{"Alpha", "Bravo", "Charlie"} { + _, m := owner.do("POST", "/api/v1/org/monitors", map[string]any{"name": n, "type": "http", "target": "https://" + strings.ToLower(n) + ".test", "interval_seconds": 60, "regions": []string{region}}) + ids[n] = m["id"].(string) + } + order := func(html string, names ...string) bool { + last := -1 + for _, n := range names { + i := strings.Index(html, ">"+n+"<") + if i < last || i < 0 { + return false + } + last = i + } + return true + } + + // Without an order of its own, by name. + if _, _, html := owner.page("/"); !order(html, "Alpha", "Bravo", "Charlie") { + t.Error("monitors without positions are not by name") + } + st, body := owner.do("PUT", "/api/v1/org/monitors/order", map[string]any{"monitor_ids": []string{ids["Charlie"], ids["Alpha"]}}) + if st != http.StatusNoContent { + t.Fatalf("order = %d %v", st, body) + } + // Positioned ones first, in their order; the rest after, by name. + _, _, html := owner.page("/") + if !order(html, "Charlie", "Alpha", "Bravo") { + t.Error("the list does not follow the organization's order") + } + if !strings.Contains(html, "?arrange=1") || !strings.Contains(html, "?sort=name") { + t.Error("the dashboard offers neither arranging nor sorting") + } + if _, _, arr := owner.page("/?arrange=1"); !strings.Contains(arr, `data-sortable="/org/monitors/order"`) || !strings.Contains(arr, `data-sort-id="`+ids["Charlie"]+`"`) { + t.Error("arranging does not show the sortable list") + } + + // Sorting by name is remembered until changed. + if _, _, byName := owner.page("/?sort=name"); !order(byName, "Alpha", "Bravo", "Charlie") { + t.Error("?sort=name does not sort by name") + } + if _, _, again := owner.page("/"); !order(again, "Alpha", "Bravo", "Charlie") || strings.Contains(again, "?arrange=1") { + t.Error("the sort order is not remembered, or arranging is offered outside the own order") + } + owner.page("/?sort=custom") + + // Unknown and duplicate monitors are refused, and nothing changes. + st, body = owner.do("PUT", "/api/v1/org/monitors/order", map[string]any{"monitor_ids": []string{ids["Bravo"], "00000000-0000-0000-0000-000000000001"}}) + expect(t, "unknown monitor", st, body, http.StatusUnprocessableEntity, "invalid_monitor") + st, body = owner.do("PUT", "/api/v1/org/monitors/order", map[string]any{"monitor_ids": []string{ids["Bravo"], ids["Bravo"]}}) + expect(t, "duplicate monitor", st, body, http.StatusUnprocessableEntity, "invalid_monitor") + if _, _, html := owner.page("/"); !order(html, "Charlie", "Alpha", "Bravo") { + t.Error("a refused order changed the list") + } + // Another organization cannot touch them. + other := e.browser(t) + other.signup("x@"+uniq("ord")+".test", uniq("ord-")) + st, body = other.do("PUT", "/api/v1/org/monitors/order", map[string]any{"monitor_ids": []string{ids["Alpha"]}}) + expect(t, "another organization's monitor", st, body, http.StatusUnprocessableEntity, "invalid_monitor") +} diff --git a/internal/api/monitororder.go b/internal/api/monitororder.go new file mode 100644 index 0000000..11f4523 --- /dev/null +++ b/internal/api/monitororder.go @@ -0,0 +1,66 @@ +package api + +import ( + "errors" + "net/http" + + "github.com/gin-gonic/gin" + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/authz" + "git.zb-server.de/ZB-Server/uptimesebi/internal/store" +) + +type monitorOrderRequest struct { + // MonitorIDs in the order wanted; usually the monitors of one group. + MonitorIDs []uuid.UUID `json:"monitor_ids" binding:"required,min=1,max=1000"` +} + +// orderMonitors stores the organization's own order of the monitors given, +// which the monitor list follows when sorted by its own order. It needs +// write access to every one of them. +func (s *Server) orderMonitors(c *gin.Context) { + var req monitorOrderRequest + if !bind(c, &req) { + return + } + p := current(c) + ctx := c.Request.Context() + t, err := s.loadGroupTree(ctx, p.scope()) + if err != nil { + internalError(c, err) + return + } + errDenied := errors.New("denied") + seen := map[uuid.UUID]bool{} + err = s.db.Tx(ctx, p.scope(), func(q *store.Queries) error { + for i, id := range req.MonitorIDs { + if seen[id] { + return pgx.ErrNoRows + } + seen[id] = true + m, err := q.GetMonitor(ctx, id) + if err != nil { + return err + } + if !canInGroup(p, authz.MonitorsWrite, t, m.GroupID) { + return errDenied + } + if _, err := q.SetMonitorPosition(ctx, store.SetMonitorPositionParams{ID: id, Position: new(int32(i))}); err != nil { + return err + } + } + return nil + }) + switch { + case errors.Is(err, errDenied): + fail(c, http.StatusForbidden, "forbidden") + case errors.Is(err, pgx.ErrNoRows): + fail(c, http.StatusUnprocessableEntity, "invalid_monitor") + case err != nil: + internalError(c, err) + default: + c.Status(http.StatusNoContent) + } +} diff --git a/internal/api/server.go b/internal/api/server.go index d608b0b..c9ccbca 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -156,6 +156,7 @@ func (s *Server) Mount(r gin.IRouter) { // scoped to a group grant access below that group only. org.GET("/monitors", s.listMonitors) org.POST("/monitors", s.createMonitor) + org.PUT("/monitors/order", s.orderMonitors) org.PUT("/monitors/:id", s.updateMonitor) org.DELETE("/monitors/:id", s.deleteMonitor) org.GET("/monitors/:id/evidence", s.listEvidence) diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index 0731453..6febd01 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -107,6 +107,7 @@ "audit.action.member.role_unassign": "Rolle entzogen", "audit.action.monitor.create": "Monitor erstellt", "audit.action.monitor.delete": "Monitor gelöscht", + "audit.action.monitor.order": "Monitore angeordnet", "audit.action.monitor.update": "Monitor geändert", "audit.action.org.check_types_update": "Check-Typen geändert", "audit.action.org.create": "Organisation angelegt", @@ -1021,6 +1022,9 @@ "monitors.alertmanager_hint": "Ausgefallen, solange ein Alert feuert, der alle Matcher erfüllt. Alerts kommen über einen Empfänger:", "monitors.all": "Alle Monitore", "monitors.all_results": "Alle Ergebnisse", + "monitors.arrange": "Monitore anordnen", + "monitors.arrange_done": "Anordnen beenden", + "monitors.arrange_hint": "Zieh die Monitore oder verschieb sie mit ↑ und ↓ in die gewünschte Reihenfolge innerhalb ihrer Gruppe. Jede Änderung wird sofort gespeichert und gilt für alle in der Organisation.", "monitors.assertion_op": "Operator", "monitors.assertion_path": "Pfad", "monitors.assertion_value": "Wert", @@ -1099,6 +1103,8 @@ "monitors.minecraft_edition": "Edition", "monitors.minecraft_hint": "Ziel ist host:port (Java meist 25565, Bedrock 19132). Pingt den Server wie die Serverliste im Spiel.", "monitors.minecraft_java": "Java Edition", + "monitors.move_down": "{{.Name}} nach unten", + "monitors.move_up": "{{.Name}} nach oben", "monitors.new": "Neuer Monitor", "monitors.no_data_since": "keine Daten seit {{.Time}}", "monitors.no_match": "Kein Monitor gefunden.", @@ -1154,6 +1160,12 @@ "monitors.snmp_oid": "OID", "monitors.snmp_value": "Wert", "monitors.snmp_version": "Version", + "monitors.sort": "Sortierung", + "monitors.sort_custom": "eigene Reihenfolge", + "monitors.sort_latency": "Latenz", + "monitors.sort_name": "Name", + "monitors.sort_status": "Status", + "monitors.sort_uptime": "Uptime", "monitors.stale_hours": "Verfällt nach (Stunden)", "monitors.stale_hours_hint": "Ein feuernder Alert, den Alertmanager nicht mehr wiederholt, gilt nach dieser Zeit als beendet. Halte sie über repeat_interval.", "monitors.steam_hint": "Ziel ist host:port des Query-Ports (meist der Spielport, z. B. 27015). Fragt den Server wie der Steam-Serverbrowser nach seinen Infos (A2S); funktioniert für Source- und die meisten Steam-Spiele.", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index f529bbd..b60a962 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -107,6 +107,7 @@ "audit.action.member.role_unassign": "Role removed", "audit.action.monitor.create": "Monitor created", "audit.action.monitor.delete": "Monitor deleted", + "audit.action.monitor.order": "Monitors put in order", "audit.action.monitor.update": "Monitor changed", "audit.action.org.check_types_update": "Check types changed", "audit.action.org.create": "Organization created", @@ -1021,6 +1022,9 @@ "monitors.alertmanager_hint": "Down while an alert matching all matchers fires. Alerts arrive through a receiver:", "monitors.all": "All monitors", "monitors.all_results": "All results", + "monitors.arrange": "Arrange monitors", + "monitors.arrange_done": "Done arranging", + "monitors.arrange_hint": "Drag the monitors, or move them with ↑ and ↓, into the order you want within each group. Every change is saved at once and is the same for everybody in the organization.", "monitors.assertion_op": "Operator", "monitors.assertion_path": "Path", "monitors.assertion_value": "Value", @@ -1099,6 +1103,8 @@ "monitors.minecraft_edition": "Edition", "monitors.minecraft_hint": "Target is host:port (Java usually 25565, Bedrock 19132). Pings the server like the in-game server list.", "monitors.minecraft_java": "Java Edition", + "monitors.move_down": "Move {{.Name}} down", + "monitors.move_up": "Move {{.Name}} up", "monitors.new": "New monitor", "monitors.no_data_since": "no data since {{.Time}}", "monitors.no_match": "No monitor matches.", @@ -1154,6 +1160,12 @@ "monitors.snmp_oid": "OID", "monitors.snmp_value": "Value", "monitors.snmp_version": "Version", + "monitors.sort": "Sort order", + "monitors.sort_custom": "own order", + "monitors.sort_latency": "latency", + "monitors.sort_name": "name", + "monitors.sort_status": "status", + "monitors.sort_uptime": "uptime", "monitors.stale_hours": "Stale after (hours)", "monitors.stale_hours_hint": "A firing alert Alertmanager stops repeating counts as over after this time. Keep it above repeat_interval.", "monitors.steam_hint": "Target is host:port of the query port (usually the game port, e.g. 27015). Asks the server for its info like the Steam server browser (A2S); works for Source and most Steam games.", diff --git a/internal/migrations/sql/00054_monitor_position.sql b/internal/migrations/sql/00054_monitor_position.sql new file mode 100644 index 0000000..dc0ffd6 --- /dev/null +++ b/internal/migrations/sql/00054_monitor_position.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- The organization's own order of its monitors on the monitor list, within +-- each group; NULL sorts after positioned monitors, by name. +ALTER TABLE monitors ADD COLUMN position integer; + +-- +goose Down +ALTER TABLE monitors DROP COLUMN position; diff --git a/internal/store/models.go b/internal/store/models.go index b7f7c03..301c5ed 100644 --- a/internal/store/models.go +++ b/internal/store/models.go @@ -257,6 +257,7 @@ type Monitor struct { UpdatedAt time.Time Confirmations int32 GroupID *uuid.UUID + Position *int32 } type MonitorAlertGroup struct { diff --git a/internal/store/monitors.sql.go b/internal/store/monitors.sql.go index 0a5e9a8..3e8a6e7 100644 --- a/internal/store/monitors.sql.go +++ b/internal/store/monitors.sql.go @@ -58,7 +58,7 @@ func (q *Queries) AllMonitorRegions(ctx context.Context) ([]AllMonitorRegionsRow const createMonitor = `-- name: CreateMonitor :one INSERT INTO monitors (org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, confirmations, group_id) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) -RETURNING id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id +RETURNING id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id, position ` type CreateMonitorParams struct { @@ -102,6 +102,7 @@ func (q *Queries) CreateMonitor(ctx context.Context, arg CreateMonitorParams) (M &i.UpdatedAt, &i.Confirmations, &i.GroupID, + &i.Position, ) return i, err } @@ -128,7 +129,7 @@ func (q *Queries) DeleteMonitorRegions(ctx context.Context, monitorID uuid.UUID) } const getMonitor = `-- name: GetMonitor :one -SELECT id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id FROM monitors WHERE id = $1 +SELECT id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id, position FROM monitors WHERE id = $1 ` func (q *Queries) GetMonitor(ctx context.Context, id uuid.UUID) (Monitor, error) { @@ -148,6 +149,7 @@ func (q *Queries) GetMonitor(ctx context.Context, id uuid.UUID) (Monitor, error) &i.UpdatedAt, &i.Confirmations, &i.GroupID, + &i.Position, ) return i, err } @@ -190,7 +192,7 @@ func (q *Queries) ListEnabledMonitorsForSchedule(ctx context.Context) ([]ListEna } const listMonitors = `-- name: ListMonitors :many -SELECT id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id FROM monitors ORDER BY name +SELECT id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id, position FROM monitors ORDER BY name ` func (q *Queries) ListMonitors(ctx context.Context) ([]Monitor, error) { @@ -216,6 +218,7 @@ func (q *Queries) ListMonitors(ctx context.Context) ([]Monitor, error) { &i.UpdatedAt, &i.Confirmations, &i.GroupID, + &i.Position, ); err != nil { return nil, err } @@ -228,7 +231,7 @@ func (q *Queries) ListMonitors(ctx context.Context) ([]Monitor, error) { } const listMonitorsPage = `-- name: ListMonitorsPage :many -SELECT id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id FROM monitors +SELECT id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id, position FROM monitors WHERE true AND ($1::text IS NULL OR (name, id) > ($1, $2::uuid)) AND ($3::text IS NULL OR (name, id) < ($3, $4::uuid)) @@ -277,6 +280,7 @@ func (q *Queries) ListMonitorsPage(ctx context.Context, arg ListMonitorsPagePara &i.UpdatedAt, &i.Confirmations, &i.GroupID, + &i.Position, ); err != nil { return nil, err } @@ -313,7 +317,7 @@ func (q *Queries) MonitorRegions(ctx context.Context, monitorID uuid.UUID) ([]uu } const monitorsForJobs = `-- name: MonitorsForJobs :many -SELECT m.id, m.org_id, m.name, m.type, m.target, m.interval_seconds, m.timeout_ms, m.config, m.enabled, m.created_at, m.updated_at, m.confirmations, m.group_id FROM monitors m +SELECT m.id, m.org_id, m.name, m.type, m.target, m.interval_seconds, m.timeout_ms, m.config, m.enabled, m.created_at, m.updated_at, m.confirmations, m.group_id, m.position FROM monitors m JOIN monitor_regions r ON r.monitor_id = m.id AND r.region_id = $1 JOIN orgs o ON o.id = m.org_id AND o.suspended_at IS NULL WHERE m.id = ANY ($2::uuid[]) AND m.enabled @@ -352,6 +356,7 @@ func (q *Queries) MonitorsForJobs(ctx context.Context, arg MonitorsForJobsParams &i.UpdatedAt, &i.Confirmations, &i.GroupID, + &i.Position, ); err != nil { return nil, err } @@ -419,11 +424,28 @@ func (q *Queries) MonitorsForResults(ctx context.Context, arg MonitorsForResults return items, nil } +const setMonitorPosition = `-- name: SetMonitorPosition :execrows +UPDATE monitors SET position = $1 WHERE id = $2 +` + +type SetMonitorPositionParams struct { + Position *int32 + ID uuid.UUID +} + +func (q *Queries) SetMonitorPosition(ctx context.Context, arg SetMonitorPositionParams) (int64, error) { + result, err := q.db.Exec(ctx, setMonitorPosition, arg.Position, arg.ID) + if err != nil { + return 0, err + } + return result.RowsAffected(), nil +} + const updateMonitor = `-- name: UpdateMonitor :one UPDATE monitors SET name = $2, type = $3, target = $4, interval_seconds = $5, timeout_ms = $6, config = $7, enabled = $8, confirmations = $9, group_id = $10, updated_at = now() WHERE id = $1 -RETURNING id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id +RETURNING id, org_id, name, type, target, interval_seconds, timeout_ms, config, enabled, created_at, updated_at, confirmations, group_id, position ` type UpdateMonitorParams struct { @@ -467,6 +489,7 @@ func (q *Queries) UpdateMonitor(ctx context.Context, arg UpdateMonitorParams) (M &i.UpdatedAt, &i.Confirmations, &i.GroupID, + &i.Position, ) return i, err } diff --git a/internal/store/querier.go b/internal/store/querier.go index af1209d..38cb0b3 100644 --- a/internal/store/querier.go +++ b/internal/store/querier.go @@ -358,6 +358,7 @@ type Querier interface { ServablePages(ctx context.Context, agentOrg *uuid.UUID) ([]ServablePagesRow, error) SetAgentAllowPrivate(ctx context.Context, arg SetAgentAllowPrivateParams) (int64, error) SetIncidentTitle(ctx context.Context, arg SetIncidentTitleParams) (int64, error) + SetMonitorPosition(ctx context.Context, arg SetMonitorPositionParams) (int64, error) SetOrgDisabledCheckTypes(ctx context.Context, arg SetOrgDisabledCheckTypesParams) error SetOrgLimits(ctx context.Context, arg SetOrgLimitsParams) (SetOrgLimitsRow, error) SetOwner(ctx context.Context, arg SetOwnerParams) (int64, error) diff --git a/internal/store/queries/monitors.sql b/internal/store/queries/monitors.sql index 7590c87..c2e4b52 100644 --- a/internal/store/queries/monitors.sql +++ b/internal/store/queries/monitors.sql @@ -72,3 +72,6 @@ ORDER BY CASE WHEN sqlc.narg(before_s)::text IS NULL THEN id END, name DESC, id DESC LIMIT sqlc.arg(max_rows); + +-- name: SetMonitorPosition :execrows +UPDATE monitors SET position = sqlc.arg(position) WHERE id = sqlc.arg(id); diff --git a/internal/web/assets/app.js b/internal/web/assets/app.js index 5bec5f5..80ea120 100644 --- a/internal/web/assets/app.js +++ b/internal/web/assets/app.js @@ -178,6 +178,43 @@ } }); + // Saves the order of a list of monitors being arranged. + const saveOrder = async (list) => { + const ids = [...list.querySelectorAll(":scope > [data-sort-id]")].map((li) => li.dataset.sortId); + try { + await api.put(list.dataset.sortable, { monitor_ids: ids }); + } catch (err) { + alert(message(err)); + location.reload(); + } + }; + let dragged = null; + document.addEventListener("dragstart", (ev) => { + const item = ev.target.closest?.("[data-sortable] > [data-sort-id]"); + if (!item) return; + dragged = item; + ev.dataTransfer.effectAllowed = "move"; + item.style.opacity = "0.5"; + }); + document.addEventListener("dragover", (ev) => { + const over = ev.target.closest?.("[data-sortable] > [data-sort-id]"); + if (!dragged || !over || over === dragged || over.parentElement !== dragged.parentElement) return; + ev.preventDefault(); + const box = over.getBoundingClientRect(); + if (ev.clientY < box.top + box.height / 2) over.before(dragged); + else over.after(dragged); + }); + document.addEventListener("drop", (ev) => { + if (dragged) ev.preventDefault(); + }); + document.addEventListener("dragend", async () => { + if (!dragged) return; + const list = dragged.parentElement; + dragged.style.opacity = ""; + dragged = null; + await saveOrder(list); + }); + document.addEventListener("click", async (ev) => { const navToggle = ev.target.closest("[data-nav-toggle]"); if (navToggle) { @@ -186,6 +223,18 @@ navToggle.setAttribute("aria-expanded", String(open)); return; } + // Moves a monitor up or down while arranging the monitor list. + const move = ev.target.closest("[data-sort-move]"); + if (move) { + const item = move.closest("[data-sort-id]"); + const other = move.dataset.sortMove === "up" ? item.previousElementSibling : item.nextElementSibling; + if (!other) return; + if (move.dataset.sortMove === "up") other.before(item); + else other.after(item); + move.focus(); + await saveOrder(item.closest("[data-sortable]")); + return; + } // Ticks or clears every checkbox named by data-check-all in its form. const checkAll = ev.target.closest("[data-check-all]"); if (checkAll) { diff --git a/internal/web/monitors.templ b/internal/web/monitors.templ index cce770c..6352bb9 100644 --- a/internal/web/monitors.templ +++ b/internal/web/monitors.templ @@ -31,6 +31,11 @@ type MonitorRow struct { // Unchecked is set when no region has reported recently: nobody is // checking the monitor. Unchecked bool + // Position is the organization's own order, -1 when not set; Ratio + // the uptime in the range, -1 without data; LatencyMS -1 without data. + Position int + Ratio float64 + LatencyMS int } // GroupNode is a monitor group with its monitors and subgroups. @@ -72,6 +77,13 @@ type DashboardView struct { Filter Status // AllURL leaves the status filter, keeping the search and range. AllURL string + // Sorts switch the order of the list; Sort is the active one. + Sorts []SortOption + Sort string + // Arrange shows the tree for putting monitors in order by hand; + // ArrangeURL turns it on or off, empty when not offered. + Arrange bool + ArrangeURL string Range string Ranges []RangeOption // Unchecked counts the monitors no region has reported for recently. @@ -80,6 +92,13 @@ type DashboardView struct { DeadRegions []DeadRegion } +// SortOption is an entry of the sort switcher. +type SortOption struct { + Key string + URL string + Active bool +} + // StatusFilter is one status count; URL shows only its monitors, or all // again when it is the active filter. type StatusFilter struct { @@ -179,6 +198,7 @@ templ Dashboard(p Page, me Me, v DashboardView) {

{ i18n.T(ctx, "console.monitors.title") }

@rangeSwitch(v.Ranges) + @sortSwitch(v.Sorts)
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1081,38 +1127,86 @@ func Dashboard(p Page, me Me, v DashboardView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "

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

") 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, "monitors.range_note", "Range", v.Range)) + var templ_7745c5c3_Var52 string + templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.range_note", "Range", v.Range)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 277, Col: 104} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 300, Col: 104} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) + _, 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, 86, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var52 string - templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.manage")) + var templ_7745c5c3_Var53 string + templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.manage")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 279, Col: 108} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 303, Col: 85} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52)) + _, 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, 88, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if v.ArrangeURL != "" { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if v.Arrange { + var templ_7745c5c3_Var55 string + templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.arrange_done")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 307, Col: 44} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + var templ_7745c5c3_Var56 string + templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.arrange")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 309, Col: 39} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1144,25 +1238,25 @@ func monitorList(ms []MonitorRow) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if len(ms) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1304,33 +1398,33 @@ func moreLink(g GroupNode) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if g.More > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "\" class=\"block border-b border-rule py-2.5 text-sm text-muted hover:text-ink\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var63 string - templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.show_all", "Count", g.More+len(g.Monitors))) + var templ_7745c5c3_Var67 string + templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.show_all", "Count", g.More+len(g.Monitors))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 313, Col: 182} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 347, Col: 182} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, " →") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, " →") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1341,7 +1435,7 @@ func moreLink(g GroupNode) templ.Component { // groupBlock renders a group and, recursively, its subgroups.
// makes groups collapsible without JavaScript. -func groupBlock(g GroupNode) templ.Component { +func groupBlock(g GroupNode, arrange bool) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -1358,7 +1452,7 @@ func groupBlock(g GroupNode) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1366,37 +1460,37 @@ func groupBlock(g GroupNode) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var65 string - templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) + var templ_7745c5c3_Var69 string + templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 323, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 357, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var66 string - templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(g.Total)) + var templ_7745c5c3_Var70 string + templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(g.Total)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 324, Col: 81} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 358, Col: 81} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = monitorList(g.Monitors).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = treeList(g.Monitors, arrange).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1405,12 +1499,12 @@ func groupBlock(g GroupNode) templ.Component { return templ_7745c5c3_Err } for _, c := range g.Children { - templ_7745c5c3_Err = groupBlock(c).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = groupBlock(c, arrange).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1500,7 +1594,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var68 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var72 := 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 { @@ -1512,20 +1606,20 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "

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

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var69 string - templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.title")) + var templ_7745c5c3_Var73 string + templ_7745c5c3_Var73, 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: 403, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 437, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1533,133 +1627,133 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var70 string - templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Name) + var templ_7745c5c3_Var74 string + templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 408, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 442, Col: 43} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var71 string - templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type_"+v.Row.Type)) + var templ_7745c5c3_Var75 string + templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type_"+v.Row.Type)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 411, Col: 47} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 445, Col: 47} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.Row.Target != "" { - var templ_7745c5c3_Var72 string - templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Row.Target) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 413, Col: 29} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - var templ_7745c5c3_Var73 string - templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Interval) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 415, Col: 26} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var75 string - templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 419, Col: 173} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - if v.Row.Unchecked { - 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, "monitors.unchecked_banner", "Count", 1)) + templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Row.Target) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 423, Col: 126} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 447, Col: 29} } _, 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, 124, "

") + 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 - } var templ_7745c5c3_Var77 string - templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.history", "Range", v.Range)) + templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + v.Interval) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 427, Col: 123} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 449, Col: 26} } _, 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, 126, "

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

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if v.CanWrite { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var79 string + templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 453, Col: 173} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if v.Row.Unchecked { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var80 string + templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.unchecked_banner", "Count", 1)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 457, Col: 126} + } + _, 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, 131, "

") + 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 + } + var templ_7745c5c3_Var81 string + templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.history", "Range", v.Range)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 461, Col: 123} + } + _, 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, 133, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1667,33 +1761,33 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var78 string - templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.sla")) + var templ_7745c5c3_Var82 string + templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.sla")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 431, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 465, Col: 39} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var79 string - templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Uptime) + var templ_7745c5c3_Var83 string + templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Uptime) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 432, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 466, Col: 49} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1702,69 +1796,69 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } if v.Latency.Points != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var80 string - templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.latency")) + var templ_7745c5c3_Var84 string + templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.latency")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 437, Col: 44} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 471, Col: 44} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80)) + _, 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, 131, " max ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, " max ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var81 string - templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(v.Latency.MaxMS)) + var templ_7745c5c3_Var85 string + templ_7745c5c3_Var85, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(v.Latency.MaxMS)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 438, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 472, Col: 46} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var85)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, " ms
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "\" fill=\"none\" class=\"stroke-ink\" stroke-width=\"1.5\" vector-effect=\"non-scaling-stroke\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Regions) > 1 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1772,25 +1866,25 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range v.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var84 string - templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) + var templ_7745c5c3_Var88 string + templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 451, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 485, Col: 38} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84)) + _, 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, 139, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1802,38 +1896,38 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer templ_7745c5c3_Buffer := templ.GetBuffer() var templ_7745c5c3_ElementScripts []templ.ComponentScript - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var88 string - templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(r.Uptime) + var templ_7745c5c3_Var92 string + templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(r.Uptime) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 453, Col: 140} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 487, Col: 140} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var89 string - templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.by_region_hint")) + var templ_7745c5c3_Var93 string + templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.by_region_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 457, Col: 79} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 491, Col: 79} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) + _, 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, 146, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1893,12 +1987,12 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Maintenance) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1910,12 +2004,12 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1923,7 +2017,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1932,38 +2026,38 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer templ_7745c5c3_Buffer := templ.GetBuffer() var templ_7745c5c3_ElementScripts []templ.ComponentScript - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, ">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var93 string - templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(e.Label) + var templ_7745c5c3_Var97 string + templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(e.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 474, Col: 56} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 508, Col: 56} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93)) + _, 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, 157, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var94 string - templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(e.Value) + var templ_7745c5c3_Var98 string + templ_7745c5c3_Var98, templ_7745c5c3_Err = templ.JoinStringErrs(e.Value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 475, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 509, Col: 45} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94)) + _, 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, 158, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2016,20 +2110,20 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { 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, 167, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var95 string - templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(v.Uptime90) + var templ_7745c5c3_Var99 string + templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(v.Uptime90) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 483, Col: 48} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 517, Col: 48} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95)) + _, 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, 161, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2037,7 +2131,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { 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, 169, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2045,12 +2139,12 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { 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, 170, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range v.Row.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2058,43 +2152,43 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var96 string - templ_7745c5c3_Var96, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) + var templ_7745c5c3_Var100 string + templ_7745c5c3_Var100, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 494, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 528, Col: 21} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var96)) + _, 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, 173, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var97 string - templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) + var templ_7745c5c3_Var101 string + templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 495, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 529, Col: 77} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var97)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "
    • ") + 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, 168, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Incidents) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2107,43 +2201,43 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } if v.MoreIncidents { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "\" class=\"mt-3 inline-block text-sm text-muted hover:text-ink\">") 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, "incidents.all_of_monitor")) + var templ_7745c5c3_Var103 string + templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.all_of_monitor")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 506, Col: 166} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 540, Col: 166} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) + _, 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, 179, " →") 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, 180, "
") 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, 181, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2153,7 +2247,7 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2166,44 +2260,44 @@ func MonitorDetail(p Page, me Me, v MonitorDetailView) templ.Component { return templ_7745c5c3_Err } if v.MoreResults { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "\" class=\"mt-3 inline-block text-sm text-muted hover:text-ink\">") 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, "monitors.all_results")) + var templ_7745c5c3_Var105 string + templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.all_results")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 517, Col: 165} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 551, Col: 165} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) + _, 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, 178, " →") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, " →") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var68), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var72), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2228,38 +2322,38 @@ func resultTable(rows []ResultRow) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range rows { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 200, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 194, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var103 string - templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(r.Time) + var templ_7745c5c3_Var107 string + templ_7745c5c3_Var107, templ_7745c5c3_Err = templ.JoinStringErrs(r.Time) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 529, Col: 85} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 563, Col: 85} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) + _, 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, 182, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var104 string - templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(r.Region) + var templ_7745c5c3_Var108 string + templ_7745c5c3_Var108, templ_7745c5c3_Err = templ.JoinStringErrs(r.Region) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 530, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 564, Col: 40} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104)) + _, 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, 183, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2267,89 +2361,89 @@ func resultTable(rows []ResultRow) templ.Component { 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, 191, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if r.OK { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "●") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "●") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "●") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "●") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 194, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var105 string - templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(r.Latency) + var templ_7745c5c3_Var109 string + templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(r.Latency) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 541, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 575, Col: 59} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var105)) + _, 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, 188, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var106 string - templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) + var templ_7745c5c3_Var110 string + templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 543, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 577, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var106)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if r.EvidenceURL != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 198, "\" class=\"ml-2 underline underline-offset-2 hover:text-ink\">") 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, "evidence.show")) + var templ_7745c5c3_Var112 string + templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "evidence.show")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 545, Col: 136} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 579, Col: 136} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var108)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 199, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 201, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2381,7 +2475,7 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var110 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var114 := 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 { @@ -2393,33 +2487,33 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "

← ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 203, "\" class=\"text-muted hover:text-ink\">← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var112 string - templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) + var templ_7745c5c3_Var116 string + templ_7745c5c3_Var116, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 564, Col: 129} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 598, Col: 129} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var116)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 197, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2428,20 +2522,20 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { return templ_7745c5c3_Err } if len(v.Rows) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 198, "

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

") 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, "monitors.no_results")) + var templ_7745c5c3_Var117 string + templ_7745c5c3_Var117, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.no_results")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 567, Col: 108} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 601, Col: 108} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var113)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var117)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 199, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2451,7 +2545,7 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 200, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 207, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2461,7 +2555,7 @@ func ResultsPage(p Page, me Me, v ResultsView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var110), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var114), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2486,12 +2580,12 @@ func incidentList(rows []IncidentRow, showMonitor bool, custom []CustomIncidentS } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 201, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2667,33 +2761,33 @@ func quickStatus(r IncidentRow, custom []CustomIncidentStatus) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 218, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 225, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var124 string - templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.set_status")) + var templ_7745c5c3_Var128 string + templ_7745c5c3_Var128, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.set_status")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 605, Col: 148} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 639, Col: 148} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var128)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 219, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 227, "\" data-next=\"/incidents\" class=\"mt-3 grid gap-2 border border-rule p-3 sm:w-80\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2701,134 +2795,134 @@ func quickStatus(r IncidentRow, custom []CustomIncidentStatus) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 221, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range IncidentStatuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 222, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 233, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } for _, st := range custom { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 227, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 238, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 232, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2862,7 +2956,7 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var134 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var138 := 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 { @@ -2879,82 +2973,82 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { return templ_7745c5c3_Err } if v.Monitor != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 236, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var135 string - templ_7745c5c3_Var135, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.of_monitor")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 640, Col: 41} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var135)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 237, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var137 string - templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 641, Col: 105} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var137)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 239, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var138 string - templ_7745c5c3_Var138, 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: 642, Col: 94} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var138)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 240, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - if len(v.Rows) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var139 string - templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.none")) + templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.of_monitor")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 646, Col: 103} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 674, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var139)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 243, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var141 string + templ_7745c5c3_Var141, templ_7745c5c3_Err = templ.JoinStringErrs(v.Monitor) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 675, Col: 105} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var141)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var142 string + templ_7745c5c3_Var142, 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: 676, Col: 94} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var142)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 248, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if len(v.Rows) == 0 { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var143 string + templ_7745c5c3_Var143, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incidents.none")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 680, Col: 103} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var143)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2964,7 +3058,7 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 251, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2974,7 +3068,7 @@ func IncidentsPage(p Page, me Me, v IncidentsView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var134), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var138), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3123,46 +3217,46 @@ func headersField(value string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 245, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3186,46 +3280,46 @@ func typeFields(typ, current string) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var144 := templ.GetChildren(ctx) + templ_7745c5c3_Var148 := templ.GetChildren(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, " class=\"mb-2\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ_7745c5c3_Var144.Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = templ_7745c5c3_Var148.Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 261, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3250,95 +3344,95 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 255, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3363,7 +3457,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var154 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var158 := 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 { @@ -3375,115 +3469,115 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 264, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if f.ID == "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, "← ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var155 string - templ_7745c5c3_Var155, 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: 814, Col: 93} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 267, "← ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var157 string - templ_7745c5c3_Var157, templ_7745c5c3_Err = templ.JoinStringErrs(f.Name) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 816, Col: 97} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var157)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var158 string - templ_7745c5c3_Var158, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, p.TitleID)) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 819, Col: 65} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var158)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var159 string - templ_7745c5c3_Var159, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/monitors/" + f.ID).Resolve(ctx) + templ_7745c5c3_Var159, 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: 825, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 848, Col: 93} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var159) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var159)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, "\" data-method=\"put\" data-next=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 273, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, "← ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var161 string + templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinStringErrs(f.Name) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 850, Col: 97} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, " class=\"grid max-w-4xl gap-x-12 md:grid-cols-2\">
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var162 string + templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, p.TitleID)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 853, Col: 65} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var162)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3495,20 +3589,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var161 string - templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.title")) + var templ_7745c5c3_Var165 string + templ_7745c5c3_Var165, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 835, Col: 117} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 869, Col: 117} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var165)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 285, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3516,33 +3610,33 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var162 string - templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.monitor_hint")) + var templ_7745c5c3_Var166 string + templ_7745c5c3_Var166, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alert_groups.monitor_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 837, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 871, Col: 82} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var162)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var166)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3650,25 +3744,25 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 295, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var168 string - templ_7745c5c3_Var168, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.target_hint")) + var templ_7745c5c3_Var172 string + templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.target_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 858, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 892, Col: 83} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var168)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var172)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 296, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, t := range []string{"postgres", "mysql", "mssql", "mongodb", "redis"} { - templ_7745c5c3_Var169 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var173 := 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 { @@ -3686,13 +3780,13 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var169), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var173), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } for _, t := range []string{"mqtt", "kafka", "rabbitmq"} { - templ_7745c5c3_Var170 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var174 := 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 { @@ -3710,97 +3804,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var170), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields(t, f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var174), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Var171 := 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 { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 297, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var172 string - templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.grpc_hint")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 871, Col: 75} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var172)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = valueField(i18n.T(ctx, "monitors.grpc_service"), "config.service", f.Proto.Service, "shop.v1.Orders", false).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = tlsField(f.Proto.TLS, "verify", "require", "disable").Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return nil - }) - templ_7745c5c3_Err = typeFields("grpc", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var171), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Var173 := 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 { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var174 string - templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.smtp_hint")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 876, Col: 75} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = tlsField(f.Proto.TLS, "verify", "require", "disable").Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = checkbox(i18n.T(ctx, "monitors.smtp_implicit_tls"), "config.implicit_tls", f.Proto.ImplicitTLS).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return nil - }) - templ_7745c5c3_Err = typeFields("smtp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var173), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } templ_7745c5c3_Var175 := 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) @@ -3813,20 +3821,106 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var176 string - templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.radius_hint")) + templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.grpc_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 881, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 905, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, "

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

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = valueField(i18n.T(ctx, "monitors.grpc_service"), "config.service", f.Proto.Service, "shop.v1.Orders", false).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = tlsField(f.Proto.TLS, "verify", "require", "disable").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) + templ_7745c5c3_Err = typeFields("grpc", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var175), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var177 := 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 { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var178 string + templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.smtp_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 910, Col: 75} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var178)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 307, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = tlsField(f.Proto.TLS, "verify", "require", "disable").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = checkbox(i18n.T(ctx, "monitors.smtp_implicit_tls"), "config.implicit_tls", f.Proto.ImplicitTLS).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) + templ_7745c5c3_Err = typeFields("smtp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var177), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var179 := 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 { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var180 string + templ_7745c5c3_Var180, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.radius_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 915, Col: 77} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var180)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3848,11 +3942,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("radius", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var175), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("radius", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var179), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var177 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var181 := 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 { @@ -3864,79 +3958,79 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 303, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var178 string - templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_hint")) + var templ_7745c5c3_Var182 string + templ_7745c5c3_Var182, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 888, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 922, Col: 75} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var178)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var182)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 304, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3948,66 +4042,66 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = typeFields("snmp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var177), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("snmp", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var181), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var185 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var189 := 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 { @@ -4037,20 +4131,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 321, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var186 string - templ_7745c5c3_Var186, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.steam_hint")) + var templ_7745c5c3_Var190 string + templ_7745c5c3_Var190, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.steam_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 912, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 946, Col: 76} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var186)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var190)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 322, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4060,11 +4154,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("steam", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var185), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("steam", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var189), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var187 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var191 := 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 { @@ -4076,118 +4170,118 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var188 string - templ_7745c5c3_Var188, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.minecraft_hint")) + var templ_7745c5c3_Var192 string + templ_7745c5c3_Var192, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.minecraft_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 916, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 950, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var188)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var192)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 324, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return nil - }) - templ_7745c5c3_Err = typeFields("minecraft", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var187), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Var192 := 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 { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, "

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

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) + templ_7745c5c3_Err = typeFields("minecraft", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var191), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var196 := 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 { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var197 string + templ_7745c5c3_Var197, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.docker_hint")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 962, Col: 77} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var197)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 340, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4197,11 +4291,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("docker", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var192), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("docker", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var196), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var194 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var198 := 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 { @@ -4213,219 +4307,219 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var195 string - templ_7745c5c3_Var195, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.alertmanager_hint")) + var templ_7745c5c3_Var199 string + templ_7745c5c3_Var199, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.alertmanager_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 933, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 967, Col: 49} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var195)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var199)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 342, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var196 string - templ_7745c5c3_Var196, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.title")) + var templ_7745c5c3_Var200 string + templ_7745c5c3_Var200, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 934, Col: 111} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 968, Col: 111} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var196)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var200)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var197 string - templ_7745c5c3_Var197, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers")) + var templ_7745c5c3_Var201 string + templ_7745c5c3_Var201, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 937, Col: 123} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 971, Col: 123} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var197)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var201)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, m := range f.Matchers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 338, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, "\" value=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - for _, op := range MatcherOps { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } + var templ_7745c5c3_Var203 string + templ_7745c5c3_Var203, templ_7745c5c3_Err = templruntime.NewAttributeExpression(m.Label).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 974, Col: 87} } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, "
") + var templ_7745c5c3_Var209 string + templ_7745c5c3_Var209, templ_7745c5c3_Err = templruntime.NewAttributeExpression("config.matchers." + strconv.Itoa(i) + ".value").Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 980, Col: 69} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var209) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 357, "\" value=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var210 string + templ_7745c5c3_Var210, templ_7745c5c3_Err = templruntime.NewAttributeExpression(m.Value).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 980, Col: 87} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var210) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 358, "\" placeholder=\"HighErrorRate\" aria-label=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var211 string + templ_7745c5c3_Var211, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.assertion_value")).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 980, Col: 170} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var211) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 359, "\" class=\"min-w-0 border border-rule bg-transparent px-2 py-1 font-mono text-xs outline-none focus:border-ink\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var208 string - templ_7745c5c3_Var208, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers_hint")) + var templ_7745c5c3_Var212 string + templ_7745c5c3_Var212, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 949, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 983, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var208)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var212)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 354, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4435,11 +4529,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("alertmanager", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var194), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("alertmanager", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var198), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var209 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var213 := 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 { @@ -4451,20 +4545,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 355, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var210 string - templ_7745c5c3_Var210, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.heartbeat_hint")) + var templ_7745c5c3_Var214 string + templ_7745c5c3_Var214, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.heartbeat_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 954, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 988, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var210)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var214)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 356, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4474,11 +4568,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("heartbeat", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var209), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("heartbeat", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var213), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var211 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var215 := 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 { @@ -4490,66 +4584,66 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 357, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4575,11 +4669,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("http", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var211), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("http", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var215), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var215 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var219 := 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 { @@ -4591,203 +4685,203 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 365, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var216 string - templ_7745c5c3_Var216, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_hint")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 976, Col: 75} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var216)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 366, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4805,11 +4899,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("prometheus", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var215), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("prometheus", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var219), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var228 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var232 := 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 { @@ -4821,92 +4915,92 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 386, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 394, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4918,203 +5012,203 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 396, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 403, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var234 string - templ_7745c5c3_Var234, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions")) + var templ_7745c5c3_Var238 string + templ_7745c5c3_Var238, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1025, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1059, Col: 125} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var234)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var238)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 397, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var235 string - templ_7745c5c3_Var235, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions_hint")) + var templ_7745c5c3_Var239 string + templ_7745c5c3_Var239, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1026, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1060, Col: 82} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var235)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var239)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 398, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, a := range f.Assertions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 399, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 407, "\" value=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - for _, op := range AssertionOps { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 405, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } + var templ_7745c5c3_Var241 string + templ_7745c5c3_Var241, templ_7745c5c3_Err = templruntime.NewAttributeExpression(a.Path).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1063, Col: 87} } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 410, "
") + var templ_7745c5c3_Var247 string + templ_7745c5c3_Var247, templ_7745c5c3_Err = templruntime.NewAttributeExpression("config.assertions." + strconv.Itoa(i) + ".value").Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1069, Col: 71} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var247) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 418, "\" value=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var248 string + templ_7745c5c3_Var248, templ_7745c5c3_Err = templruntime.NewAttributeExpression(a.Value).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1069, Col: 89} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var248) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 419, "\" placeholder=\"ok\" aria-label=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var249 string + templ_7745c5c3_Var249, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.assertion_value")).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1069, Col: 161} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var249) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 420, "\" class=\"min-w-0 border border-rule bg-transparent px-2 py-1 font-mono text-xs outline-none focus:border-ink\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 414, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 421, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = typeFields("json", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var228), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("json", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var232), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var246 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var250 := 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 { @@ -5126,66 +5220,66 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 415, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5199,11 +5293,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("dns", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var246), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("dns", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var250), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var250 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var254 := 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 { @@ -5225,11 +5319,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("tls", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var250), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("tls", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var254), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 423, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 430, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5237,17 +5331,17 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 424, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 433, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5255,7 +5349,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 427, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 434, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5263,141 +5357,141 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 428, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 438, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var251 string - templ_7745c5c3_Var251, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions")) + var templ_7745c5c3_Var255 string + templ_7745c5c3_Var255, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1064, Col: 121} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1098, Col: 121} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var251)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var255)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 432, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var252 string - templ_7745c5c3_Var252, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions_hint")) + var templ_7745c5c3_Var256 string + templ_7745c5c3_Var256, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1065, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1099, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var252)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var256)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 433, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range f.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 434, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 443, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 450, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5410,57 +5504,57 @@ 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, 444, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 454, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 448, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 455, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var154), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var158), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5504,7 +5598,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var262 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var266 := 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 { @@ -5520,7 +5614,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, 449, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 456, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5529,12 +5623,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, 450, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 457, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, ch := range v.Channels { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 451, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 458, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5549,149 +5643,149 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 452, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 459, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var263 string - templ_7745c5c3_Var263, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Name) + var templ_7745c5c3_Var267 string + templ_7745c5c3_Var267, 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: 1130, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1164, Col: 22} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var263)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var267)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 453, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 460, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var264 string - templ_7745c5c3_Var264, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.type_"+ch.Type)) + var templ_7745c5c3_Var268 string + templ_7745c5c3_Var268, 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: 1131, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1165, Col: 71} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var264)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var268)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 454, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 461, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var265 string - templ_7745c5c3_Var265, templ_7745c5c3_Err = templ.JoinStringErrs(ch.Target) + var templ_7745c5c3_Var269 string + templ_7745c5c3_Var269, 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: 1132, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1166, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var265)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var269)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 455, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 462, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 456, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 465, "\" class=\"text-muted hover:text-ink\">") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var272 string + templ_7745c5c3_Var272, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.test")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1169, Col: 188} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var272)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 466, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 463, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 470, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 464, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 471, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 465, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 472, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 466, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 473, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5699,7 +5793,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, 467, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 474, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5707,7 +5801,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, 468, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 475, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5723,46 +5817,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, 469, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 479, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5771,7 +5865,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, 473, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 480, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5779,7 +5873,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, 474, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 481, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5787,79 +5881,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, 475, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5867,30 +5961,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, 484, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 491, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 485, "

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

") 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, "error.email_not_configured")) + var templ_7745c5c3_Var283 string + templ_7745c5c3_Var283, 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: 1184, Col: 79} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1218, Col: 79} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var279)) + _, 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, 486, "

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

") 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, 494, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5898,20 +5992,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, 488, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var280 string - templ_7745c5c3_Var280, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "channels.service_intro")) + var templ_7745c5c3_Var284 string + templ_7745c5c3_Var284, 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: 1189, Col: 89} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1223, Col: 89} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var280)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var284)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 489, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5919,81 +6013,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, 490, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6001,95 +6095,43 @@ 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, 499, "
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - for i, pr := range v.Providers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 507, "
") + 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 + } + for i, pr := range v.Providers { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 514, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } if pr.Help != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 512, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var289 string - templ_7745c5c3_Var289, templ_7745c5c3_Err = templ.JoinStringErrs(pr.Help) + var templ_7745c5c3_Var293 string + templ_7745c5c3_Var293, 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: 1221, Col: 54} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1255, Col: 54} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var289)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var293)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 513, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6123,7 +6217,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 514, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 521, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6132,14 +6226,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, 515, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 522, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var262), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var266), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6183,208 +6277,208 @@ func providerField(f ProviderField) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 516, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 547, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6409,85 +6503,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, 541, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 557, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6530,7 +6624,7 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var307 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var311 := 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 { @@ -6542,20 +6636,20 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 551, "

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

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var308 string - templ_7745c5c3_Var308, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.title")) + var templ_7745c5c3_Var312 string + templ_7745c5c3_Var312, 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: 1317, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1351, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var308)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var312)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 552, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6564,69 +6658,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, 553, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 560, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, g := range v.Groups { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 554, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 562, "\">
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var310 string - templ_7745c5c3_Var310, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) + var templ_7745c5c3_Var314 string + templ_7745c5c3_Var314, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1324, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1358, Col: 21} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var310)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var314)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 556, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 563, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if g.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 557, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 564, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var311 string - templ_7745c5c3_Var311, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) + var templ_7745c5c3_Var315 string + templ_7745c5c3_Var315, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1327, Col: 99} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1361, Col: 99} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var311)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var315)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 558, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 566, "\" data-method=\"put\" data-next=\"/groups\" class=\"mt-3 w-72\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6638,20 +6732,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, 560, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 569, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6667,66 +6761,66 @@ 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, 563, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 573, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 567, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 574, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 568, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 575, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 569, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 576, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 570, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 577, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6734,7 +6828,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, 571, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 578, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6746,20 +6840,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, 572, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 581, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6775,14 +6869,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, 575, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 582, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var307), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var311), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6814,7 +6908,7 @@ func pingSection(url string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 576, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 583, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6822,55 +6916,55 @@ func pingSection(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 577, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var319 string - templ_7745c5c3_Var319, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_intro")) + var templ_7745c5c3_Var323 string + templ_7745c5c3_Var323, 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: 1372, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1406, Col: 83} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var319)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var323)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 578, "

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

")
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		var templ_7745c5c3_Var320 string
-		templ_7745c5c3_Var320, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 " + url + "\n")
+		var templ_7745c5c3_Var324 string
+		templ_7745c5c3_Var324, 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: 1373, Col: 137}
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1407, Col: 137}
 		}
-		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var320))
+		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var324))
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		var templ_7745c5c3_Var321 string
-		templ_7745c5c3_Var321, templ_7745c5c3_Err = templ.JoinStringErrs("curl -fsS -m 10 --retry 3 --data-raw \"$output\" " + url + "/fail")
+		var templ_7745c5c3_Var325 string
+		templ_7745c5c3_Var325, 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: 1373, Col: 208}
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1407, Col: 208}
 		}
-		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var321))
+		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var325))
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 579, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var322 string - templ_7745c5c3_Var322, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.ping_secret")) + var templ_7745c5c3_Var326 string + templ_7745c5c3_Var326, 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: 1374, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1408, Col: 84} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var322)) + _, 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, 580, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6916,20 +7010,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, 581, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var324 string - templ_7745c5c3_Var324, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.db_hint")) + var templ_7745c5c3_Var328 string + templ_7745c5c3_Var328, 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: 1400, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1434, Col: 69} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var324)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var328)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 582, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6957,33 +7051,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, 583, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7015,56 +7109,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, 586, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7090,66 +7184,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, 592, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7174,20 +7268,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, 600, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var336 string - templ_7745c5c3_Var336, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.broker_hint_"+typ)) + var templ_7745c5c3_Var340 string + templ_7745c5c3_Var340, 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: 1448, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1482, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var336)) + _, 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, 601, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7214,66 +7308,66 @@ func brokerFields(typ string, b BrokerForm) templ.Component { return templ_7745c5c3_Err } case "kafka": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 602, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7336,7 +7430,7 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var341 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var345 := 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 { @@ -7348,45 +7442,45 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 610, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var342 string - templ_7745c5c3_Var342, templ_7745c5c3_Err = templ.JoinStringErrs("← " + i18n.T(ctx, "incidents.all")) + var templ_7745c5c3_Var346 string + templ_7745c5c3_Var346, 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: 1495, Col: 120} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1529, Col: 120} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var342)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var346)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 611, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.Row.Title != "" { - var templ_7745c5c3_Var343 string - templ_7745c5c3_Var343, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Title) + var templ_7745c5c3_Var347 string + templ_7745c5c3_Var347, 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: 1498, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1532, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var343)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var347)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - var templ_7745c5c3_Var344 string - templ_7745c5c3_Var344, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var348 string + templ_7745c5c3_Var348, 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: 1500, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1534, Col: 19} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var344)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var348)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 612, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 619, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7394,46 +7488,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, 613, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 621, "\" class=\"hover:underline\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var346 string - templ_7745c5c3_Var346, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var350 string + templ_7745c5c3_Var350, 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: 1505, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1539, Col: 100} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var346)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var350)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 615, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 622, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var347 string - templ_7745c5c3_Var347, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Started + " · " + v.Row.Duration) + var templ_7745c5c3_Var351 string + templ_7745c5c3_Var351, 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: 1506, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1540, Col: 87} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var347)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var351)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 616, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 623, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7441,18 +7535,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, 617, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 624, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, e := range v.Timeline { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 618, "
    1. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 625, "
    2. ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } switch e.Kind { case "update": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 619, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7460,107 +7554,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, 620, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 627, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var348 string - templ_7745c5c3_Var348, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var352 string + templ_7745c5c3_Var352, 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: 1518, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1552, Col: 51} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var348)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var352)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 621, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 628, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if e.Author != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 622, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var349 string - templ_7745c5c3_Var349, 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: 1520, Col: 46} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var349)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 623, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - if !e.Public { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 624, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var350 string - templ_7745c5c3_Var350, 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: 1523, Col: 94} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var350)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 625, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 626, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 630, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 630, "

      ") + if !e.Public { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 631, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var354 string + templ_7745c5c3_Var354, 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: 1557, Col: 94} + } + _, 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, 632, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + if v.CanWrite { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 633, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 637, "

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7568,103 +7662,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, 631, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 638, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } case "resolved": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 632, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var354 string - templ_7745c5c3_Var354, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.recovered")) + var templ_7745c5c3_Var358 string + templ_7745c5c3_Var358, 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: 1533, Col: 85} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1567, Col: 85} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var354)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var358)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 633, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 640, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var355 string - templ_7745c5c3_Var355, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var359 string + templ_7745c5c3_Var359, 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: 1533, Col: 136} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1567, Col: 136} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var355)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var359)) 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, 641, "

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

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var356 string - templ_7745c5c3_Var356, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.began")) + var templ_7745c5c3_Var360 string + templ_7745c5c3_Var360, 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: 1535, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1569, Col: 83} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var356)) + _, 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, 636, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 643, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var357 string - templ_7745c5c3_Var357, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var361 string + templ_7745c5c3_Var361, 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: 1535, Col: 134} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1569, Col: 134} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var357)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var361)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 637, "

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

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

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var358 string - templ_7745c5c3_Var358, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(v.Row.Cause, " · ")) + var templ_7745c5c3_Var362 string + templ_7745c5c3_Var362, 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: 1537, Col: 90} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1571, Col: 90} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var358)) + _, 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, 639, "

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 640, "
    3. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 647, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 641, "
") + 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, 642, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 670, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 677, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var341), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var345), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7962,7 +8056,7 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var372 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var376 := 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 { @@ -7978,7 +8072,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, 671, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 678, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7986,12 +8080,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, 672, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 679, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range IncidentStatuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 673, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 680, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7999,12 +8093,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, 674, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 681, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 675, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 682, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8013,139 +8107,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, 676, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var373 string - templ_7745c5c3_Var373, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident_statuses.none")) + var templ_7745c5c3_Var377 string + templ_7745c5c3_Var377, 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: 1599, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1633, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var373)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var377)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 677, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 678, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 685, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, st := range statuses { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 679, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 686, "
    • ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if canManage { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 680, "

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8155,80 +8249,80 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 689, "
    • ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 696, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 690, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 697, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if canManage { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 691, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 703, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var372), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var376), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8243,4 +8337,257 @@ func filterTitle(ctx context.Context, f StatusFilter) string { return i18n.T(ctx, "monitors.filter_show", "Status", i18n.T(ctx, "status."+string(f.Status)), "Count", f.Count) } +func sortSwitch(opts []SortOption) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 704, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +// treeList is a group's own monitors, as links or, while arranging, as +// rows to put in order. +func treeList(ms []MonitorRow, arrange bool) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + ctx = templ.ClearChildren(ctx) + if arrange { + templ_7745c5c3_Err = arrangeList(ms).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + templ_7745c5c3_Err = monitorList(ms).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + return nil + }) +} + +// arrangeList lets monitors be dragged or moved up and down; every change +// is saved at once. +func arrangeList(ms []MonitorRow) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + ctx = templ.ClearChildren(ctx) + if len(ms) > 0 { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 712, "
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, m := range ms { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 713, "
  • ⠿") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = statusDot(m.Status).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 715, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var398 string + templ_7745c5c3_Var398, templ_7745c5c3_Err = templ.JoinStringErrs(m.Name) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1708, Col: 51} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var398)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 716, "
  • ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 721, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + return nil + }) +} + var _ = templruntime.GeneratedTemplate -- 2.54.1