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] 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