diff --git a/internal/api/apidocs.go b/internal/api/apidocs.go index 463b6f5..0afb13d 100644 --- a/internal/api/apidocs.go +++ b/internal/api/apidocs.go @@ -268,6 +268,8 @@ var endpoints = []endpoint{ req: regionRequest{}, status: http.StatusCreated, resp: regionView{}}, {method: "DELETE", path: "/api/v1/org/regions/:id", tag: "Organization", summary: "Delete an own region", perm: "org.manage", sessionOnly: true, status: http.StatusNoContent}, + {method: "PATCH", path: "/api/v1/org/regions/:id", tag: "Organization", summary: "Set or remove the location of an own region", perm: "org.manage", sessionOnly: true, + description: "Null for both coordinates removes the location.", req: regionLocation{}, status: http.StatusNoContent}, {method: "GET", path: "/api/v1/org/agents", tag: "Organization", summary: "List own checkers and status page servers", perm: "org.manage", resp: obj{"agents": []agentView{}}}, {method: "POST", path: "/api/v1/org/agents", tag: "Organization", summary: "Create an agent token", perm: "org.manage", sessionOnly: true, @@ -366,6 +368,8 @@ var endpoints = []endpoint{ req: regionRequest{}, status: http.StatusCreated, resp: regionView{}}, {method: "DELETE", path: "/api/v1/admin/regions/:id", tag: "Platform", summary: "Delete a platform region", perm: "platform admin", status: http.StatusNoContent}, + {method: "PATCH", path: "/api/v1/admin/regions/:id", tag: "Platform", summary: "Set or remove the location of a platform region", perm: "platform admin", + description: "Null for both coordinates removes the location.", req: regionLocation{}, status: http.StatusNoContent}, {method: "GET", path: "/api/v1/admin/agents", tag: "Platform", summary: "List platform agents", perm: "platform admin", resp: obj{"agents": []agentView{}}}, {method: "POST", path: "/api/v1/admin/agents", tag: "Platform", summary: "Create a platform agent token", perm: "platform admin", diff --git a/internal/api/audit.go b/internal/api/audit.go index ace66a3..4ea7391 100644 --- a/internal/api/audit.go +++ b/internal/api/audit.go @@ -76,6 +76,7 @@ var auditActions = map[string]string{ "DELETE /api/v1/org/groups/:id": "group.delete", "POST /api/v1/org/regions": "region.create", "DELETE /api/v1/org/regions/:id": "region.delete", + "PATCH /api/v1/org/regions/:id": "region.update", "POST /api/v1/org/agents": "agent.create", "DELETE /api/v1/org/agents/:id": "agent.delete", "POST /api/v1/org/statuspages": "statuspage.create", @@ -129,6 +130,7 @@ var auditActions = map[string]string{ "PATCH /api/v1/org/agents/:id": "agent.update", "POST /api/v1/admin/regions": "platform.region_create", "DELETE /api/v1/admin/regions/:id": "platform.region_delete", + "PATCH /api/v1/admin/regions/:id": "platform.region_update", "POST /api/v1/admin/agents": "platform.agent_create", "DELETE /api/v1/admin/agents/:id": "platform.agent_delete", } diff --git a/internal/api/console.go b/internal/api/console.go index ada47d9..4a9c83d 100644 --- a/internal/api/console.go +++ b/internal/api/console.go @@ -939,7 +939,7 @@ func (s *Server) monitorEditor(c *gin.Context, p *principal, page web.Page, me w return nil, err } checked := slices.Contains(assigned, r.ID) || (idParam == "" && i == 0) - f.Regions = append(f.Regions, web.RegionOption{ID: r.ID.String(), Name: r.Name, Own: r.OrgID != nil, Checked: checked, Live: live}) + f.Regions = append(f.Regions, web.RegionOption{ID: r.ID.String(), Name: r.Name, Own: r.OrgID != nil, Checked: checked, Live: live, Lat: r.Latitude, Lon: r.Longitude}) } t, err := s.loadGroupTree(ctx, p.scope()) if err != nil { diff --git a/internal/api/pages.go b/internal/api/pages.go index 5f4e3d7..ba979f1 100644 --- a/internal/api/pages.go +++ b/internal/api/pages.go @@ -670,7 +670,7 @@ func (s *Server) buildRegionsView(ctx context.Context, regions []store.Region, a if err != nil { return v, err } - wr := web.Region{ID: r.ID.String(), Key: r.Key, Name: r.Name, Platform: r.OrgID == nil, Manageable: manageable(r), Instances: n} + wr := web.Region{ID: r.ID.String(), Key: r.Key, Name: r.Name, Platform: r.OrgID == nil, Manageable: manageable(r), Instances: n, Lat: r.Latitude, Lon: r.Longitude} v.Regions = append(v.Regions, wr) if wr.Manageable { v.OwnRegions = append(v.OwnRegions, wr) diff --git a/internal/api/regions.go b/internal/api/regions.go index bb789a9..fa01cbf 100644 --- a/internal/api/regions.go +++ b/internal/api/regions.go @@ -28,6 +28,14 @@ type regionView struct { // regions. Own bool `json:"own"` Instances int64 `json:"instances"` + // Latitude and longitude place the region on the map; both are absent + // for regions without a location. + Latitude *float64 `json:"latitude,omitempty"` + Longitude *float64 `json:"longitude,omitempty"` +} + +func newRegionView(r store.Region, org uuid.UUID, instances int64) regionView { + return regionView{ID: r.ID, Key: r.Key, Name: r.Name, Own: r.OrgID != nil && *r.OrgID == org, Instances: instances, Latitude: r.Latitude, Longitude: r.Longitude} } func (s *Server) viewRegions(ctx context.Context, rows []store.Region, org uuid.UUID) ([]regionView, error) { @@ -37,7 +45,7 @@ func (s *Server) viewRegions(ctx context.Context, rows []store.Region, org uuid. if err != nil { return nil, err } - out[i] = regionView{ID: r.ID, Key: r.Key, Name: r.Name, Own: r.OrgID != nil && *r.OrgID == org, Instances: n} + out[i] = newRegionView(r, org, n) } return out, nil } @@ -67,6 +75,7 @@ func (s *Server) listOrgRegions(c *gin.Context) { type regionRequest struct { Key string `json:"key" binding:"required,max=40"` Name string `json:"name" binding:"max=100"` + regionLocation } func (r *regionRequest) normalize() bool { @@ -78,6 +87,20 @@ func (r *regionRequest) normalize() bool { return regionKeyRE.MatchString(r.Key) } +// regionLocation is where a region's checkers stand; null for both +// coordinates means no location. +type regionLocation struct { + Latitude *float64 `json:"latitude"` + Longitude *float64 `json:"longitude"` +} + +func (l regionLocation) valid() bool { + if l.Latitude == nil || l.Longitude == nil { + return l.Latitude == nil && l.Longitude == nil + } + return *l.Latitude >= -90 && *l.Latitude <= 90 && *l.Longitude >= -180 && *l.Longitude <= 180 +} + func (s *Server) createRegion(c *gin.Context, scope tenant.Scope, org *uuid.UUID) { var req regionRequest if !bind(c, &req) { @@ -87,11 +110,15 @@ func (s *Server) createRegion(c *gin.Context, scope tenant.Scope, org *uuid.UUID fail(c, http.StatusUnprocessableEntity, "invalid_region_key") return } + if !req.valid() { + fail(c, http.StatusUnprocessableEntity, "invalid_location") + return + } ctx := c.Request.Context() var row store.Region err := s.db.Tx(ctx, scope, func(q *store.Queries) error { var err error - row, err = q.CreateRegion(ctx, store.CreateRegionParams{OrgID: org, Key: req.Key, Name: req.Name}) + row, err = q.CreateRegion(ctx, store.CreateRegionParams{OrgID: org, Key: req.Key, Name: req.Name, Latitude: req.Latitude, Longitude: req.Longitude}) return err }) if isUniqueViolation(err, "regions_owner_key_key") { @@ -102,7 +129,41 @@ func (s *Server) createRegion(c *gin.Context, scope tenant.Scope, org *uuid.UUID internalError(c, err) return } - c.JSON(http.StatusCreated, regionView{ID: row.ID, Key: row.Key, Name: row.Name, Own: org != nil}) + v := newRegionView(row, uuid.Nil, 0) + v.Own = org != nil + c.JSON(http.StatusCreated, v) +} + +// updateRegion sets or removes a region's location. +func (s *Server) updateRegion(c *gin.Context, scope tenant.Scope) { + id, err := uuid.Parse(c.Param("id")) + if err != nil { + fail(c, http.StatusNotFound, "not_found") + return + } + var req regionLocation + if !bind(c, &req) { + return + } + if !req.valid() { + fail(c, http.StatusUnprocessableEntity, "invalid_location") + return + } + ctx := c.Request.Context() + var n int64 + err = s.db.Tx(ctx, scope, func(q *store.Queries) error { + n, err = q.UpdateRegionLocation(ctx, store.UpdateRegionLocationParams{ID: id, Latitude: req.Latitude, Longitude: req.Longitude}) + return err + }) + if err != nil { + internalError(c, err) + return + } + if n == 0 { + fail(c, http.StatusNotFound, "not_found") + return + } + c.Status(http.StatusNoContent) } func (s *Server) deleteRegion(c *gin.Context, scope tenant.Scope) { @@ -141,6 +202,9 @@ func (s *Server) createOrgRegion(c *gin.Context) { // hides platform regions from writes in an org scope. func (s *Server) deleteOrgRegion(c *gin.Context) { s.deleteRegion(c, current(c).scope()) } +// updateOrgRegion, like deleteOrgRegion, reaches the org's own regions only. +func (s *Server) updateOrgRegion(c *gin.Context) { s.updateRegion(c, current(c).scope()) } + type agentView struct { ID uuid.UUID `json:"id"` Kind string `json:"kind"` @@ -323,11 +387,25 @@ func (s *Server) adminListRegions(c *gin.Context) { func (s *Server) adminCreateRegion(c *gin.Context) { s.createRegion(c, tenant.System(), nil) } func (s *Server) adminDeleteRegion(c *gin.Context) { - // The system scope could reach org regions; only platform ones are meant. + if s.platformRegion(c) { + s.deleteRegion(c, tenant.System()) + } +} + +func (s *Server) adminUpdateRegion(c *gin.Context) { + if s.platformRegion(c) { + s.updateRegion(c, tenant.System()) + } +} + +// platformRegion reports whether the region in the path is a platform one, +// answering the request otherwise: the system scope could reach org +// regions, but only platform ones are meant. +func (s *Server) platformRegion(c *gin.Context) bool { id, err := uuid.Parse(c.Param("id")) if err != nil { fail(c, http.StatusNotFound, "not_found") - return + return false } ctx := c.Request.Context() var r store.Region @@ -337,13 +415,13 @@ func (s *Server) adminDeleteRegion(c *gin.Context) { }) if errors.Is(err, pgx.ErrNoRows) || (err == nil && r.OrgID != nil) { fail(c, http.StatusNotFound, "not_found") - return + return false } if err != nil { internalError(c, err) - return + return false } - s.deleteRegion(c, tenant.System()) + return true } func (s *Server) adminListAgents(c *gin.Context) { s.listAgents(c, tenant.System(), nil) } diff --git a/internal/api/regions_test.go b/internal/api/regions_test.go index b35975a..258c287 100644 --- a/internal/api/regions_test.go +++ b/internal/api/regions_test.go @@ -200,3 +200,94 @@ func TestAgentInstallConsole(t *testing.T) { t.Error("an agent on the platform's release is marked outdated") } } + +func TestRegionLocations(t *testing.T) { + e := newEnv(t) + _, platformRegion := e.platformChecker(t, uniq("loc-")) + + a := e.browser(t) + a.signup("a@"+uniq("a")+".test", uniq("org-a-")) + b := e.browser(t) + b.signup("b@"+uniq("b")+".test", uniq("org-b-")) + + location := func(br *browser, id string) (any, any) { + t.Helper() + _, body := br.do("GET", "/api/v1/org/regions", nil) + for _, r := range body["regions"].([]any) { + if r := r.(map[string]any); r["id"] == id { + return r["latitude"], r["longitude"] + } + } + t.Fatalf("region %s not listed", id) + return nil, nil + } + + st, body := a.do("POST", "/api/v1/org/regions", map[string]any{"key": "berlin", "latitude": 52.52, "longitude": 13.405}) + if st != http.StatusCreated || body["latitude"] != 52.52 || body["longitude"] != 13.405 { + t.Fatalf("create region with location = %d %v", st, body) + } + berlin := body["id"].(string) + plain := a.createRegion("plain") + if lat, lon := location(a, plain); lat != nil || lon != nil { + t.Errorf("region without location lists %v, %v", lat, lon) + } + + for _, tc := range []struct { + what string + body map[string]any + }{ + {"latitude only", map[string]any{"latitude": 10.0}}, + {"latitude out of range", map[string]any{"latitude": 91.0, "longitude": 0.0}}, + {"longitude out of range", map[string]any{"latitude": 0.0, "longitude": -181.0}}, + } { + st, body := a.do("PATCH", "/api/v1/org/regions/"+plain, tc.body) + expect(t, tc.what, st, body, http.StatusUnprocessableEntity, "invalid_location") + } + st, body = a.do("POST", "/api/v1/org/regions", map[string]any{"key": "half", "longitude": 3.0}) + expect(t, "create with half a location", st, body, http.StatusUnprocessableEntity, "invalid_location") + + st, body = a.do("PATCH", "/api/v1/org/regions/"+plain, map[string]any{"latitude": -33.8688, "longitude": 151.2093}) + expect(t, "set location", st, body, http.StatusNoContent, "") + if lat, lon := location(a, plain); lat != -33.8688 || lon != 151.2093 { + t.Errorf("location after PATCH = %v, %v", lat, lon) + } + st, body = a.do("PATCH", "/api/v1/org/regions/"+berlin, map[string]any{"latitude": nil, "longitude": nil}) + expect(t, "remove location", st, body, http.StatusNoContent, "") + if lat, lon := location(a, berlin); lat != nil || lon != nil { + t.Errorf("location after removal = %v, %v", lat, lon) + } + + st, body = b.do("PATCH", "/api/v1/org/regions/"+plain, map[string]any{"latitude": 1.0, "longitude": 1.0}) + expect(t, "other org sets location", st, body, http.StatusNotFound, "not_found") + st, body = a.do("PATCH", "/api/v1/org/regions/"+platformRegion, map[string]any{"latitude": 1.0, "longitude": 1.0}) + expect(t, "org sets platform location", st, body, http.StatusNotFound, "not_found") + st, body = a.do("PATCH", "/api/v1/admin/regions/"+platformRegion, map[string]any{"latitude": 1.0, "longitude": 1.0}) + expect(t, "non-admin sets platform location", st, body, http.StatusForbidden, "forbidden") + + err := tenant.New(e.dbPool).Tx(context.Background(), tenant.Global(), func(q *store.Queries) error { + return q.MakeAdmin(context.Background(), a.userIDSelf()) + }) + if err != nil { + t.Fatal(err) + } + st, body = a.do("PATCH", "/api/v1/admin/regions/"+plain, map[string]any{"latitude": 1.0, "longitude": 1.0}) + expect(t, "admin sets org region location", st, body, http.StatusNotFound, "not_found") + st, body = a.do("PATCH", "/api/v1/admin/regions/"+platformRegion, map[string]any{"latitude": 50.1109, "longitude": 8.6821}) + expect(t, "admin sets platform location", st, body, http.StatusNoContent, "") + if lat, lon := location(b, platformRegion); lat != 50.1109 || lon != 8.6821 { + t.Errorf("platform location seen by org B = %v, %v", lat, lon) + } + + _, _, html := a.page("/monitors/new") + if !strings.Contains(html, `data-region-map="select"`) || !strings.Contains(html, `data-lat="50.1109"`) || !strings.Contains(html, `data-lat="-33.8688"`) { + t.Errorf("monitor form lacks the region map or markers") + } + _, _, html = b.page("/monitors/new") + if !strings.Contains(html, `data-region-map="select"`) || strings.Contains(html, `data-lat="-33.8688"`) { + t.Errorf("org B monitor form: want the platform marker only") + } + _, _, html = a.page("/settings/regions") + if !strings.Contains(html, `data-region-map="edit"`) || !strings.Contains(html, `data-location-toggle="location-`+plain+`"`) { + t.Errorf("regions page lacks the map or the location form") + } +} diff --git a/internal/api/server.go b/internal/api/server.go index 0f5483f..a2a9884 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -203,6 +203,7 @@ func (s *Server) Mount(r gin.IRouter) { org.GET("/regions", s.listOrgRegions) org.POST("/regions", sessionOnly(), can(authz.OrgManage), s.createOrgRegion) org.DELETE("/regions/:id", sessionOnly(), can(authz.OrgManage), s.deleteOrgRegion) + org.PATCH("/regions/:id", sessionOnly(), can(authz.OrgManage), s.updateOrgRegion) org.GET("/agents", can(authz.OrgManage), s.listOrgAgents) org.POST("/agents", sessionOnly(), can(authz.OrgManage), s.createOrgAgent) org.PATCH("/agents/:id", sessionOnly(), can(authz.OrgManage), s.updateOrgAgent) @@ -237,6 +238,7 @@ func (s *Server) Mount(r gin.IRouter) { admin.GET("/regions", s.adminListRegions) admin.POST("/regions", s.adminCreateRegion) admin.DELETE("/regions/:id", s.adminDeleteRegion) + admin.PATCH("/regions/:id", s.adminUpdateRegion) admin.GET("/support/settings", s.adminGetSupportSettings) admin.PUT("/support/settings", s.adminSetSupportSettings) admin.GET("/support/tickets", s.adminListTickets) diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index 5b08d26..3353474 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -129,6 +129,7 @@ "audit.action.platform.org_suspension": "Organisation gesperrt oder entsperrt", "audit.action.platform.region_create": "Plattform-Region erstellt", "audit.action.platform.region_delete": "Plattform-Region gelöscht", + "audit.action.platform.region_update": "Standort einer Plattform-Region geändert", "audit.action.platform.status_page_delete": "Statusseite durch Admin gelöscht", "audit.action.platform.status_page_suspension": "Statusseite gesperrt oder entsperrt", "audit.action.platform.user_delete": "Account durch Admin gelöscht", @@ -136,6 +137,7 @@ "audit.action.platform.user_suspension": "Account gesperrt oder entsperrt", "audit.action.region.create": "Region erstellt", "audit.action.region.delete": "Region gelöscht", + "audit.action.region.update": "Standort einer Region geändert", "audit.action.role.create": "Rolle erstellt", "audit.action.role.delete": "Rolle gelöscht", "audit.action.role.update": "Rolle geändert", @@ -587,6 +589,7 @@ "error.invalid_maintenance_time": "Prüfe Beginn, Wochentage und letzten Tag.", "error.invalid_matchers": "Lege 1 bis 20 Label-Matcher mit gültigen Label-Namen und regulären Ausdrücken an.", "error.invalid_method": "Nur GET- und HEAD-Anfragen werden unterstützt.", + "error.invalid_location": "Breitengrad (−90 bis 90) und Längengrad (−180 bis 180) angeben, oder keins von beiden.", "error.invalid_monitor": "Einer der Monitore existiert nicht oder ist doppelt aufgeführt.", "error.invalid_permissions": "Mindestens eine Berechtigung auswählen.", "error.invalid_query": "Gib eine PromQL-Abfrage mit höchstens 2000 Zeichen ein.", @@ -1361,6 +1364,13 @@ "one": "{{.Count}} aktiv", "other": "{{.Count}} aktiv" }, + "regions.latitude": "Breitengrad", + "regions.location": "Standort", + "regions.location_clear": "Standort entfernen", + "regions.location_for": "Standort von {{.Name}}: auf die Karte klicken oder die Koordinaten eingeben.", + "regions.location_pick_hint": "Ein Klick auf die Karte setzt die Koordinaten einer neuen Region oder der Region, deren Standort du gerade setzt.", + "regions.location_set": "Setzen", + "regions.longitude": "Längengrad", "regions.own": "diese Organisation", "regions.owner": "Besitzer", "regions.platform": "Plattform", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index 1cd6e85..45f1375 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -129,6 +129,7 @@ "audit.action.platform.org_suspension": "Organization suspended or reinstated", "audit.action.platform.region_create": "Platform region created", "audit.action.platform.region_delete": "Platform region deleted", + "audit.action.platform.region_update": "Platform region location changed", "audit.action.platform.status_page_delete": "Status page deleted by admin", "audit.action.platform.status_page_suspension": "Status page suspended or reinstated", "audit.action.platform.user_delete": "Account deleted by admin", @@ -136,6 +137,7 @@ "audit.action.platform.user_suspension": "Account suspended or reinstated", "audit.action.region.create": "Region created", "audit.action.region.delete": "Region deleted", + "audit.action.region.update": "Region location changed", "audit.action.role.create": "Role created", "audit.action.role.delete": "Role deleted", "audit.action.role.update": "Role changed", @@ -587,6 +589,7 @@ "error.invalid_maintenance_time": "Check start, weekdays and last day.", "error.invalid_matchers": "Add 1 to 20 label matchers with valid label names and regular expressions.", "error.invalid_method": "Only GET and HEAD requests are supported.", + "error.invalid_location": "Give latitude (−90 to 90) and longitude (−180 to 180), or neither.", "error.invalid_monitor": "One of the monitors does not exist or is listed twice.", "error.invalid_permissions": "Choose at least one permission.", "error.invalid_query": "Enter a PromQL query of at most 2000 characters.", @@ -1361,6 +1364,13 @@ "one": "{{.Count}} live", "other": "{{.Count}} live" }, + "regions.latitude": "Latitude", + "regions.location": "Location", + "regions.location_clear": "Remove location", + "regions.location_for": "Location of {{.Name}}: click the map or enter the coordinates.", + "regions.location_pick_hint": "Click the map to fill in the coordinates of a new region, or of the region whose location you are setting.", + "regions.location_set": "Set", + "regions.longitude": "Longitude", "regions.own": "this organization", "regions.owner": "Owner", "regions.platform": "platform", diff --git a/internal/migrations/sql/00058_region_locations.sql b/internal/migrations/sql/00058_region_locations.sql new file mode 100644 index 0000000..455702c --- /dev/null +++ b/internal/migrations/sql/00058_region_locations.sql @@ -0,0 +1,16 @@ +-- +goose Up +-- Where a region's checkers stand, so the monitor form can show them on a +-- map. Both coordinates are set or neither is. +ALTER TABLE regions + ADD COLUMN latitude double precision, + ADD COLUMN longitude double precision, + ADD CONSTRAINT regions_location_check CHECK ( + (latitude IS NULL AND longitude IS NULL) + OR (latitude BETWEEN -90 AND 90 AND longitude BETWEEN -180 AND 180) + ); + +-- +goose Down +ALTER TABLE regions + DROP CONSTRAINT regions_location_check, + DROP COLUMN latitude, + DROP COLUMN longitude; diff --git a/internal/store/agents.sql.go b/internal/store/agents.sql.go index b2435fb..b8e51ab 100644 --- a/internal/store/agents.sql.go +++ b/internal/store/agents.sql.go @@ -56,18 +56,26 @@ func (q *Queries) CreateAgent(ctx context.Context, arg CreateAgentParams) (Agent } const createRegion = `-- name: CreateRegion :one -INSERT INTO regions (org_id, key, name) VALUES ($1, $2, $3) -RETURNING key, name, created_at, id, org_id +INSERT INTO regions (org_id, key, name, latitude, longitude) VALUES ($1, $2, $3, $4, $5) +RETURNING key, name, created_at, id, org_id, latitude, longitude ` type CreateRegionParams struct { - OrgID *uuid.UUID - Key string - Name string + OrgID *uuid.UUID + Key string + Name string + Latitude *float64 + Longitude *float64 } func (q *Queries) CreateRegion(ctx context.Context, arg CreateRegionParams) (Region, error) { - row := q.db.QueryRow(ctx, createRegion, arg.OrgID, arg.Key, arg.Name) + row := q.db.QueryRow(ctx, createRegion, + arg.OrgID, + arg.Key, + arg.Name, + arg.Latitude, + arg.Longitude, + ) var i Region err := row.Scan( &i.Key, @@ -75,6 +83,8 @@ func (q *Queries) CreateRegion(ctx context.Context, arg CreateRegionParams) (Reg &i.CreatedAt, &i.ID, &i.OrgID, + &i.Latitude, + &i.Longitude, ) return i, err } @@ -113,7 +123,7 @@ INSERT INTO regions (org_id, key, name) VALUES (NULL, $1, coalesce(nullif($2::text, ''), $1)) ON CONFLICT ON CONSTRAINT regions_owner_key_key DO UPDATE SET name = CASE WHEN $2::text = '' THEN regions.name ELSE EXCLUDED.name END -RETURNING key, name, created_at, id, org_id +RETURNING key, name, created_at, id, org_id, latitude, longitude ` type EnsurePlatformRegionParams struct { @@ -131,6 +141,8 @@ func (q *Queries) EnsurePlatformRegion(ctx context.Context, arg EnsurePlatformRe &i.CreatedAt, &i.ID, &i.OrgID, + &i.Latitude, + &i.Longitude, ) return i, err } @@ -181,7 +193,7 @@ func (q *Queries) GetAgentByHash(ctx context.Context, tokenHash []byte) (GetAgen } const getRegion = `-- name: GetRegion :one -SELECT key, name, created_at, id, org_id FROM regions WHERE id = $1 +SELECT key, name, created_at, id, org_id, latitude, longitude FROM regions WHERE id = $1 ` func (q *Queries) GetRegion(ctx context.Context, id uuid.UUID) (Region, error) { @@ -193,6 +205,8 @@ func (q *Queries) GetRegion(ctx context.Context, id uuid.UUID) (Region, error) { &i.CreatedAt, &i.ID, &i.OrgID, + &i.Latitude, + &i.Longitude, ) return i, err } @@ -257,7 +271,7 @@ func (q *Queries) ListAgents(ctx context.Context, orgID *uuid.UUID) ([]ListAgent } const listPlatformRegions = `-- name: ListPlatformRegions :many -SELECT key, name, created_at, id, org_id FROM regions WHERE org_id IS NULL ORDER BY name, key +SELECT key, name, created_at, id, org_id, latitude, longitude FROM regions WHERE org_id IS NULL ORDER BY name, key ` func (q *Queries) ListPlatformRegions(ctx context.Context) ([]Region, error) { @@ -275,6 +289,8 @@ func (q *Queries) ListPlatformRegions(ctx context.Context) ([]Region, error) { &i.CreatedAt, &i.ID, &i.OrgID, + &i.Latitude, + &i.Longitude, ); err != nil { return nil, err } @@ -287,7 +303,7 @@ func (q *Queries) ListPlatformRegions(ctx context.Context) ([]Region, error) { } const listVisibleRegions = `-- name: ListVisibleRegions :many -SELECT key, name, created_at, id, org_id FROM regions ORDER BY org_id IS NULL, name, key +SELECT key, name, created_at, id, org_id, latitude, longitude FROM regions ORDER BY org_id IS NULL, name, key ` // Row-level security limits this to platform regions and the scope's org; @@ -307,6 +323,8 @@ func (q *Queries) ListVisibleRegions(ctx context.Context) ([]Region, error) { &i.CreatedAt, &i.ID, &i.OrgID, + &i.Latitude, + &i.Longitude, ); err != nil { return nil, err } @@ -437,3 +455,23 @@ func (q *Queries) TouchAgent(ctx context.Context, arg TouchAgentParams) error { _, err := q.db.Exec(ctx, touchAgent, arg.ID, arg.Release) return err } + +const updateRegionLocation = `-- name: UpdateRegionLocation :execrows +UPDATE regions SET latitude = $1, longitude = $2 +WHERE id = $3 +` + +type UpdateRegionLocationParams struct { + Latitude *float64 + Longitude *float64 + ID uuid.UUID +} + +// Null coordinates remove the location. +func (q *Queries) UpdateRegionLocation(ctx context.Context, arg UpdateRegionLocationParams) (int64, error) { + result, err := q.db.Exec(ctx, updateRegionLocation, arg.Latitude, arg.Longitude, arg.ID) + if err != nil { + return 0, err + } + return result.RowsAffected(), nil +} diff --git a/internal/store/models.go b/internal/store/models.go index b1bb974..c1f264e 100644 --- a/internal/store/models.go +++ b/internal/store/models.go @@ -384,6 +384,8 @@ type Region struct { CreatedAt time.Time ID uuid.UUID OrgID *uuid.UUID + Latitude *float64 + Longitude *float64 } type Role struct { diff --git a/internal/store/querier.go b/internal/store/querier.go index 1b61fe3..899e33d 100644 --- a/internal/store/querier.go +++ b/internal/store/querier.go @@ -460,6 +460,8 @@ type Querier interface { UpdateMonitor(ctx context.Context, arg UpdateMonitorParams) (Monitor, error) UpdateOrgPolicy(ctx context.Context, arg UpdateOrgPolicyParams) (Org, error) UpdatePlatformIDP(ctx context.Context, arg UpdatePlatformIDPParams) (PlatformIdentityProvider, error) + // Null coordinates remove the location. + UpdateRegionLocation(ctx context.Context, arg UpdateRegionLocationParams) (int64, error) UpdateRole(ctx context.Context, arg UpdateRoleParams) (Role, error) UpdateSSOProvider(ctx context.Context, arg UpdateSSOProviderParams) (SsoProvider, error) UpdateStatusPage(ctx context.Context, arg UpdateStatusPageParams) (StatusPage, error) diff --git a/internal/store/queries/agents.sql b/internal/store/queries/agents.sql index c8946a1..a717fba 100644 --- a/internal/store/queries/agents.sql +++ b/internal/store/queries/agents.sql @@ -1,7 +1,12 @@ -- name: CreateRegion :one -INSERT INTO regions (org_id, key, name) VALUES ($1, $2, $3) +INSERT INTO regions (org_id, key, name, latitude, longitude) VALUES ($1, $2, $3, $4, $5) RETURNING *; +-- name: UpdateRegionLocation :execrows +-- Null coordinates remove the location. +UPDATE regions SET latitude = sqlc.narg(latitude), longitude = sqlc.narg(longitude) +WHERE id = sqlc.arg(id); + -- name: EnsurePlatformRegion :one -- An empty name names a new region after its key and keeps an existing name. INSERT INTO regions (org_id, key, name) diff --git a/internal/web/assets/app.css b/internal/web/assets/app.css index 6bf108a..c2be32f 100644 --- a/internal/web/assets/app.css +++ b/internal/web/assets/app.css @@ -118,3 +118,24 @@ font-size: max(16px, 1em); } } + +/* Region maps: a dot per region, filled when it is selected and grey + when no checker of the region is live. */ +.region-marker { + width: 14px; + height: 14px; + padding: 0; + border: 2px solid var(--color-ink); + border-radius: 9999px; + background: var(--color-paper); + cursor: pointer; +} +.region-marker.is-checked { background: var(--color-ink); } +.region-marker[data-live="0"] { border-color: var(--color-unknown); } +.region-marker.is-checked[data-live="0"] { background: var(--color-unknown); } +.region-marker.is-pick { + border-color: var(--color-down); + background: var(--color-down); + cursor: default; +} +.region-map .maplibregl-ctrl-attrib { font-size: 10px; } diff --git a/internal/web/assets/app.js b/internal/web/assets/app.js index dba3412..34b6d46 100644 --- a/internal/web/assets/app.js +++ b/internal/web/assets/app.js @@ -588,4 +588,134 @@ for (const el of document.querySelectorAll("input[data-tz-default]")) { }; for (const t of ed.querySelectorAll("[data-md-tab]")) t.addEventListener("click", () => show(t.dataset.mdTab)); } + + // Region maps show the [data-lat][data-lon] elements inside the element + // [data-region-items] selects, on the map server's tiles. MapLibre loads + // only on pages with a map, and the map stays hidden when it cannot. + let maplibre; + const loadMaplibre = (server) => + (maplibre ??= window.maplibregl + ? Promise.resolve(window.maplibregl) + : new Promise((resolve, reject) => { + const css = Object.assign(document.createElement("link"), { rel: "stylesheet", href: `${server}/vendor/maplibre-gl.css` }); + const js = Object.assign(document.createElement("script"), { src: `${server}/vendor/maplibre-gl.js` }); + js.onload = () => (window.maplibregl ? resolve(window.maplibregl) : reject(new Error("no MapLibre"))); + js.onerror = reject; + document.head.append(css, js); + })); + const darkScheme = window.matchMedia?.("(prefers-color-scheme: dark)"); + const mapStyle = (server) => `${server}/style-${darkScheme?.matches ? "dark" : "light"}.json`; + + // A click on the map fills the coordinates of the location form last + // opened or focused, else the one marked [data-location-default]. + let locationTarget = document.querySelector("[data-location-default]"); + document.addEventListener("focusin", (ev) => { + const form = ev.target.closest?.("[data-location-form]"); + if (form) locationTarget = form; + }); + document.addEventListener("click", (ev) => { + const toggle = ev.target.closest("[data-location-toggle]"); + if (toggle) { + const row = document.getElementById(toggle.dataset.locationToggle); + row.hidden = !row.hidden; + const form = row.querySelector("[data-location-form]"); + if (!row.hidden) { + locationTarget = form; + row.querySelector("[data-location-field]")?.focus(); + } else if (locationTarget === form) { + locationTarget = document.querySelector("[data-location-default]"); + } + } + const clear = ev.target.closest("[data-location-clear]"); + if (clear) { + const form = clear.closest("form"); + for (const f of form.querySelectorAll("[data-location-field]")) f.value = ""; + form.requestSubmit(); + } + }); + + const initRegionMap = async (box) => { + const server = box.dataset.mapServer; + let gl; + try { + gl = await loadMaplibre(server); + } catch { + return; + } + const items = [...document.querySelectorAll(`${box.dataset.regionItems} [data-lat][data-lon]`)]; + const lngLat = (item) => [Number(item.dataset.lon), Number(item.dataset.lat)]; + box.hidden = false; + let map; + try { + map = new gl.Map({ container: box, style: mapStyle(server), center: [10.45, 51.17], zoom: 3 }); + } catch { + box.hidden = true; + return; + } + let styled = false; + map.on("styledata", () => (styled = true)); + map.on("error", () => { + if (!styled) box.hidden = true; + }); + map.addControl(new gl.NavigationControl({ showCompass: false }), "top-right"); + darkScheme?.addEventListener("change", () => map.setStyle(mapStyle(server))); + + // The map may start hidden, as with the regions of passive monitor + // types, so it fits the markers once it has a size. + let fitted = false; + const fit = () => { + map.resize(); + if (fitted || !box.clientWidth) return; + fitted = true; + const points = items.map(lngLat); + if (points.length > 1) { + const bounds = points.slice(1).reduce((b, p) => b.extend(p), new gl.LngLatBounds(points[0], points[0])); + map.fitBounds(bounds, { padding: 40, maxZoom: 6, duration: 0 }); + } else if (points.length === 1) { + map.jumpTo({ center: points[0], zoom: 5 }); + } + }; + new ResizeObserver(fit).observe(box); + fit(); + + const selecting = box.dataset.regionMap === "select"; + for (const item of items) { + const el = Object.assign(document.createElement("button"), { type: "button", className: "region-marker", title: item.dataset.name }); + el.setAttribute("aria-label", item.dataset.name); + el.dataset.live = item.dataset.live; + new gl.Marker({ element: el }).setLngLat(lngLat(item)).addTo(map); + if (selecting) { + // The checkbox stays the source of truth; its change event keeps + // the form's own behaviour. + const paint = () => el.classList.toggle("is-checked", item.checked); + paint(); + item.addEventListener("change", paint); + el.addEventListener("click", (ev) => { + ev.stopPropagation(); + if (!item.matches(":disabled")) item.click(); + }); + } else { + el.classList.add("is-checked"); + el.addEventListener("click", (ev) => { + ev.stopPropagation(); + item.querySelector("[data-location-toggle]")?.click(); + }); + } + } + if (selecting) return; + let pick; + map.on("click", (ev) => { + if (!locationTarget) return; + const at = ev.lngLat.wrap ? ev.lngLat.wrap() : ev.lngLat; + const round = (v) => String(Math.round(v * 10000) / 10000); + locationTarget.querySelector('[data-location-field="latitude"]').value = round(at.lat); + locationTarget.querySelector('[data-location-field="longitude"]').value = round(at.lng); + const point = [at.lng, at.lat]; + pick ??= new gl.Marker({ element: Object.assign(document.createElement("div"), { className: "region-marker is-pick" }) }) + .setLngLat(point) + .addTo(map); + pick.setLngLat(point); + }); + }; + for (const box of document.querySelectorAll("[data-region-map]")) initRegionMap(box); })(); diff --git a/internal/web/monitors.templ b/internal/web/monitors.templ index 897460a..3fad64d 100644 --- a/internal/web/monitors.templ +++ b/internal/web/monitors.templ @@ -84,8 +84,8 @@ type DashboardView struct { // ArrangeURL turns it on or off, empty when not offered. Arrange bool ArrangeURL string - Range string - Ranges []RangeOption + Range string + Ranges []RangeOption // Unchecked counts the monitors no region has reported for recently. Unchecked int // DeadRegions are regions of the monitors without a live checker. @@ -721,6 +721,19 @@ type RegionOption struct { Own bool Checked bool Live int64 + // Lat and Lon place the region on the map; both are nil without a + // location. + Lat, Lon *float64 +} + +// RegionsMapped reports whether any region of the form has a location. +func (f MonitorForm) RegionsMapped() bool { + for _, r := range f.Regions { + if r.HasLocation() { + return true + } + } + return false } // MonitorForm is the data of the monitor editor; ID is empty for new ones. @@ -1119,20 +1132,38 @@ templ MonitorEditor(p Page, me Me, f MonitorForm) {
{ i18n.T(ctx, "monitors.regions") }

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

- for _, r := range f.Regions { - + if f.RegionsMapped() { + @regionMap("select", "#monitor-regions") } +
+ for _, r := range f.Regions { + + } +
@checkbox(i18n.T(ctx, "sso.field.enabled"), "enabled", f.Enabled) @submit(i18n.T(ctx, "common.save")) diff --git a/internal/web/monitors_templ.go b/internal/web/monitors_templ.go index 4c35d5c..1eccb61 100644 --- a/internal/web/monitors_templ.go +++ b/internal/web/monitors_templ.go @@ -3217,6 +3217,19 @@ type RegionOption struct { Own bool Checked bool Live int64 + // Lat and Lon place the region on the map; both are nil without a + // location. + Lat, Lon *float64 +} + +// RegionsMapped reports whether any region of the form has a location. +func (f MonitorForm) RegionsMapped() bool { + for _, r := range f.Regions { + if r.HasLocation() { + return true + } + } + return false } // MonitorForm is the data of the monitor editor; ID is empty for new ones. @@ -3351,7 +3364,7 @@ func headersField(value string) templ.Component { var templ_7745c5c3_Var152 string templ_7745c5c3_Var152, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.headers")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 836, Col: 116} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 849, Col: 116} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var152)) if templ_7745c5c3_Err != nil { @@ -3364,7 +3377,7 @@ func headersField(value string) templ.Component { var templ_7745c5c3_Var153 string templ_7745c5c3_Var153, templ_7745c5c3_Err = templ.JoinStringErrs(value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 837, Col: 214} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 850, Col: 214} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var153)) if templ_7745c5c3_Err != nil { @@ -3377,7 +3390,7 @@ func headersField(value string) templ.Component { var templ_7745c5c3_Var154 string templ_7745c5c3_Var154, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.headers_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 838, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 851, Col: 84} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var154)) if templ_7745c5c3_Err != nil { @@ -3416,7 +3429,7 @@ func typeFields(typ, current string) templ.Component { var templ_7745c5c3_Var156 string templ_7745c5c3_Var156, templ_7745c5c3_Err = templruntime.NewAttributeExpression(typ).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 843, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 856, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var156) if templ_7745c5c3_Err != nil { @@ -3478,7 +3491,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var158 string templ_7745c5c3_Var158, templ_7745c5c3_Err = templ.JoinStringErrs(label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 850, Col: 90} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 863, Col: 90} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var158)) if templ_7745c5c3_Err != nil { @@ -3491,7 +3504,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var159 string templ_7745c5c3_Var159, templ_7745c5c3_Err = templruntime.NewAttributeExpression(name).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 853, Col: 14} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 866, Col: 14} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var159) if templ_7745c5c3_Err != nil { @@ -3504,7 +3517,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var160 string templ_7745c5c3_Var160, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(value)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 855, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 868, Col: 30} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var160) if templ_7745c5c3_Err != nil { @@ -3517,7 +3530,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var161 string templ_7745c5c3_Var161, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(min)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 856, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 869, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var161) if templ_7745c5c3_Err != nil { @@ -3530,7 +3543,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var162 string templ_7745c5c3_Var162, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(max)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 857, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 870, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var162) if templ_7745c5c3_Err != nil { @@ -3548,7 +3561,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var163 string templ_7745c5c3_Var163, templ_7745c5c3_Err = templ.JoinStringErrs(hint) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 861, Col: 53} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 874, Col: 53} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var163)) if templ_7745c5c3_Err != nil { @@ -3608,7 +3621,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var166 string templ_7745c5c3_Var166, 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: 870, Col: 93} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 883, Col: 93} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var166)) if templ_7745c5c3_Err != nil { @@ -3626,7 +3639,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var167 string templ_7745c5c3_Var167, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL("/monitors/" + f.ID)).ResolveURL(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 872, Col: 48} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 885, Col: 48} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var167) if templ_7745c5c3_Err != nil { @@ -3639,7 +3652,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var168 string templ_7745c5c3_Var168, 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: 872, Col: 97} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 885, Col: 97} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var168)) if templ_7745c5c3_Err != nil { @@ -3657,7 +3670,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var169 string templ_7745c5c3_Var169, 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: 875, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 888, Col: 65} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var169)) if templ_7745c5c3_Err != nil { @@ -3680,7 +3693,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var170 string templ_7745c5c3_Var170, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/monitors/" + f.ID).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 881, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 894, Col: 38} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var170) if templ_7745c5c3_Err != nil { @@ -3693,7 +3706,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var171 string templ_7745c5c3_Var171, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/monitors/" + f.ID).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 883, Col: 35} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 896, Col: 35} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var171) if templ_7745c5c3_Err != nil { @@ -3723,7 +3736,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var172 string templ_7745c5c3_Var172, 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: 891, Col: 117} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 904, Col: 117} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var172)) if templ_7745c5c3_Err != nil { @@ -3744,7 +3757,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var173 string templ_7745c5c3_Var173, 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: 893, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 906, Col: 82} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var173)) if templ_7745c5c3_Err != nil { @@ -3757,7 +3770,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var174 string templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "groups.group")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 896, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 909, Col: 115} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) if templ_7745c5c3_Err != nil { @@ -3778,7 +3791,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var175 string templ_7745c5c3_Var175, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 900, Col: 116} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 913, Col: 116} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) if templ_7745c5c3_Err != nil { @@ -3796,7 +3809,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var176 string templ_7745c5c3_Var176, templ_7745c5c3_Err = templruntime.NewAttributeExpression(t.Type).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 903, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 916, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var176) if templ_7745c5c3_Err != nil { @@ -3819,7 +3832,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var177 string templ_7745c5c3_Var177, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type_"+t.Type)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 904, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 917, Col: 46} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var177)) if templ_7745c5c3_Err != nil { @@ -3837,7 +3850,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var178 string templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type_own_only")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 906, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 919, Col: 49} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var178)) if templ_7745c5c3_Err != nil { @@ -3878,7 +3891,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var179 string templ_7745c5c3_Var179, 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: 914, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 927, Col: 83} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var179)) if templ_7745c5c3_Err != nil { @@ -3955,7 +3968,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var183 string templ_7745c5c3_Var183, 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: 927, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 940, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var183)) if templ_7745c5c3_Err != nil { @@ -3998,7 +4011,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var185 string templ_7745c5c3_Var185, 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: 932, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 945, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var185)) if templ_7745c5c3_Err != nil { @@ -4041,7 +4054,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var187 string templ_7745c5c3_Var187, 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: 937, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 950, Col: 77} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var187)) if templ_7745c5c3_Err != nil { @@ -4092,7 +4105,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var189 string templ_7745c5c3_Var189, 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: 944, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 957, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var189)) if templ_7745c5c3_Err != nil { @@ -4105,7 +4118,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var190 string templ_7745c5c3_Var190, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_version")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 946, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 959, Col: 125} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var190)) if templ_7745c5c3_Err != nil { @@ -4123,7 +4136,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var191 string templ_7745c5c3_Var191, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 949, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 962, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var191) if templ_7745c5c3_Err != nil { @@ -4146,7 +4159,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var192 string templ_7745c5c3_Var192, templ_7745c5c3_Err = templ.JoinStringErrs("v" + v) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 949, Col: 72} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 962, Col: 72} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var192)) if templ_7745c5c3_Err != nil { @@ -4176,7 +4189,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var193 string templ_7745c5c3_Var193, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_condition")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 957, Col: 128} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 970, Col: 128} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var193)) if templ_7745c5c3_Err != nil { @@ -4194,7 +4207,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var194 string templ_7745c5c3_Var194, templ_7745c5c3_Err = templruntime.NewAttributeExpression(c).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 960, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 973, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var194) if templ_7745c5c3_Err != nil { @@ -4217,7 +4230,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var195 string templ_7745c5c3_Var195, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.snmp_cond_"+condKey(c))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 960, Col: 113} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 973, Col: 113} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var195)) if templ_7745c5c3_Err != nil { @@ -4265,7 +4278,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var197 string templ_7745c5c3_Var197, 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: 968, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 981, Col: 76} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var197)) if templ_7745c5c3_Err != nil { @@ -4304,7 +4317,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var199 string templ_7745c5c3_Var199, 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: 972, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 985, Col: 80} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var199)) if templ_7745c5c3_Err != nil { @@ -4317,7 +4330,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var200 string templ_7745c5c3_Var200, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.minecraft_edition")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 974, Col: 130} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 987, Col: 130} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var200)) if templ_7745c5c3_Err != nil { @@ -4335,7 +4348,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var201 string templ_7745c5c3_Var201, templ_7745c5c3_Err = templruntime.NewAttributeExpression(e).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 977, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 990, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var201) if templ_7745c5c3_Err != nil { @@ -4358,7 +4371,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var202 string templ_7745c5c3_Var202, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.minecraft_"+e)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 977, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 990, Col: 100} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var202)) if templ_7745c5c3_Err != nil { @@ -4402,7 +4415,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var204 string templ_7745c5c3_Var204, 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: 984, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 997, Col: 77} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var204)) if templ_7745c5c3_Err != nil { @@ -4441,7 +4454,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var206 string templ_7745c5c3_Var206, 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: 989, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1002, Col: 49} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var206)) if templ_7745c5c3_Err != nil { @@ -4454,7 +4467,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var207 string templ_7745c5c3_Var207, 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: 990, Col: 111} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1003, Col: 111} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var207)) if templ_7745c5c3_Err != nil { @@ -4467,7 +4480,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var208 string templ_7745c5c3_Var208, 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: 993, Col: 123} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1006, Col: 123} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var208)) if templ_7745c5c3_Err != nil { @@ -4485,7 +4498,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var209 string templ_7745c5c3_Var209, templ_7745c5c3_Err = templruntime.NewAttributeExpression("config.matchers." + strconv.Itoa(i) + ".label").Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 996, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1009, Col: 69} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var209) if templ_7745c5c3_Err != nil { @@ -4498,7 +4511,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var210 string templ_7745c5c3_Var210, 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: 996, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1009, Col: 87} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var210) if templ_7745c5c3_Err != nil { @@ -4511,7 +4524,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var211 string templ_7745c5c3_Var211, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.matcher_label")).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 996, Col: 164} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1009, Col: 164} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var211) if templ_7745c5c3_Err != nil { @@ -4524,7 +4537,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var212 string templ_7745c5c3_Var212, templ_7745c5c3_Err = templruntime.NewAttributeExpression("config.matchers." + strconv.Itoa(i) + ".op").Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 997, Col: 67} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1010, Col: 67} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var212) if templ_7745c5c3_Err != nil { @@ -4537,7 +4550,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var213 string templ_7745c5c3_Var213, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.assertion_op")).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 997, Col: 119} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1010, Col: 119} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var213) if templ_7745c5c3_Err != nil { @@ -4555,7 +4568,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var214 string templ_7745c5c3_Var214, templ_7745c5c3_Err = templruntime.NewAttributeExpression(op).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 999, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1012, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var214) if templ_7745c5c3_Err != nil { @@ -4578,7 +4591,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var215 string templ_7745c5c3_Var215, templ_7745c5c3_Err = templ.JoinStringErrs(op) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 999, Col: 60} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1012, Col: 60} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var215)) if templ_7745c5c3_Err != nil { @@ -4596,7 +4609,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var216 string templ_7745c5c3_Var216, 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: 1002, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1015, Col: 69} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var216) if templ_7745c5c3_Err != nil { @@ -4609,7 +4622,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var217 string templ_7745c5c3_Var217, 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: 1002, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1015, Col: 87} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var217) if templ_7745c5c3_Err != nil { @@ -4622,7 +4635,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var218 string templ_7745c5c3_Var218, 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: 1002, Col: 170} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1015, Col: 170} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var218) if templ_7745c5c3_Err != nil { @@ -4640,7 +4653,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var219 string templ_7745c5c3_Var219, 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: 1005, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1018, Col: 80} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var219)) if templ_7745c5c3_Err != nil { @@ -4679,7 +4692,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var221 string templ_7745c5c3_Var221, 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: 1010, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1023, Col: 80} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var221)) if templ_7745c5c3_Err != nil { @@ -4718,7 +4731,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var223 string templ_7745c5c3_Var223, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.method")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1015, Col: 119} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1028, Col: 119} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var223)) if templ_7745c5c3_Err != nil { @@ -4751,7 +4764,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var224 string templ_7745c5c3_Var224, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.expect_status")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1022, Col: 126} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1035, Col: 126} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var224)) if templ_7745c5c3_Err != nil { @@ -4764,7 +4777,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var225 string templ_7745c5c3_Var225, templ_7745c5c3_Err = templruntime.NewAttributeExpression(f.ExpectStatus).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1023, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1036, Col: 73} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var225) if templ_7745c5c3_Err != nil { @@ -4819,7 +4832,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var227 string templ_7745c5c3_Var227, 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: 1032, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1045, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var227)) if templ_7745c5c3_Err != nil { @@ -4832,7 +4845,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var228 string templ_7745c5c3_Var228, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_query")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1034, Col: 123} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1047, Col: 123} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var228)) if templ_7745c5c3_Err != nil { @@ -4845,7 +4858,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var229 string templ_7745c5c3_Var229, templ_7745c5c3_Err = templruntime.NewAttributeExpression(`up{job="api"}`).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1035, Col: 74} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1048, Col: 74} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var229) if templ_7745c5c3_Err != nil { @@ -4858,7 +4871,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var230 string templ_7745c5c3_Var230, templ_7745c5c3_Err = templ.JoinStringErrs(f.PromQuery) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1035, Col: 201} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1048, Col: 201} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var230)) if templ_7745c5c3_Err != nil { @@ -4871,7 +4884,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var231 string templ_7745c5c3_Var231, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertion_op")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1039, Col: 126} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1052, Col: 126} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var231)) if templ_7745c5c3_Err != nil { @@ -4889,7 +4902,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var232 string templ_7745c5c3_Var232, templ_7745c5c3_Err = templruntime.NewAttributeExpression(op).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1042, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1055, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var232) if templ_7745c5c3_Err != nil { @@ -4912,7 +4925,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var233 string templ_7745c5c3_Var233, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.op_"+opKey(op))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1042, Col: 98} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1055, Col: 98} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var233)) if templ_7745c5c3_Err != nil { @@ -4930,7 +4943,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var234 string templ_7745c5c3_Var234, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_threshold")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1047, Col: 128} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1060, Col: 128} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var234)) if templ_7745c5c3_Err != nil { @@ -4943,7 +4956,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var235 string templ_7745c5c3_Var235, templ_7745c5c3_Err = templruntime.NewAttributeExpression(f.PromThreshold).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1048, Col: 98} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1061, Col: 98} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var235) if templ_7745c5c3_Err != nil { @@ -4956,7 +4969,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var236 string templ_7745c5c3_Var236, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_mode")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1052, Col: 122} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1065, Col: 122} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var236)) if templ_7745c5c3_Err != nil { @@ -4979,7 +4992,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var237 string templ_7745c5c3_Var237, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_mode_all")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1054, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1067, Col: 100} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var237)) if templ_7745c5c3_Err != nil { @@ -5002,7 +5015,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var238 string templ_7745c5c3_Var238, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.prom_mode_any")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1055, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1068, Col: 100} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var238)) if templ_7745c5c3_Err != nil { @@ -5049,7 +5062,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var240 string templ_7745c5c3_Var240, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.method")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1064, Col: 119} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1077, Col: 119} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var240)) if templ_7745c5c3_Err != nil { @@ -5082,7 +5095,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var241 string templ_7745c5c3_Var241, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.json_body")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1071, Col: 122} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1084, Col: 122} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var241)) if templ_7745c5c3_Err != nil { @@ -5095,7 +5108,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var242 string templ_7745c5c3_Var242, templ_7745c5c3_Err = templ.JoinStringErrs(f.JSONBody) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1072, Col: 184} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1085, Col: 184} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var242)) if templ_7745c5c3_Err != nil { @@ -5108,7 +5121,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var243 string templ_7745c5c3_Var243, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.expect_status")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1075, Col: 126} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1088, Col: 126} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var243)) if templ_7745c5c3_Err != nil { @@ -5121,7 +5134,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var244 string templ_7745c5c3_Var244, templ_7745c5c3_Err = templruntime.NewAttributeExpression(f.JSONExpect).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1076, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1089, Col: 71} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var244) if templ_7745c5c3_Err != nil { @@ -5146,7 +5159,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var245 string templ_7745c5c3_Var245, 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: 1081, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1094, Col: 125} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var245)) if templ_7745c5c3_Err != nil { @@ -5159,7 +5172,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var246 string templ_7745c5c3_Var246, 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: 1082, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1095, Col: 82} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var246)) if templ_7745c5c3_Err != nil { @@ -5177,7 +5190,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var247 string templ_7745c5c3_Var247, templ_7745c5c3_Err = templruntime.NewAttributeExpression("config.assertions." + strconv.Itoa(i) + ".path").Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1085, Col: 70} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1098, Col: 70} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var247) if templ_7745c5c3_Err != nil { @@ -5190,7 +5203,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var248 string templ_7745c5c3_Var248, 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: 1085, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1098, Col: 87} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var248) if templ_7745c5c3_Err != nil { @@ -5203,7 +5216,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var249 string templ_7745c5c3_Var249, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.assertion_path")).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1085, Col: 171} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1098, Col: 171} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var249) if templ_7745c5c3_Err != nil { @@ -5216,7 +5229,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var250 string templ_7745c5c3_Var250, templ_7745c5c3_Err = templruntime.NewAttributeExpression("config.assertions." + strconv.Itoa(i) + ".op").Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1086, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1099, Col: 69} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var250) if templ_7745c5c3_Err != nil { @@ -5229,7 +5242,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var251 string templ_7745c5c3_Var251, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "monitors.assertion_op")).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1086, Col: 121} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1099, Col: 121} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var251) if templ_7745c5c3_Err != nil { @@ -5247,7 +5260,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var252 string templ_7745c5c3_Var252, templ_7745c5c3_Err = templruntime.NewAttributeExpression(op).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1088, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1101, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var252) if templ_7745c5c3_Err != nil { @@ -5270,7 +5283,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var253 string templ_7745c5c3_Var253, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.op_"+opKey(op))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1088, Col: 95} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1101, Col: 95} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var253)) if templ_7745c5c3_Err != nil { @@ -5288,7 +5301,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var254 string templ_7745c5c3_Var254, 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: 1091, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1104, Col: 71} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var254) if templ_7745c5c3_Err != nil { @@ -5301,7 +5314,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var255 string templ_7745c5c3_Var255, 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: 1091, Col: 89} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1104, Col: 89} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var255) if templ_7745c5c3_Err != nil { @@ -5314,7 +5327,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var256 string templ_7745c5c3_Var256, 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: 1091, Col: 161} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1104, Col: 161} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var256) if templ_7745c5c3_Err != nil { @@ -5354,7 +5367,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var258 string templ_7745c5c3_Var258, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.dns_record")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1098, Col: 123} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1111, Col: 123} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var258)) if templ_7745c5c3_Err != nil { @@ -5372,7 +5385,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var259 string templ_7745c5c3_Var259, templ_7745c5c3_Err = templruntime.NewAttributeExpression(r).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1101, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1114, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var259) if templ_7745c5c3_Err != nil { @@ -5395,7 +5408,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var260 string templ_7745c5c3_Var260, templ_7745c5c3_Err = templ.JoinStringErrs(r) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1101, Col: 62} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1114, Col: 62} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var260)) if templ_7745c5c3_Err != nil { @@ -5507,7 +5520,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var262 string templ_7745c5c3_Var262, 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: 1120, Col: 121} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1133, Col: 121} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var262)) if templ_7745c5c3_Err != nil { @@ -5520,7 +5533,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var263 string templ_7745c5c3_Var263, 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: 1121, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1134, Col: 78} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var263)) if templ_7745c5c3_Err != nil { @@ -5530,95 +5543,167 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + if f.RegionsMapped() { + templ_7745c5c3_Err = regionMap("select", "#monitor-regions").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 450, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } for _, r := range f.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 450, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 460, "\"> ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var269 string + templ_7745c5c3_Var269, 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: 1155, Col: 16} + } + _, 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, 461, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if r.Own { + var templ_7745c5c3_Var270 string + templ_7745c5c3_Var270, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.own")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1158, Col: 38} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var270)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 462, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + var templ_7745c5c3_Var271 string + templ_7745c5c3_Var271, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.platform")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1160, Col: 43} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var271)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 463, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 464, "· ") + 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, "regions.live", "Count", int(r.Live))) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1162, Col: 63} + } + _, 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, 465, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 459, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 466, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5631,51 +5716,51 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { return templ_7745c5c3_Err } if f.ID != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 460, "") + 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 } @@ -5725,7 +5810,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var273 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var277 := 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 { @@ -5741,7 +5826,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, 465, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 472, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5750,12 +5835,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, 466, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 481, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 488, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 482, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 489, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5920,7 +6005,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, 483, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 490, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5928,7 +6013,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, 484, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 491, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5944,46 +6029,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, 485, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 495, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5992,7 +6077,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, 489, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 496, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6000,7 +6085,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 490, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 497, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6008,79 +6093,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, 491, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6088,30 +6173,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, 500, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 507, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 501, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 503, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 510, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6119,20 +6204,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, 504, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6140,81 +6225,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, 506, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6222,95 +6307,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, 515, "
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - for i, pr := range v.Providers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 523, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 529, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for i, pr := range v.Providers { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 530, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } if pr.Help != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 528, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6344,7 +6429,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 530, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 537, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6353,14 +6438,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, 531, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 538, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var273), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var277), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6404,208 +6489,208 @@ func providerField(f ProviderField) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 532, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 563, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6630,85 +6715,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, 557, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 573, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6751,7 +6836,7 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var318 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var322 := 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 { @@ -6763,20 +6848,20 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - 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 } - var templ_7745c5c3_Var319 string - templ_7745c5c3_Var319, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.monitors.title")) + var templ_7745c5c3_Var323 string + templ_7745c5c3_Var323, 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: 1373, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1404, Col: 115} } - _, 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, 568, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6785,69 +6870,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, 569, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 585, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 592, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 586, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 593, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6955,7 +7040,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, 587, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 594, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6967,20 +7052,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, 588, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 597, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -6996,14 +7081,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, 591, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 598, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var318), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var322), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7035,7 +7120,7 @@ func pingSection(url string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 592, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 599, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7043,55 +7128,55 @@ func pingSection(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 593, "

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

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

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

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

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7137,20 +7222,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, 597, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7178,33 +7263,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, 599, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7236,56 +7321,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, 602, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7311,66 +7396,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, 608, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7395,20 +7480,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, 616, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var347 string - templ_7745c5c3_Var347, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.broker_hint_"+typ)) + var templ_7745c5c3_Var351 string + templ_7745c5c3_Var351, 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: 1504, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1535, Col: 78} } - _, 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, 617, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7435,66 +7520,66 @@ func brokerFields(typ string, b BrokerForm) templ.Component { return templ_7745c5c3_Err } case "kafka": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 618, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7557,7 +7642,7 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var352 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var356 := 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 { @@ -7569,45 +7654,45 @@ func IncidentDetailPage(p Page, me Me, v IncidentDetailView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 626, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.Row.Title != "" { - var templ_7745c5c3_Var354 string - templ_7745c5c3_Var354, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Title) + var templ_7745c5c3_Var358 string + templ_7745c5c3_Var358, 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: 1554, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1585, Col: 17} } - _, 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 } } else { - var templ_7745c5c3_Var355 string - templ_7745c5c3_Var355, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var359 string + templ_7745c5c3_Var359, 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: 1556, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1587, Col: 19} } - _, 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, 628, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 635, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7615,46 +7700,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, 629, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 637, "\" class=\"hover:underline\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var357 string - templ_7745c5c3_Var357, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Monitor) + var templ_7745c5c3_Var361 string + templ_7745c5c3_Var361, 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: 1561, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1592, Col: 100} } - _, 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, 631, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 638, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var358 string - templ_7745c5c3_Var358, templ_7745c5c3_Err = templ.JoinStringErrs(v.Row.Started + " · " + v.Row.Duration) + var templ_7745c5c3_Var362 string + templ_7745c5c3_Var362, 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: 1562, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1593, Col: 87} } - _, 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, 632, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 639, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7662,18 +7747,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, 633, "
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 640, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, e := range v.Timeline { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 634, "
    1. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 641, "
    2. ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } switch e.Kind { case "update": - 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 } @@ -7681,107 +7766,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, 636, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 643, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var359 string - templ_7745c5c3_Var359, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var363 string + templ_7745c5c3_Var363, 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: 1574, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1605, Col: 51} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var359)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var363)) 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 e.Author != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 638, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var360 string - templ_7745c5c3_Var360, 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: 1576, Col: 46} - } - _, 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, 639, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - if !e.Public { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 640, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var361 string - templ_7745c5c3_Var361, 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: 1579, Col: 94} - } - _, 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, 641, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 642, "") + 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, 646, "

      ") + if !e.Public { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 647, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var365 string + templ_7745c5c3_Var365, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.internal")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1610, Col: 94} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var365)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 648, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + if v.CanWrite { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 649, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 653, "

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -7789,103 +7874,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, 647, "
      ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 654, "
      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } case "resolved": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 648, "

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

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

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

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

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var367 string - templ_7745c5c3_Var367, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.began")) + var templ_7745c5c3_Var371 string + templ_7745c5c3_Var371, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "incident.began")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1591, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1622, Col: 83} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var367)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var371)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 652, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 659, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var368 string - templ_7745c5c3_Var368, templ_7745c5c3_Err = templ.JoinStringErrs(e.At) + var templ_7745c5c3_Var372 string + templ_7745c5c3_Var372, 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: 1591, Col: 134} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 1622, Col: 134} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var368)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var372)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 653, "

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

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

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

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

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

      ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 656, "
    3. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 663, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 657, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 664, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 658, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 686, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 693, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var352), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var356), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8183,7 +8268,7 @@ func IncidentStatusesPage(p Page, me Me, statuses []CustomIncidentStatus, canMan } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var383 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var387 := 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 { @@ -8199,7 +8284,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, 687, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 694, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8207,12 +8292,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, 688, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 698, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8234,139 +8319,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, 692, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 694, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if canManage { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 707, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 719, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var383), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var387), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8481,76 +8566,76 @@ func sortSwitch(opts []SortOption) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 713, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 727, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -8612,25 +8697,25 @@ func arrangeList(ms []MonitorRow) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if len(ms) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 721, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/web/regionmap.templ b/internal/web/regionmap.templ new file mode 100644 index 0000000..f103a5f --- /dev/null +++ b/internal/web/regionmap.templ @@ -0,0 +1,68 @@ +package web + +import ( + "strconv" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" +) + +// MapServer serves the map tiles, styles and the MapLibre library the +// region maps load. +const MapServer = "https://maps.zb-server.de" + +// coord formats a coordinate for an attribute or input, empty for none. +func coord(f *float64) string { + if f == nil { + return "" + } + return strconv.FormatFloat(*f, 'f', -1, 64) +} + +// HasLocation reports whether r has a place on the map. +func (r RegionOption) HasLocation() bool { return r.Lat != nil && r.Lon != nil } + +// HasLocation reports whether r has a place on the map. +func (r Region) HasLocation() bool { return r.Lat != nil && r.Lon != nil } + +// regionMap is a map of the regions marked with data-lat and data-lon +// inside the element items selects. In "select" mode a click on a marker +// toggles the region's checkbox; in "edit" mode a click on the map fills +// the active [data-location-form]. The script shows it once the map loads. +templ regionMap(mode, items string) { + +} + +// locationFields are the coordinate inputs of a region; empty ones remove +// the location. +templ locationFields(lat, lon *float64) { +
+ for _, f := range []struct { + label, name, value, min, max string + }{ + {i18n.T(ctx, "regions.latitude"), "latitude", coord(lat), "-90", "90"}, + {i18n.T(ctx, "regions.longitude"), "longitude", coord(lon), "-180", "180"}, + } { + + } +
+} diff --git a/internal/web/regionmap_templ.go b/internal/web/regionmap_templ.go new file mode 100644 index 0000000..8671e05 --- /dev/null +++ b/internal/web/regionmap_templ.go @@ -0,0 +1,224 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.3.1118 + +package web + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "strconv" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" +) + +// MapServer serves the map tiles, styles and the MapLibre library the +// region maps load. +const MapServer = "https://maps.zb-server.de" + +// coord formats a coordinate for an attribute or input, empty for none. +func coord(f *float64) string { + if f == nil { + return "" + } + return strconv.FormatFloat(*f, 'f', -1, 64) +} + +// HasLocation reports whether r has a place on the map. +func (r RegionOption) HasLocation() bool { return r.Lat != nil && r.Lon != nil } + +// HasLocation reports whether r has a place on the map. +func (r Region) HasLocation() bool { return r.Lat != nil && r.Lon != nil } + +// regionMap is a map of the regions marked with data-lat and data-lon +// inside the element items selects. In "select" mode a click on a marker +// toggles the region's checkbox; in "edit" mode a click on the map fills +// the active [data-location-form]. The script shows it once the map loads. +func regionMap(mode, items string) 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, 1, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +// locationFields are the coordinate inputs of a region; empty ones remove +// the location. +func locationFields(lat, lon *float64) 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, 5, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, f := range []struct { + label, name, value, min, max string + }{ + {i18n.T(ctx, "regions.latitude"), "latitude", coord(lat), "-90", "90"}, + {i18n.T(ctx, "regions.longitude"), "longitude", coord(lon), "-180", "180"}, + } { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/web/regions.templ b/internal/web/regions.templ index 17e2715..d7f12e2 100644 --- a/internal/web/regions.templ +++ b/internal/web/regions.templ @@ -1,6 +1,10 @@ package web -import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" +import ( + "strconv" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" +) // Region is a row in a region list. type Region struct { @@ -12,6 +16,9 @@ type Region struct { // Manageable regions can be deleted on the current page. Manageable bool Instances int64 + // Lat and Lon place the region on the map; both are nil without a + // location. + Lat, Lon *float64 } // Agent is a checker or status page server. @@ -65,6 +72,8 @@ type RegionsView struct { templ regionsBody(v RegionsView) {
@sectionHeading("regions.list") +

