diff --git a/internal/api/apidocs.go b/internal/api/apidocs.go index d270748..c1442e1 100644 --- a/internal/api/apidocs.go +++ b/internal/api/apidocs.go @@ -57,7 +57,7 @@ var endpoints = []endpoint{ description: "Only monitors the caller may read; header values and heartbeat tokens only for those who may change the monitor.", perm: "monitors.read", resp: obj{"monitors": []monitorView{}}}, {method: "POST", path: "/api/v1/org/monitors", tag: "Monitors", summary: "Create a monitor", - description: "`type` is one of http, json, prometheus, tcp, tls, dns, icmp, postgres, mysql, mssql, mongodb, redis, mqtt, kafka, rabbitmq, grpc, smtp, radius, snmp, heartbeat or alertmanager (GET /api/v1/org/check-types lists those offered); `config` depends on it (see HTTPConfig, JSONConfig, PrometheusConfig, DNSConfig, TLSConfig, DBConfig, BrokerConfig, GRPCConfig, SMTPConfig, RADIUSConfig, SNMPConfig, HeartbeatConfig, AlertmanagerConfig). Passwords, RADIUS secrets and SNMP communities are stored encrypted and never returned: `secrets_set` names those set, and an update that leaves one empty keeps it. Heartbeat and alertmanager monitors take neither target nor regions; heartbeats return their `ping_url`.", + description: "`type` is one of http, json, prometheus, tcp, tls, dns, icmp, postgres, mysql, mssql, mongodb, redis, mqtt, kafka, rabbitmq, grpc, smtp, radius, snmp, steam, minecraft, heartbeat or alertmanager (GET /api/v1/org/check-types lists those offered); `config` depends on it (see HTTPConfig, JSONConfig, PrometheusConfig, DNSConfig, TLSConfig, DBConfig, BrokerConfig, GRPCConfig, SMTPConfig, RADIUSConfig, SNMPConfig, GameConfig, HeartbeatConfig, AlertmanagerConfig). Passwords, RADIUS secrets and SNMP communities are stored encrypted and never returned: `secrets_set` names those set, and an update that leaves one empty keeps it. Heartbeat and alertmanager monitors take neither target nor regions; heartbeats return their `ping_url`.", perm: "monitors.write", req: monitorRequest{}, status: http.StatusCreated, resp: monitorView{}}, {method: "PUT", path: "/api/v1/org/monitors/:id", tag: "Monitors", summary: "Change a monitor", perm: "monitors.write", req: monitorRequest{}, resp: monitorView{}}, diff --git a/internal/api/console.go b/internal/api/console.go index ba6ad68..d9be1ef 100644 --- a/internal/api/console.go +++ b/internal/api/console.go @@ -651,6 +651,10 @@ func fillForm(f *web.MonitorForm, m store.Monitor) { SecretSet: slices.Contains(secrets, "secret"), PasswordSet: slices.Contains(secrets, "password"), CommunitySet: slices.Contains(secrets, "community"), Version: sn.Version, OID: sn.OID, Condition: sn.Condition, Value: sn.Value, } + case check.Steam, check.Minecraft: + var c check.GameConfig + _ = json.Unmarshal(m.Config, &c) + f.Game = web.GameForm{Edition: c.Edition, MinFreeSlots: c.MinFreeSlots} case check.Alertmanager: var c check.AlertmanagerConfig _ = json.Unmarshal(m.Config, &c) diff --git a/internal/api/openapi.go b/internal/api/openapi.go index d9b7efe..60449bc 100644 --- a/internal/api/openapi.go +++ b/internal/api/openapi.go @@ -236,7 +236,7 @@ func buildOpenAPI(publicURL string) map[string]any { }, } // Monitor settings travel as untyped config; their shapes per type. - for _, c := range []any{check.HTTPConfig{}, check.JSONConfig{}, check.PrometheusConfig{}, check.DNSConfig{}, check.TLSConfig{}, check.DBConfig{}, check.BrokerConfig{}, check.GRPCConfig{}, check.SMTPConfig{}, check.RADIUSConfig{}, check.SNMPConfig{}, check.HeartbeatConfig{}, check.AlertmanagerConfig{}} { + for _, c := range []any{check.HTTPConfig{}, check.JSONConfig{}, check.PrometheusConfig{}, check.DNSConfig{}, check.TLSConfig{}, check.DBConfig{}, check.BrokerConfig{}, check.GRPCConfig{}, check.SMTPConfig{}, check.RADIUSConfig{}, check.SNMPConfig{}, check.GameConfig{}, check.HeartbeatConfig{}, check.AlertmanagerConfig{}} { b.schema(reflect.TypeOf(c)) } paths := map[string]map[string]any{} diff --git a/internal/check/check.go b/internal/check/check.go index 47b0db4..fb6545c 100644 --- a/internal/check/check.go +++ b/internal/check/check.go @@ -34,7 +34,7 @@ const ( ) // Types lists every check type. -var Types = []Type{HTTP, TCP, ICMP, DNS, TLS, JSON, Prometheus, Postgres, MySQL, MSSQL, MongoDB, Redis, MQTT, Kafka, RabbitMQ, GRPC, SMTP, RADIUS, SNMP, Heartbeat, Alertmanager} +var Types = []Type{HTTP, TCP, ICMP, DNS, TLS, JSON, Prometheus, Postgres, MySQL, MSSQL, MongoDB, Redis, MQTT, Kafka, RabbitMQ, GRPC, SMTP, RADIUS, SNMP, Steam, Minecraft, Heartbeat, Alertmanager} // Passive reports whether t is reported to us rather than run by checkers. func Passive(t Type) bool { return t == Heartbeat || t == Alertmanager } @@ -109,6 +109,8 @@ var impls = map[Type]impl{ SMTP: smtpCheck{}, RADIUS: radiusCheck{}, SNMP: snmpCheck{}, + Steam: gameCheck{Steam}, + Minecraft: gameCheck{Minecraft}, Heartbeat: heartbeatCheck{}, Alertmanager: alertmanagerCheck{}, } diff --git a/internal/check/games.go b/internal/check/games.go new file mode 100644 index 0000000..22e9a81 --- /dev/null +++ b/internal/check/games.go @@ -0,0 +1,253 @@ +package check + +import ( + "bufio" + "bytes" + "context" + "crypto/rand" + "encoding/binary" + "encoding/json" + "errors" + "fmt" + "io" + "net" + "strconv" + "strings" + "time" + + "git.zb-server.de/ZB-Server/uptimesebi/internal/netguard" +) + +// Game server checks query a server the way game clients list it. +const ( + Steam Type = "steam" + Minecraft Type = "minecraft" +) + +// GameConfig configures game server checks. +type GameConfig struct { + // Edition is "java" or "bedrock" for Minecraft. + Edition string `json:"edition,omitempty"` + // MinFreeSlots fails the check when fewer player slots are free. + MinFreeSlots int `json:"min_free_slots,omitempty"` +} + +type gameCheck struct{ typ Type } + +func (g gameCheck) validate(target string, config json.RawMessage) (json.RawMessage, error) { + if !validHostPort(target) { + return nil, invalid("invalid_target") + } + var c GameConfig + if err := json.Unmarshal(config, &c); err != nil || c.MinFreeSlots < 0 || c.MinFreeSlots > 10000 { + return nil, invalid("invalid_config") + } + switch { + case g.typ == Minecraft && c.Edition == "": + c.Edition = "java" + case g.typ == Minecraft && c.Edition != "java" && c.Edition != "bedrock", + g.typ == Steam && c.Edition != "": + return nil, invalid("invalid_config") + } + return encode(c), nil +} + +// gameStatus is what a server tells about itself. +type gameStatus struct { + Name string + Players, Max int +} + +func (g gameCheck) run(ctx context.Context, s Spec) Outcome { + c, err := decode[GameConfig](s.Config) + if err != nil { + return Outcome{Error: "invalid configuration"} + } + d := netguard.Dialer(s.AllowPrivate, s.Timeout) + var st gameStatus + switch { + case g.typ == Steam: + st, err = queryA2S(ctx, d, s.Target) + case c.Edition == "bedrock": + st, err = pingBedrock(ctx, d, s.Target) + default: + st, err = pingJava(ctx, d, s.Target) + } + var op *net.OpError + switch { + case errors.As(err, &op) && op.Timeout(), errors.Is(err, context.DeadlineExceeded): + return Outcome{Error: "no answer from the game server"} + case errors.As(err, &op): + return Outcome{Error: describeNetErr(err)} + case err != nil: + return Outcome{Error: truncate(err.Error(), 300)} + } + if free := st.Max - st.Players; c.MinFreeSlots > 0 && free < c.MinFreeSlots { + return Outcome{Error: fmt.Sprintf("%d of %d slots taken", st.Players, st.Max)} + } + return Outcome{OK: true} +} + +// udpExchange sends req and returns the first answer. +func udpExchange(ctx context.Context, conn net.Conn, req []byte) ([]byte, error) { + if _, err := conn.Write(req); err != nil { + return nil, err + } + buf := make([]byte, 1500) + n, err := conn.Read(buf) + if err != nil { + return nil, err + } + return buf[:n], ctx.Err() +} + +func deadlineConn(ctx context.Context, d *net.Dialer, network, target string) (net.Conn, error) { + conn, err := d.DialContext(ctx, network, target) + if err != nil { + return nil, err + } + if dl, ok := ctx.Deadline(); ok { + // Leave time to report a silent server before the check's deadline. + _ = conn.SetDeadline(time.Now().Add(time.Until(dl) * 4 / 5)) + } + return conn, nil +} + +var a2sInfo = append([]byte{0xFF, 0xFF, 0xFF, 0xFF, 'T'}, "Source Engine Query\x00"...) + +// queryA2S asks a Steam server for A2S_INFO, answering a challenge if the +// server sends one. +func queryA2S(ctx context.Context, d *net.Dialer, target string) (gameStatus, error) { + conn, err := deadlineConn(ctx, d, "udp", target) + if err != nil { + return gameStatus{}, err + } + defer func() { _ = conn.Close() }() + resp, err := udpExchange(ctx, conn, a2sInfo) + if err != nil { + return gameStatus{}, err + } + if len(resp) == 9 && resp[4] == 'A' { + resp, err = udpExchange(ctx, conn, append(append([]byte{}, a2sInfo...), resp[5:9]...)) + if err != nil { + return gameStatus{}, err + } + } + if len(resp) < 6 || !bytes.Equal(resp[:4], []byte{0xFF, 0xFF, 0xFF, 0xFF}) || resp[4] != 'I' { + return gameStatus{}, errors.New("not a Steam server query answer") + } + r := bytes.NewReader(resp[6:]) + cstr := func() string { + var b strings.Builder + for { + c, err := r.ReadByte() + if err != nil || c == 0 { + return b.String() + } + b.WriteByte(c) + } + } + name := cstr() + _, _, _ = cstr(), cstr(), cstr() // map, folder, game + var rest struct { + ID uint16 + Players, Max uint8 + } + if err := binary.Read(r, binary.LittleEndian, &rest); err != nil { + return gameStatus{}, errors.New("truncated Steam server answer") + } + return gameStatus{Name: name, Players: int(rest.Players), Max: int(rest.Max)}, nil +} + +// pingJava does the Minecraft Java Edition server list ping. +func pingJava(ctx context.Context, d *net.Dialer, target string) (gameStatus, error) { + conn, err := deadlineConn(ctx, d, "tcp", target) + if err != nil { + return gameStatus{}, err + } + defer func() { _ = conn.Close() }() + host, port, _ := net.SplitHostPort(target) + p, _ := strconv.Atoi(port) + var hs bytes.Buffer + hs.WriteByte(0x00) + hs.Write(binary.AppendUvarint(nil, 767)) // protocol version; servers answer any + hs.Write(binary.AppendUvarint(nil, uint64(len(host)))) + hs.WriteString(host) + _ = binary.Write(&hs, binary.BigEndian, uint16(p)) + hs.WriteByte(0x01) // next state: status + var out []byte + out = binary.AppendUvarint(out, uint64(hs.Len())) + out = append(out, hs.Bytes()...) + out = append(out, 0x01, 0x00) // status request + if _, err := conn.Write(out); err != nil { + return gameStatus{}, err + } + r := bufio.NewReader(conn) + length, err := binary.ReadUvarint(r) + if err != nil { + return gameStatus{}, err + } + // The packet ID is checked first: another protocol's greeting would + // otherwise leave us waiting for the rest of an imagined packet. + if id, err := r.ReadByte(); err != nil || id != 0x00 || length < 2 || length > 1<<20 { + return gameStatus{}, errors.New("not a Minecraft server") + } + packet := make([]byte, length-1) + if _, err := io.ReadFull(r, packet); err != nil { + return gameStatus{}, err + } + pr := bytes.NewReader(packet) + n, err := binary.ReadUvarint(pr) + if err != nil || n > uint64(pr.Len()) { + return gameStatus{}, errors.New("not a Minecraft server") + } + var status struct { + Players struct { + Max int `json:"max"` + Online int `json:"online"` + } `json:"players"` + Description json.RawMessage `json:"description"` + } + if err := json.NewDecoder(io.LimitReader(pr, int64(n))).Decode(&status); err != nil { + return gameStatus{}, errors.New("not a Minecraft server") + } + return gameStatus{Players: status.Players.Online, Max: status.Players.Max}, nil +} + +var raknetMagic = []byte{0x00, 0xFF, 0xFF, 0x00, 0xFE, 0xFE, 0xFE, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0x12, 0x34, 0x56, 0x78} + +// pingBedrock sends a RakNet unconnected ping, which Bedrock servers +// answer with their MOTD line. +func pingBedrock(ctx context.Context, d *net.Dialer, target string) (gameStatus, error) { + conn, err := deadlineConn(ctx, d, "udp", target) + if err != nil { + return gameStatus{}, err + } + defer func() { _ = conn.Close() }() + req := []byte{0x01} + req = binary.BigEndian.AppendUint64(req, uint64(time.Now().UnixMilli())) + req = append(req, raknetMagic...) + guid := make([]byte, 8) + _, _ = rand.Read(guid) + req = append(req, guid...) + resp, err := udpExchange(ctx, conn, req) + if err != nil { + return gameStatus{}, err + } + // 0x1C, time (8), server GUID (8), magic (16), length (2), MOTD. + if len(resp) < 35 || resp[0] != 0x1C || !bytes.Equal(resp[17:33], raknetMagic) { + return gameStatus{}, errors.New("not a Minecraft Bedrock server") + } + motd := resp[35:] + if n := int(binary.BigEndian.Uint16(resp[33:35])); n < len(motd) { + motd = motd[:n] + } + // MCPE;name;protocol;version;online;max;... + f := strings.Split(string(motd), ";") + if len(f) < 6 { + return gameStatus{}, errors.New("not a Minecraft Bedrock server") + } + online, _ := strconv.Atoi(f[4]) + maxPlayers, _ := strconv.Atoi(f[5]) + return gameStatus{Name: f[1], Players: online, Max: maxPlayers}, nil +} diff --git a/internal/check/games_test.go b/internal/check/games_test.go new file mode 100644 index 0000000..d86d74b --- /dev/null +++ b/internal/check/games_test.go @@ -0,0 +1,136 @@ +package check + +import ( + "bufio" + "bytes" + "encoding/binary" + "encoding/json" + "io" + "net" + "testing" +) + +func udpServer(t *testing.T, answer func(req []byte) []byte) string { + t.Helper() + pc, err := net.ListenPacket("udp", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { _ = pc.Close() }) + go func() { + buf := make([]byte, 1500) + for { + n, addr, err := pc.ReadFrom(buf) + if err != nil { + return + } + if out := answer(append([]byte{}, buf[:n]...)); out != nil { + _, _ = pc.WriteTo(out, addr) + } + } + }() + return pc.LocalAddr().String() +} + +// steamServer answers A2S_INFO after a challenge, like current servers. +func steamServer(t *testing.T, players, maxPlayers byte) string { + challenge := []byte{0x11, 0x22, 0x33, 0x44} + return udpServer(t, func(req []byte) []byte { + if !bytes.HasPrefix(req, a2sInfo) { + return nil + } + if !bytes.Equal(req[len(a2sInfo):], challenge) { + return append([]byte{0xFF, 0xFF, 0xFF, 0xFF, 'A'}, challenge...) + } + out := []byte{0xFF, 0xFF, 0xFF, 0xFF, 'I', 17} + for _, s := range []string{"Test Server", "de_dust2", "csgo", "Counter-Strike"} { + out = append(append(out, s...), 0) + } + out = binary.LittleEndian.AppendUint16(out, 730) + return append(out, players, maxPlayers, 0, 'd', 'l', 0, 1) + }) +} + +func javaServer(t *testing.T, online, maxPlayers int) string { + l := listen(t) + go func() { + for { + conn, err := l.Accept() + if err != nil { + return + } + go func() { + defer func() { _ = conn.Close() }() + r := bufio.NewReader(conn) + for range 2 { // handshake, status request + n, err := binary.ReadUvarint(r) + if err != nil { + return + } + if _, err := io.CopyN(io.Discard, r, int64(n)); err != nil { + return + } + } + status, _ := json.Marshal(map[string]any{ + "version": map[string]any{"name": "1.21.4", "protocol": 769}, + "players": map[string]any{"max": maxPlayers, "online": online}, + "description": map[string]any{"text": "A Minecraft Server"}, + }) + body := append([]byte{0x00}, binary.AppendUvarint(nil, uint64(len(status)))...) + body = append(body, status...) + _, _ = conn.Write(append(binary.AppendUvarint(nil, uint64(len(body))), body...)) + }() + } + }() + return l.Addr().String() +} + +func bedrockServer(t *testing.T) string { + return udpServer(t, func(req []byte) []byte { + if len(req) < 25 || req[0] != 0x01 || !bytes.Equal(req[9:25], raknetMagic) { + return nil + } + motd := "MCPE;Dedicated Server;766;1.21.50;3;10;1234;Bedrock level;Survival;1;19132;19133;" + out := append([]byte{0x1C}, req[1:9]...) + out = binary.BigEndian.AppendUint64(out, 42) + out = append(out, raknetMagic...) + out = binary.BigEndian.AppendUint16(out, uint16(len(motd))) + return append(out, motd...) + }) +} + +func TestGameChecks(t *testing.T) { + expectOutcomes(t, Steam, steamServer(t, 3, 24), map[string]string{ + `{}`: "", + `{"min_free_slots":21}`: "", + `{"min_free_slots":22}`: "3 of 24 slots taken", + }) + expectOutcomes(t, Minecraft, javaServer(t, 19, 20), map[string]string{ + `{}`: "", + `{"edition":"java","min_free_slots":2}`: "19 of 20 slots taken", + }) + expectOutcomes(t, Minecraft, bedrockServer(t), map[string]string{ + `{"edition":"bedrock"}`: "", + `{"edition":"bedrock","min_free_slots":8}`: "3 of 10 slots taken", + }) + // A port that answers nothing, and one speaking another protocol. + silent := udpServer(t, func([]byte) []byte { return nil }) + expectOutcomes(t, Steam, silent, map[string]string{`{}`: "no answer from the game server"}) + expectOutcomes(t, Minecraft, steamServer(t, 0, 1), map[string]string{`{"edition":"bedrock"}`: "no answer"}) + expectOutcomes(t, Minecraft, smtpServer(t, nil), map[string]string{`{}`: "not a Minecraft server"}) +} + +func TestGameValidate(t *testing.T) { + for _, tc := range []struct { + typ Type + cfg string + }{ + {Minecraft, `{"edition":"pocket"}`}, + {Steam, `{"edition":"java"}`}, + {Steam, `{"min_free_slots":-1}`}, + } { + if _, err := Validate(tc.typ, "game.example.com:27015", []byte(tc.cfg)); err == nil { + t.Errorf("Validate(%s, %s) accepted", tc.typ, tc.cfg) + } + } +} diff --git a/internal/i18n/i18n_test.go b/internal/i18n/i18n_test.go index f313c21..2c9ef05 100644 --- a/internal/i18n/i18n_test.go +++ b/internal/i18n/i18n_test.go @@ -152,7 +152,7 @@ func TestDynamicFamilies(t *testing.T) { en := catalogKeys(t)["en"] families := map[string][]string{ "status.": {"up", "degraded", "down", "unknown", "paused", "maintenance"}, - "monitors.type_": {"http", "tcp", "tls", "dns", "icmp", "json", "prometheus", "postgres", "mysql", "mssql", "mongodb", "redis", "mqtt", "kafka", "rabbitmq", "grpc", "smtp", "radius", "snmp", "heartbeat", "alertmanager"}, + "monitors.type_": {"http", "tcp", "tls", "dns", "icmp", "json", "prometheus", "postgres", "mysql", "mssql", "mongodb", "redis", "mqtt", "kafka", "rabbitmq", "grpc", "smtp", "radius", "snmp", "steam", "minecraft", "heartbeat", "alertmanager"}, "channels.type_": {"webhook", "email", "slack", "discord", "teams", "googlechat", "mattermost", "rocketchat", "telegram", "matrix", "ntfy", "gotify", "pushover", "pushbullet", "signal", "pagerduty", "opsgenie", "apprise"}, "agents.kind_": {"checker", "statuspage"}, "page.status.": {"operational", "degraded", "outage", "unknown", "maintenance"}, @@ -166,6 +166,7 @@ func TestDynamicFamilies(t *testing.T) { "monitors.db_database_": {"postgres", "mysql", "mssql", "mongodb", "redis"}, "monitors.broker_hint_": {"mqtt", "kafka", "rabbitmq"}, "monitors.snmp_cond_": {"any", "eq", "ne", "contains", "gt", "ge", "lt", "le"}, + "monitors.minecraft_": {"java", "bedrock", "hint", "edition"}, "monitors.db_tls_": {"require", "verify", "disable"}, "weekday.": {"0", "1", "2", "3", "4", "5", "6"}, "md.": {"heading", "bold", "italic", "strike", "link", "ul", "ol", "quote", "code", "codeblock", "table", "hr"}, diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index cf1ec1c..f0230d0 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -612,6 +612,8 @@ "monitors.edit": "Monitor bearbeiten", "monitors.expect_status": "Erwarteter Status (z. B. 2xx, 301)", "monitors.follow_redirects": "Weiterleitungen folgen", + "monitors.game_min_free_slots": "Mindestens freie Plätze", + "monitors.game_min_free_slots_hint": "0 prüft nur, ob der Server antwortet.", "monitors.grace": "Toleranz (Sekunden)", "monitors.grace_hint": "Wie spät ein Ping sein darf, für Jobs, die manchmal länger laufen.", "monitors.grpc_hint": "Ziel ist host:port. Fragt den Standard-Health-Service von gRPC (grpc.health.v1); die Antwort muss SERVING sein.", @@ -631,6 +633,10 @@ "monitors.matchers": "Label-Matcher", "monitors.matchers_hint": "Wie in Prometheus: = und != vergleichen, =~ und !~ prüfen einen regulären Ausdruck gegen den ganzen Wert.", "monitors.method": "Methode", + "monitors.minecraft_bedrock": "Bedrock Edition", + "monitors.minecraft_edition": "Edition", + "monitors.minecraft_hint": "Ziel ist host:port (Java meist 25565, Bedrock 19132). Pingt den Server wie die Serverliste im Spiel.", + "monitors.minecraft_java": "Java Edition", "monitors.new": "Neuer Monitor", "monitors.op_absent": "fehlt", "monitors.op_contains": "enthält", @@ -681,6 +687,7 @@ "monitors.snmp_version": "Version", "monitors.stale_hours": "Verfällt nach (Stunden)", "monitors.stale_hours_hint": "Ein feuernder Alert, den Alertmanager nicht mehr wiederholt, gilt nach dieser Zeit als beendet. Halte sie über repeat_interval.", + "monitors.steam_hint": "Ziel ist host:port des Query-Ports (meist der Spielport, z. B. 27015). Fragt den Server wie der Steam-Serverbrowser nach seinen Infos (A2S); funktioniert für Source- und die meisten Steam-Spiele.", "monitors.target": "Ziel", "monitors.target_hint": "URL für HTTP, host:port für TCP, TLS, Datenbanken und Broker (Kafka: mehrere, durch Komma getrennt), Hostname für DNS und ICMP.", "monitors.timeout": "Timeout (ms)", @@ -695,6 +702,7 @@ "monitors.type_icmp": "Ping (ICMP)", "monitors.type_json": "JSON-API", "monitors.type_kafka": "Kafka", + "monitors.type_minecraft": "Minecraft-Server", "monitors.type_mongodb": "MongoDB", "monitors.type_mqtt": "MQTT", "monitors.type_mssql": "Microsoft SQL Server", @@ -706,6 +714,7 @@ "monitors.type_redis": "Redis", "monitors.type_smtp": "SMTP", "monitors.type_snmp": "SNMP", + "monitors.type_steam": "Steam-Spieleserver", "monitors.type_tcp": "TCP-Port", "monitors.type_tls": "TLS-Zertifikat", "monitors.uptime_chart": "Uptime pro Zeitraum", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index 48c8865..b018f19 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -612,6 +612,8 @@ "monitors.edit": "Edit monitor", "monitors.expect_status": "Expected status (e.g. 2xx, 301)", "monitors.follow_redirects": "Follow redirects", + "monitors.game_min_free_slots": "Minimum free slots", + "monitors.game_min_free_slots_hint": "0 only checks that the server answers.", "monitors.grace": "Grace period (seconds)", "monitors.grace_hint": "How late a ping may be, for jobs that sometimes run longer.", "monitors.grpc_hint": "Target is host:port. Asks the standard gRPC health service (grpc.health.v1); the answer must be SERVING.", @@ -631,6 +633,10 @@ "monitors.matchers": "Label matchers", "monitors.matchers_hint": "As in Prometheus: = and != compare, =~ and !~ match a regular expression against the whole value.", "monitors.method": "Method", + "monitors.minecraft_bedrock": "Bedrock Edition", + "monitors.minecraft_edition": "Edition", + "monitors.minecraft_hint": "Target is host:port (Java usually 25565, Bedrock 19132). Pings the server like the in-game server list.", + "monitors.minecraft_java": "Java Edition", "monitors.new": "New monitor", "monitors.op_absent": "is absent", "monitors.op_contains": "contains", @@ -681,6 +687,7 @@ "monitors.snmp_version": "Version", "monitors.stale_hours": "Stale after (hours)", "monitors.stale_hours_hint": "A firing alert Alertmanager stops repeating counts as over after this time. Keep it above repeat_interval.", + "monitors.steam_hint": "Target is host:port of the query port (usually the game port, e.g. 27015). Asks the server for its info like the Steam server browser (A2S); works for Source and most Steam games.", "monitors.target": "Target", "monitors.target_hint": "URL for HTTP, host:port for TCP, TLS, databases and brokers (Kafka: several, comma-separated), host name for DNS and ICMP.", "monitors.timeout": "Timeout (ms)", @@ -695,6 +702,7 @@ "monitors.type_icmp": "Ping (ICMP)", "monitors.type_json": "JSON API", "monitors.type_kafka": "Kafka", + "monitors.type_minecraft": "Minecraft server", "monitors.type_mongodb": "MongoDB", "monitors.type_mqtt": "MQTT", "monitors.type_mssql": "Microsoft SQL Server", @@ -706,6 +714,7 @@ "monitors.type_redis": "Redis", "monitors.type_smtp": "SMTP", "monitors.type_snmp": "SNMP", + "monitors.type_steam": "Steam game server", "monitors.type_tcp": "TCP port", "monitors.type_tls": "TLS certificate", "monitors.uptime_chart": "Uptime per period", diff --git a/internal/web/monitors.templ b/internal/web/monitors.templ index 35390c5..7835c0e 100644 --- a/internal/web/monitors.templ +++ b/internal/web/monitors.templ @@ -494,6 +494,7 @@ type MonitorForm struct { DB DBForm Broker BrokerForm Proto ProtocolForm + Game GameForm // Types are the check types to offer. Types []string } @@ -515,6 +516,12 @@ type ProtocolForm struct { Version, OID, Condition, Value string } +// GameForm holds the settings of game server checks. +type GameForm struct { + Edition string + MinFreeSlots int +} + // DBForm holds the settings of database checks. The password is never // filled in; PasswordSet tells the form one is stored. type DBForm struct { @@ -669,6 +676,22 @@ templ MonitorEditor(p Page, me Me, f MonitorForm) { @valueField(i18n.T(ctx, "monitors.snmp_value"), "config.value", f.Proto.Value, "", false) } + @typeFields("steam", f.Type) { +

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