{ i18n.T(ctx, "regions.location_pick_hint") }

+ @regionMap("edit", "#region-list")
@@ -73,12 +82,20 @@ templ regionsBody(v RegionsView) { + - + for _, r := range v.Regions { - + + + if r.Manageable { + + + + } }
{ i18n.T(ctx, "regions.key") } { i18n.T(ctx, "regions.owner") } { i18n.T(ctx, "regions.instances") }{ i18n.T(ctx, "regions.location") }
{ r.Name } { r.Key } @@ -91,12 +108,41 @@ templ regionsBody(v RegionsView) { 0), templ.KV("text-unknown", r.Instances == 0) }>● { i18n.T(ctx, "regions.live", "Count", int(r.Instances)) } + if r.HasLocation() { + { coord(r.Lat) }, { coord(r.Lon) } + } else { + – + } + if r.Manageable { + + } + if r.Manageable { }
@@ -109,6 +155,9 @@ templ regionsBody(v RegionsView) { @formError() @valueField(i18n.T(ctx, "regions.key"), "key", "", "office-berlin", true) @valueField(i18n.T(ctx, "sso.field.name"), "name", "", "Office Berlin", false) +
+ @locationFields(nil, nil) +
@submit(i18n.T(ctx, "regions.create"))
diff --git a/internal/web/regions_templ.go b/internal/web/regions_templ.go index 574e4c8..285bb7e 100644 --- a/internal/web/regions_templ.go +++ b/internal/web/regions_templ.go @@ -9,7 +9,11 @@ package web import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" +import ( + "strconv" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" +) // Region is a row in a region list. type Region struct { @@ -21,6 +25,9 @@ type Region struct { // Manageable regions can be deleted on the current page. Manageable bool Instances int64 + // Lat and Lon place the region on the map; both are nil without a + // location. + Lat, Lon *float64 } // Agent is a checker or status page server. @@ -96,123 +103,219 @@ func regionsBody(v RegionsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var2 string - templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.field.name")) + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.location_pick_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 72, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 75, Col: 80} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "

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

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = regionMap("edit", "#region-list").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range v.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + if r.Manageable { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var3 string - templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.key")) + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.field.name")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 73, Col: 68} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 81, Col: 71} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var4 string - templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.owner")) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 74, Col: 70} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var5 string - templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.instances")) + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.key")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 75, Col: 74} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 82, Col: 68} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 string + templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.owner")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 83, Col: 70} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var6 string + templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.instances")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 84, Col: 74} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var7 string + templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.location")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 85, Col: 73} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var7 string - templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(r.Key) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 83, Col: 56} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - if r.Platform { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "") + if r.HasLocation() { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, " data-lat=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var8 string - templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.platform")) + templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(coord(r.Lat)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 86, Col: 67} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 93, Col: 31} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\" data-lon=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - } else { var templ_7745c5c3_Var9 string - templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.own")) + templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(coord(r.Lon)).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 88, Col: 37} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 94, Col: 31} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, " data-name=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var10 string + templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(r.Name).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 96, Col: 25} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" data-live=\"") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var11 string + templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.FormatInt(r.Instances, 10)).Resolve(ctx) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 97, Col: 53} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\">") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var12 string + templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 99, Col: 39} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var13 string + templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(r.Key) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 100, Col: 56} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if r.Platform { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var14 string + templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.platform")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 103, Col: 67} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + var templ_7745c5c3_Var15 string + templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.own")) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 105, Col: 37} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -220,25 +323,25 @@ func regionsBody(v RegionsView) 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, 13, " 0), templ.KV("text-unknown", r.Instances == 0)} - templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var10...) + var templ_7745c5c3_Var16 = []any{templ.KV("text-up", r.Instances > 0), templ.KV("text-unknown", r.Instances == 0)} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var16...) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var11 string - templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var10).String()).Resolve(ctx) + var templ_7745c5c3_Var17 string + templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var16).String()).Resolve(ctx) if templ_7745c5c3_Err != nil { return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 1, Col: 0} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -252,74 +355,253 @@ func regionsBody(v RegionsView) templ.Component { } templ.ReleaseBuffer(templ_7745c5c3_Buffer) } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, ">● ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, ">● ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var12 string - templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.live", "Count", int(r.Instances))) + var templ_7745c5c3_Var18 string + templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "regions.live", "Count", int(r.Instances))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 92, Col: 172} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 109, Col: 172} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if r.HasLocation() { + var templ_7745c5c3_Var19 string + templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(coord(r.Lat)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 113, Col: 23} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, ", ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var20 string + templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(coord(r.Lon)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 113, Col: 41} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "– ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + if r.Manageable { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if r.Manageable { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -327,33 +609,33 @@ func regionsBody(v RegionsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -369,11 +651,23 @@ func regionsBody(v RegionsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = locationFields(nil, nil).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } templ_7745c5c3_Err = submit(i18n.T(ctx, "regions.create")).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -381,20 +675,20 @@ func regionsBody(v RegionsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "\" data-show-link>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -406,108 +700,108 @@ func regionsBody(v RegionsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -516,20 +810,20 @@ func regionsBody(v RegionsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var26 string - templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.allow_private_hint")) + var templ_7745c5c3_Var42 string + templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.allow_private_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 138, Col: 93} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 187, Col: 93} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -538,20 +832,20 @@ func regionsBody(v RegionsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Agents) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -573,250 +867,250 @@ func regionsBody(v RegionsView) templ.Component { return templ_7745c5c3_Err } if v.Install.Release != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var28 string - templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.platform_release", "Release", v.Install.Release)) + var templ_7745c5c3_Var44 string + templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.platform_release", "Release", v.Install.Release)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 153, Col: 109} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 202, Col: 109} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -842,7 +1136,7 @@ func RegionsPage(p Page, me Me, v RegionsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var43 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var59 := 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 { @@ -864,7 +1158,7 @@ func RegionsPage(p Page, me Me, v RegionsView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var43), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var59), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -889,7 +1183,7 @@ func AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []C } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var45 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var61 := 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 { @@ -939,7 +1233,7 @@ func AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []C } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var45), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var61), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -972,7 +1266,7 @@ func checkerNetworkSection(allow bool) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -980,7 +1274,7 @@ func checkerNetworkSection(allow bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -992,33 +1286,33 @@ func checkerNetworkSection(allow bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var47 string - templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.platform_private_hint")) + var templ_7745c5c3_Var63 string + templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.platform_private_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 226, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 275, Col: 87} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1045,7 +1339,7 @@ func statusPageHomeSection(url string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1053,20 +1347,20 @@ func statusPageHomeSection(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var50 string - templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.statuspage_home_hint")) + var templ_7745c5c3_Var66 string + templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.statuspage_home_hint")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 237, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 286, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1074,46 +1368,46 @@ func statusPageHomeSection(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1140,7 +1434,7 @@ func checkTypesSection(types []CheckTypeOption, api, next, introID string) templ } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1148,46 +1442,46 @@ func checkTypesSection(types []CheckTypeOption, api, next, introID string) templ 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, 114, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var55 string - templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, introID)) + var templ_7745c5c3_Var71 string + templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, introID)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 254, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 303, Col: 59} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1195,89 +1489,89 @@ func checkTypesSection(types []CheckTypeOption, api, next, introID string) templ if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, t := range types { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1331,7 +1625,7 @@ func moderationSection(v ModerationView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1339,191 +1633,191 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "

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

") 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, "moderation.intro")) + var templ_7745c5c3_Var79 string + templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.intro")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 305, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 354, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) + _, 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, 102, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(v.Pages) == 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var68 string - templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.none")) + var templ_7745c5c3_Var84 string + templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.none")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 318, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 367, Col: 65} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68)) + _, 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, 108, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, pg := range v.Pages { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "") 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 } - var templ_7745c5c3_Var69 string - templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.page")) + var templ_7745c5c3_Var85 string + templ_7745c5c3_Var85, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.page")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 324, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 373, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) + _, 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, 110, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var70 string - templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.org")) + var templ_7745c5c3_Var86 string + templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.org")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 325, Col: 72} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 374, Col: 72} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "") 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, "moderation.owner")) + var templ_7745c5c3_Var87 string + templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.owner")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 326, Col: 74} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 375, Col: 74} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var72 string - templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.created")) + var templ_7745c5c3_Var88 string + templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.created")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 327, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 376, Col: 76} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72)) + _, 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, 113, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"hover:underline\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var74 string - templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Title) + var templ_7745c5c3_Var90 string + templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 334, Col: 119} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 383, Col: 119} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var75 string - templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Slug) + var templ_7745c5c3_Var91 string + templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Slug) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 335, Col: 67} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 384, Col: 67} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1531,33 +1825,33 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var76 string - templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Name) + var templ_7745c5c3_Var92 string + templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 339, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 388, Col: 22} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76)) + _, 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, 119, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var77 string - templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Detail) + var templ_7745c5c3_Var93 string + templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Org.Detail) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 340, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 389, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var77)) + _, 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, 120, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1565,25 +1859,25 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if pg.Owner != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var78 string - templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Owner.Name) + var templ_7745c5c3_Var94 string + templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Owner.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 345, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 394, Col: 49} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1592,38 +1886,38 @@ func moderationSection(v ModerationView) templ.Component { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "–") + 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, 125, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var79 string - templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Created) + var templ_7745c5c3_Var95 string + templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(pg.Created) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 351, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 400, Col: 73} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "
") 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, "moderation.actions")) + var templ_7745c5c3_Var96 string + templ_7745c5c3_Var96, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.actions")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 356, Col: 103} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 405, Col: 103} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var96)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1636,20 +1930,20 @@ func moderationSection(v ModerationView) templ.Component { return templ_7745c5c3_Err } if pg.Owner != nil && pg.Owner.Admin { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var81 string - templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.owner_is_admin")) + var templ_7745c5c3_Var97 string + templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.owner_is_admin")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 361, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 410, Col: 84} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81)) + _, 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, 129, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1659,12 +1953,12 @@ func moderationSection(v ModerationView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1673,7 +1967,7 @@ func moderationSection(v ModerationView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1699,61 +1993,61 @@ func moderationState(suspended string, draft bool) templ.Component { ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) if suspended != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var83 string - templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.suspended")) + var templ_7745c5c3_Var99 string + templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.suspended")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 381, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 430, Col: 40} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83)) + _, 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, 134, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if suspended != "-" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var84 string - templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs("· " + suspended) + var templ_7745c5c3_Var100 string + templ_7745c5c3_Var100, templ_7745c5c3_Err = templ.JoinStringErrs("· " + suspended) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 383, Col: 60} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 432, Col: 60} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84)) + _, 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, 136, "") + 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, 137, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else if draft { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var85 string - templ_7745c5c3_Var85, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.draft")) + var templ_7745c5c3_Var101 string + templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "pages.draft")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 387, Col: 81} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 436, Col: 81} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var85)) + _, 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, 139, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1781,46 +2075,46 @@ func moderationActions(kind, api, suspended, name, next string) templ.Component } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var87 string - templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.target_"+kind)) + var templ_7745c5c3_Var103 string + templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.target_"+kind)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 395, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 444, Col: 115} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87)) + _, 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, 141, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "\" class=\"mb-2\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1829,121 +2123,121 @@ func moderationActions(kind, api, suspended, name, next string) templ.Component return templ_7745c5c3_Err } if suspended != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1968,72 +2262,72 @@ func adminLinks() templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "

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

") 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, "moderation.title")) + var templ_7745c5c3_Var115 string + templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 425, Col: 102} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 474, Col: 102} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var100 string - templ_7745c5c3_Var100, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.title")) + var templ_7745c5c3_Var116 string + templ_7745c5c3_Var116, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 426, Col: 88} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 475, Col: 88} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var100)) + _, 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, 157, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, " ") 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, "audit.platform_title")) + var templ_7745c5c3_Var117 string + templ_7745c5c3_Var117, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "audit.platform_title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 427, Col: 99} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 476, Col: 99} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) + _, 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, 158, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var102 string - templ_7745c5c3_Var102, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "legal.platform_title")) + var templ_7745c5c3_Var118 string + templ_7745c5c3_Var118, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "legal.platform_title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 428, Col: 99} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 477, Col: 99} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var102)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var118)) 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, 188, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var103 string - templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "support.admin_title")) + var templ_7745c5c3_Var119 string + templ_7745c5c3_Var119, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "support.admin_title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 429, Col: 100} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 478, Col: 100} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var119)) 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, 189, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2058,7 +2352,7 @@ func AdminStatusPagesPage(p Page, me Me, v ModerationView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var105 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var121 := 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 { @@ -2070,20 +2364,20 @@ func AdminStatusPagesPage(p Page, me Me, v ModerationView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "

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

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var106 string - templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) + var templ_7745c5c3_Var122 string + templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 435, Col: 109} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 484, Col: 109} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var106)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122)) 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, 191, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2093,7 +2387,7 @@ func AdminStatusPagesPage(p Page, me Me, v ModerationView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var105), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var121), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2118,7 +2412,7 @@ func AdminOrgsPage(p Page, me Me, v OrgsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var108 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var124 := 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 { @@ -2130,20 +2424,20 @@ func AdminOrgsPage(p Page, me Me, v OrgsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "

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

← ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var109 string - templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) + var templ_7745c5c3_Var125 string + templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "admin.title")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 442, Col: 109} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 491, Col: 109} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var109)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2153,7 +2447,7 @@ func AdminOrgsPage(p Page, me Me, v OrgsView) templ.Component { } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var108), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var124), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2180,173 +2474,173 @@ func agentInstall(in InstallView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "\" class=\"mt-6 border-t border-rule pt-4\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var112 string - templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_heading")) + var templ_7745c5c3_Var128 string + templ_7745c5c3_Var128, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "agents.install_heading")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 451, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/regions.templ`, Line: 500, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112)) + _, 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, 167, "

") 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, 208, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/web/testdata/regionmap.html b/internal/web/testdata/regionmap.html new file mode 100644 index 0000000..b90055c --- /dev/null +++ b/internal/web/testdata/regionmap.html @@ -0,0 +1,98 @@ + +
+ +
+ + + +
+
+ + + + +
+
+ + +
+

+
+
+
+
diff --git a/internal/web/testdata/regionmap_offline.html b/internal/web/testdata/regionmap_offline.html
new file mode 100644
index 0000000..9c2fda7
--- /dev/null
+++ b/internal/web/testdata/regionmap_offline.html
@@ -0,0 +1,15 @@
+
+
+
+

+
+
+
+