+ @numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")) + } + @typeFields("minecraft", f.Type) { +

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

+ + @numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")) + } @typeFields("alertmanager", f.Type) {

{ i18n.T(ctx, "monitors.alertmanager_hint") } diff --git a/internal/web/monitors_templ.go b/internal/web/monitors_templ.go index 969c6e1..a27c68e 100644 --- a/internal/web/monitors_templ.go +++ b/internal/web/monitors_templ.go @@ -1926,6 +1926,7 @@ type MonitorForm struct { DB DBForm Broker BrokerForm Proto ProtocolForm + Game GameForm // Types are the check types to offer. Types []string } @@ -1947,6 +1948,12 @@ type ProtocolForm struct { Version, OID, Condition, Value string } +// GameForm holds the settings of game server checks. +type GameForm struct { + Edition string + MinFreeSlots int +} + // DBForm holds the settings of database checks. The password is never // filled in; PasswordSet tells the form one is stored. type DBForm struct { @@ -2002,7 +2009,7 @@ func headersField(value string) templ.Component { var templ_7745c5c3_Var87 string templ_7745c5c3_Var87, 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: 551, Col: 116} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 558, Col: 116} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87)) if templ_7745c5c3_Err != nil { @@ -2015,7 +2022,7 @@ func headersField(value string) templ.Component { var templ_7745c5c3_Var88 string templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 552, Col: 214} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 559, Col: 214} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88)) if templ_7745c5c3_Err != nil { @@ -2028,7 +2035,7 @@ func headersField(value string) templ.Component { var templ_7745c5c3_Var89 string templ_7745c5c3_Var89, 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: 553, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 560, Col: 84} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) if templ_7745c5c3_Err != nil { @@ -2067,7 +2074,7 @@ func typeFields(typ, current string) templ.Component { var templ_7745c5c3_Var91 string templ_7745c5c3_Var91, 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: 558, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 565, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var91) if templ_7745c5c3_Err != nil { @@ -2129,7 +2136,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var93 string templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 565, Col: 90} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 572, Col: 90} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93)) if templ_7745c5c3_Err != nil { @@ -2142,7 +2149,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var94 string templ_7745c5c3_Var94, 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: 568, Col: 14} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 575, Col: 14} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var94) if templ_7745c5c3_Err != nil { @@ -2155,7 +2162,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var95 string templ_7745c5c3_Var95, 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: 570, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 577, Col: 30} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var95) if templ_7745c5c3_Err != nil { @@ -2168,7 +2175,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var96 string templ_7745c5c3_Var96, 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: 571, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 578, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var96) if templ_7745c5c3_Err != nil { @@ -2181,7 +2188,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var97 string templ_7745c5c3_Var97, 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: 572, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 579, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var97) if templ_7745c5c3_Err != nil { @@ -2199,7 +2206,7 @@ func numberField(label, name string, value, min, max int, hint string) templ.Com var templ_7745c5c3_Var98 string templ_7745c5c3_Var98, templ_7745c5c3_Err = templ.JoinStringErrs(hint) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 576, Col: 53} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 583, Col: 53} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var98)) if templ_7745c5c3_Err != nil { @@ -2259,7 +2266,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var101 string templ_7745c5c3_Var101, 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: 585, Col: 93} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 592, Col: 93} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101)) if templ_7745c5c3_Err != nil { @@ -2277,7 +2284,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var102 string templ_7745c5c3_Var102, 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: 587, Col: 48} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 594, Col: 48} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var102) if templ_7745c5c3_Err != nil { @@ -2290,7 +2297,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var103 string templ_7745c5c3_Var103, 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: 587, Col: 97} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 594, Col: 97} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) if templ_7745c5c3_Err != nil { @@ -2308,7 +2315,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var104 string templ_7745c5c3_Var104, 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: 590, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 597, Col: 65} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104)) if templ_7745c5c3_Err != nil { @@ -2331,7 +2338,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var105 string templ_7745c5c3_Var105, 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: 596, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 603, Col: 38} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var105) if templ_7745c5c3_Err != nil { @@ -2344,7 +2351,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var106 string templ_7745c5c3_Var106, 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: 598, Col: 35} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 605, Col: 35} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var106) if templ_7745c5c3_Err != nil { @@ -2374,7 +2381,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var107 string templ_7745c5c3_Var107, 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: 606, Col: 115} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 613, Col: 115} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var107)) if templ_7745c5c3_Err != nil { @@ -2395,7 +2402,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var108 string templ_7745c5c3_Var108, 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: 610, Col: 116} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 617, Col: 116} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var108)) if templ_7745c5c3_Err != nil { @@ -2413,7 +2420,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var109 string templ_7745c5c3_Var109, templ_7745c5c3_Err = templruntime.NewAttributeExpression(t).Resolve(ctx) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 613, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 620, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var109) if templ_7745c5c3_Err != nil { @@ -2436,7 +2443,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var110 string templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.type_"+t)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 613, Col: 86} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 620, Col: 86} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110)) if templ_7745c5c3_Err != nil { @@ -2472,7 +2479,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var111 string templ_7745c5c3_Var111, 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: 619, Col: 83} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 626, Col: 83} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var111)) if templ_7745c5c3_Err != nil { @@ -2549,7 +2556,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var115 string templ_7745c5c3_Var115, 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: 632, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 639, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115)) if templ_7745c5c3_Err != nil { @@ -2592,7 +2599,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var117 string templ_7745c5c3_Var117, 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: 637, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 644, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var117)) if templ_7745c5c3_Err != nil { @@ -2635,7 +2642,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var119 string templ_7745c5c3_Var119, 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: 642, Col: 77} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 649, Col: 77} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var119)) if templ_7745c5c3_Err != nil { @@ -2686,7 +2693,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var121 string templ_7745c5c3_Var121, 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: 649, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 656, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var121)) if templ_7745c5c3_Err != nil { @@ -2699,7 +2706,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var122 string templ_7745c5c3_Var122, 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: 651, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 658, Col: 125} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122)) if templ_7745c5c3_Err != nil { @@ -2717,7 +2724,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var123 string templ_7745c5c3_Var123, 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: 654, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 661, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var123) if templ_7745c5c3_Err != nil { @@ -2740,7 +2747,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var124 string templ_7745c5c3_Var124, 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: 654, Col: 72} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 661, Col: 72} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) if templ_7745c5c3_Err != nil { @@ -2770,7 +2777,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var125 string templ_7745c5c3_Var125, 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: 662, Col: 128} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 669, Col: 128} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) if templ_7745c5c3_Err != nil { @@ -2788,7 +2795,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var126 string templ_7745c5c3_Var126, 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: 665, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 672, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var126) if templ_7745c5c3_Err != nil { @@ -2811,7 +2818,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { var templ_7745c5c3_Var127 string templ_7745c5c3_Var127, 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: 665, Col: 113} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 672, Col: 113} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var127)) if templ_7745c5c3_Err != nil { @@ -2857,164 +2864,190 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { return templ_7745c5c3_Err } var templ_7745c5c3_Var129 string - templ_7745c5c3_Var129, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.alertmanager_hint")) + templ_7745c5c3_Var129, 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: 674, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 680, Col: 76} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var129)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 220, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 220, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var130 string - templ_7745c5c3_Var130, 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: 675, Col: 111} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var130)) + templ_7745c5c3_Err = numberField(i18n.T(ctx, "monitors.game_min_free_slots"), "config.min_free_slots", f.Game.MinFreeSlots, 0, 10000, i18n.T(ctx, "monitors.game_min_free_slots_hint")).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 221, "

") + return nil + }) + templ_7745c5c3_Err = typeFields("steam", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var128), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var130 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 221, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var131 string - templ_7745c5c3_Var131, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.matchers")) + templ_7745c5c3_Var131, 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: 678, Col: 123} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 684, Col: 80} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var131)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 222, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 222, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3074,11 +3218,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("alertmanager", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var128), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("alertmanager", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var135), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var143 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var150 := 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 { @@ -3090,20 +3234,20 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 240, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var144 string - templ_7745c5c3_Var144, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.heartbeat_hint")) + var templ_7745c5c3_Var151 string + templ_7745c5c3_Var151, 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: 695, Col: 80} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 718, Col: 80} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var144)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var151)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3113,11 +3257,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("heartbeat", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var143), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("heartbeat", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var150), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var145 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var152 := 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 { @@ -3129,66 +3273,66 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3214,11 +3358,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("http", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var145), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("http", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var152), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var149 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var156 := 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 { @@ -3230,203 +3374,203 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, "

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var150 string - templ_7745c5c3_Var150, 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: 717, Col: 75} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var150)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 251, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3444,11 +3588,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("prometheus", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var149), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("prometheus", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var156), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var162 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var169 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -3460,92 +3604,92 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3557,156 +3701,45 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 292, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var168 string - templ_7745c5c3_Var168, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions")) + var templ_7745c5c3_Var175 string + templ_7745c5c3_Var175, 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: 766, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 789, Col: 125} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var168)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var169 string - templ_7745c5c3_Var169, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.assertions_hint")) + var templ_7745c5c3_Var176 string + templ_7745c5c3_Var176, 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: 767, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 790, Col: 82} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var169)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, a := range f.Assertions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "\" class=\"min-w-0 border border-rule bg-transparent px-2 py-1 font-mono text-xs outline-none focus:border-ink\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 310, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return nil }) - templ_7745c5c3_Err = typeFields("json", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var162), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("json", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var169), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var180 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var187 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -3765,66 +3909,66 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3838,11 +3982,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("dns", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var180), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("dns", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var187), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Var184 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var191 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { @@ -3864,11 +4008,11 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { } return nil }) - templ_7745c5c3_Err = typeFields("tls", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var184), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = typeFields("tls", f.Type).Render(templ.WithChildren(ctx, templ_7745c5c3_Var191), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3876,17 +4020,17 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 322, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3894,7 +4038,7 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3902,141 +4046,141 @@ func MonitorEditor(p Page, me Me, f MonitorForm) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 327, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var185 string - templ_7745c5c3_Var185, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions")) + var templ_7745c5c3_Var192 string + templ_7745c5c3_Var192, 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: 805, Col: 121} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 828, Col: 121} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var185)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var192)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var186 string - templ_7745c5c3_Var186, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "monitors.regions_hint")) + var templ_7745c5c3_Var193 string + templ_7745c5c3_Var193, 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: 806, Col: 78} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/monitors.templ`, Line: 829, Col: 78} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var186)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var193)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, r := range f.Regions { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 338, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 328, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4049,51 +4193,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, 329, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 343, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4142,7 +4286,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var196 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var203 := 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 { @@ -4159,12 +4303,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, 334, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 360, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 350, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 361, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4329,7 +4473,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, 351, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 362, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4337,7 +4481,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, 352, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 363, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4353,20 +4497,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, 353, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 365, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4375,7 +4519,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, 355, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 366, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4383,7 +4527,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, 356, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 367, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4391,79 +4535,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, 357, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4471,30 +4615,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, 366, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 377, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 367, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 369, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 380, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4502,20 +4646,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, 370, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4523,56 +4667,56 @@ 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, 372, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4580,118 +4724,118 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 378, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 396, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, pr := range v.Providers { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 386, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 401, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if pr.Help != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 391, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4702,7 +4846,7 @@ func ChannelsPage(p Page, me Me, v ChannelsView) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 393, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 404, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4711,14 +4855,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, 394, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 405, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var196), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var203), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4761,208 +4905,208 @@ func providerField(f ProviderField) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 395, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 430, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4987,85 +5131,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, 420, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 440, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5108,7 +5252,7 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var238 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var245 := 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 { @@ -5120,20 +5264,20 @@ func GroupsPage(p Page, me Me, v GroupsView) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 430, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5142,69 +5286,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, 432, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 448, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 459, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if v.CanWrite { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 449, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 460, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5312,7 +5456,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, 450, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 461, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5324,20 +5468,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, 451, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 464, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5353,14 +5497,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, 454, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 465, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } return nil }) - templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var238), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = consoleShell(p, me).Render(templ.WithChildren(ctx, templ_7745c5c3_Var245), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5392,7 +5536,7 @@ func pingSection(url string) templ.Component { } ctx = templ.InitializeContext(ctx) ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 455, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 466, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5400,55 +5544,55 @@ func pingSection(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 456, "

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

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

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

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5494,20 +5638,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, 460, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5535,33 +5679,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, 462, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5593,56 +5737,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, 465, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5668,66 +5812,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, 471, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5752,20 +5896,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, 479, "

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

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

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

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -5792,66 +5936,66 @@ func brokerFields(typ string, b BrokerForm) templ.Component { return templ_7745c5c3_Err } case "kafka": - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 481, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }