feat: page long and truncated lists
ci / image (pull_request) Successful in 3m18s
ci / build (pull_request) Successful in 8m38s
ci / test (pull_request) Successful in 12m6s
ci / lint (pull_request) Successful in 15m0s

Lists that were cut off by a fixed LIMIT, or could grow without bound,
are paged by keyset: the cursor holds the sort key and an ID, so pages
neither skip nor repeat items as others are added. The audit logs had a
timestamp-only cursor that could skip entries with equal times.

The API returns at most 100 items per list (limit takes up to 500) with
next_cursor and prev_cursor, passed back as after and before. The
console shows Newer/Older (or Previous/Next) links and To the start,
without JavaScript.

Paged: incidents (optionally of one monitor), a monitor's results and
evidence, a checker's results, the audit logs, members, maintenance
windows, firing Alertmanager alerts, the monitors API and the admin
lists of status pages and organizations, which move to their own admin
pages. A monitor's page shows its latest incidents and results and links
to all of them. The dashboard caps every group at 50 of its own monitors
with a link to a paged view of the group, and gains a search by name or
target. Lists filtered by permission after reading may show fewer items
on a page.

Closes #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-22 21:40:25 +01:00
1 parent 98fb5d3a82
commit d7c5cd711e
63 files changed
+5427 -3041

No files matched your search

+7 -13
View File
@@ -2,7 +2,6 @@ package web
import (
"context"
"net/url"
"strconv"
"git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
@@ -21,8 +20,10 @@ type LimitsView struct {
type OrgsView struct {
Search string
Orgs []OrgRow
Limited bool
Pager Pager
Defaults LimitsView
// Next is the page to return to after an action.
Next string
}
// OrgRow is an organization with its usage and limits. Overrides are form
@@ -40,12 +41,7 @@ type OrgRow struct {
OwnerOrgLimit string
}
func (v OrgsView) next() string {
if v.Search == "" {
return "/admin#orgs"
}
return "/admin?oq=" + url.QueryEscape(v.Search) + "#orgs"
}
func (v OrgsView) next() string { return v.Next }
// limitText shows a limit, or "unlimited".
func limitText(ctx context.Context, n int) string {
@@ -97,10 +93,10 @@ templ orgsSection(v OrgsView) {
<section id="orgs" class="mb-12">
@sectionHeading("orgs.title")
<p class="mb-4 max-w-3xl text-sm text-muted">{ i18n.T(ctx, "orgs.intro") }</p>
<form method="get" action="/admin#orgs" class="mb-4 flex max-w-xl gap-2">
<form method="get" action="/admin/orgs" class="mb-4 flex max-w-xl gap-2">
<input
type="search"
name="oq"
name="q"
value={ v.Search }
placeholder={ i18n.T(ctx, "orgs.search") }
aria-label={ i18n.T(ctx, "orgs.search") }
@@ -185,10 +181,8 @@ templ orgsSection(v OrgsView) {
</tbody>
</table>
</div>
if v.Limited {
<p class="mt-3 text-xs text-muted">{ i18n.T(ctx, "moderation.limited") }</p>
}
}
@pager(v.Pager, "newer", "older")
</section>
}
+109 -128
View File
@@ -11,7 +11,6 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"context"
"net/url"
"strconv"
"git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
@@ -30,8 +29,10 @@ type LimitsView struct {
type OrgsView struct {
Search string
Orgs []OrgRow
Limited bool
Pager Pager
Defaults LimitsView
// Next is the page to return to after an action.
Next string
}
// OrgRow is an organization with its usage and limits. Overrides are form
@@ -49,12 +50,7 @@ type OrgRow struct {
OwnerOrgLimit string
}
func (v OrgsView) next() string {
if v.Search == "" {
return "/admin#orgs"
}
return "/admin?oq=" + url.QueryEscape(v.Search) + "#orgs"
}
func (v OrgsView) next() string { return v.Next }
// limitText shows a limit, or "unlimited".
func limitText(ctx context.Context, n int) string {
@@ -96,7 +92,7 @@ func limitsSection(d LimitsView) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.intro"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 61, Col: 66}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 57, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -145,7 +141,7 @@ func limitsSection(d LimitsView) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_count_hint"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 71, Col: 89}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 67, Col: 89}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -158,7 +154,7 @@ func limitsSection(d LimitsView) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.save"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 72, Col: 129}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 68, Col: 129}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -198,7 +194,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 81, Col: 90}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 77, Col: 90}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -211,7 +207,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(name).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 84, Col: 14}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 80, Col: 14}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)
if templ_7745c5c3_Err != nil {
@@ -224,7 +220,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, 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/admin_orgs.templ`, Line: 88, Col: 26}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 84, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)
if templ_7745c5c3_Err != nil {
@@ -237,7 +233,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(value).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 89, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 85, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)
if templ_7745c5c3_Err != nil {
@@ -250,7 +246,7 @@ func overrideField(label, name, value string, def int, max int) templ.Component
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "limits.default", "Value", limitText(ctx, def))).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 90, Col: 76}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 86, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)
if templ_7745c5c3_Err != nil {
@@ -296,20 +292,20 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.intro"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 99, Col: 74}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 95, Col: 74}
}
_, 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, "</p><form method=\"get\" action=\"/admin#orgs\" class=\"mb-4 flex max-w-xl gap-2\"><input type=\"search\" name=\"oq\" value=\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</p><form method=\"get\" action=\"/admin/orgs\" class=\"mb-4 flex max-w-xl gap-2\"><input type=\"search\" name=\"q\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.Search).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 104, Col: 20}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 100, Col: 20}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)
if templ_7745c5c3_Err != nil {
@@ -322,7 +318,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "orgs.search")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 105, Col: 44}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 101, Col: 44}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14)
if templ_7745c5c3_Err != nil {
@@ -335,7 +331,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "orgs.search")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 106, Col: 43}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 102, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)
if templ_7745c5c3_Err != nil {
@@ -348,7 +344,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.search_button"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 109, Col: 142}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 105, Col: 142}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -366,7 +362,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.none"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 112, Col: 59}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 108, Col: 59}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -384,7 +380,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, 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/admin_orgs.templ`, Line: 118, Col: 72}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 114, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -397,7 +393,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, 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/admin_orgs.templ`, Line: 119, Col: 74}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 115, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -410,7 +406,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.monitors"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 120, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 116, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -423,7 +419,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.status_pages"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 121, Col: 77}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 117, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -436,7 +432,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, 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/admin_orgs.templ`, Line: 122, Col: 76}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 118, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
@@ -454,7 +450,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(o.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 129, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 125, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -467,7 +463,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(o.Slug)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 130, Col: 66}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 126, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -493,7 +489,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(o.Owner.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 135, Col: 48}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 131, Col: 48}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -536,7 +532,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(o.Created)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 143, Col: 72}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 139, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -549,7 +545,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.manage"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 148, Col: 96}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 144, Col: 96}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {
@@ -562,7 +558,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/admin/orgs/" + o.ID + "/limits").Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 150, Col: 61}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 146, Col: 61}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28)
if templ_7745c5c3_Err != nil {
@@ -575,7 +571,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.next()).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 150, Col: 102}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 146, Col: 102}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29)
if templ_7745c5c3_Err != nil {
@@ -588,7 +584,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "orgs.limits"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 151, Col: 113}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 147, Col: 113}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -621,7 +617,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_count"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 157, Col: 135}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 153, Col: 135}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
if templ_7745c5c3_Err != nil {
@@ -644,7 +640,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var32 string
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.default", "Value", i18n.T(ctx, "limits.own_"+strconv.FormatBool(v.Defaults.OwnRegionsCount))))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 159, Col: 187}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 155, Col: 187}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
if templ_7745c5c3_Err != nil {
@@ -667,7 +663,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_true"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 160, Col: 112}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 156, Col: 112}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
if templ_7745c5c3_Err != nil {
@@ -690,7 +686,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_false"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 161, Col: 115}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 157, Col: 115}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
if templ_7745c5c3_Err != nil {
@@ -703,7 +699,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var35 string
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.save"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 164, Col: 130}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 160, Col: 130}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
if templ_7745c5c3_Err != nil {
@@ -725,7 +721,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var36 string
templ_7745c5c3_Var36, 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/admin_orgs.templ`, Line: 168, Col: 84}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 164, Col: 84}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
if templ_7745c5c3_Err != nil {
@@ -743,7 +739,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/admin/users/" + o.Owner.ID + "/limits").Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 171, Col: 70}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 167, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var37)
if templ_7745c5c3_Err != nil {
@@ -756,7 +752,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.next()).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 171, Col: 111}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 167, Col: 111}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var38)
if templ_7745c5c3_Err != nil {
@@ -769,7 +765,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var39 string
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.target_owner"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 172, Col: 127}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 168, Col: 127}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
if templ_7745c5c3_Err != nil {
@@ -794,7 +790,7 @@ func orgsSection(v OrgsView) templ.Component {
var templ_7745c5c3_Var40 string
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.save"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 175, Col: 132}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 171, Col: 132}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
if templ_7745c5c3_Err != nil {
@@ -822,27 +818,12 @@ func orgsSection(v OrgsView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if v.Limited {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<p class=\"mt-3 text-xs text-muted\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var41 string
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "moderation.limited"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 189, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</p>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</section>")
templ_7745c5c3_Err = pager(v.Pager, "newer", "older").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</section>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -872,25 +853,25 @@ func usage(used, max int) 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, 71, "<span class=\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<span class=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var43 = []any{templ.KV("text-down", max > 0 && used >= max)}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var43...)
var templ_7745c5c3_Var42 = []any{templ.KV("text-down", max > 0 && used >= max)}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var42...)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var44 string
templ_7745c5c3_Var44, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var43).String()).Resolve(ctx)
var templ_7745c5c3_Var43 string
templ_7745c5c3_Var43, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var42).String()).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -904,33 +885,33 @@ func usage(used, max int) templ.Component {
}
templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, ">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, ">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var44 string
templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(used))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 191, Col: 83}
}
_, 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, 72, " / ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var45 string
templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(used))
templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(limitText(ctx, max))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 197, Col: 83}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 191, Col: 109}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, " / ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var46 string
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(limitText(ctx, max))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 197, Col: 109}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</span>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</span>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -961,7 +942,7 @@ func usageSection(u UsageView) templ.Component {
}
ctx = templ.InitializeContext(ctx)
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<section class=\"mb-12 max-w-xl\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "<section class=\"mb-12 max-w-xl\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -969,14 +950,35 @@ func usageSection(u UsageView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "<dl class=\"grid grid-cols-[1fr_auto] gap-x-6 gap-y-1.5 text-sm\"><dt>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "<dl class=\"grid grid-cols-[1fr_auto] gap-x-6 gap-y-1.5 text-sm\"><dt>")
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, "limits.monitors"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 204, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</dt><dd class=\"font-mono text-xs\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = usage(u.Monitors, u.Limits.Monitors).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</dd><dt>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var48 string
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.monitors"))
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.status_pages"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 210, Col: 39}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 206, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
if templ_7745c5c3_Err != nil {
@@ -986,7 +988,7 @@ func usageSection(u UsageView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = usage(u.Monitors, u.Limits.Monitors).Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = usage(u.StatusPages, u.Limits.StatusPages).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -995,9 +997,9 @@ func usageSection(u UsageView) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var49 string
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.status_pages"))
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.regions_per_monitor"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 212, Col: 43}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 208, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
if templ_7745c5c3_Err != nil {
@@ -1007,60 +1009,39 @@ func usageSection(u UsageView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = usage(u.StatusPages, u.Limits.StatusPages).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "</dd><dt>")
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, "limits.regions_per_monitor"))
templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(limitText(ctx, u.Limits.RegionsPerMonitor))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 214, Col: 50}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 209, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "</dt><dd class=\"font-mono text-xs\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var51 string
templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(limitText(ctx, u.Limits.RegionsPerMonitor))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 215, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "</dd></dl>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "</dd></dl>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if u.Limits.RegionsPerMonitor > 0 && !u.Limits.OwnRegionsCount {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<p class=\"mt-2 text-xs text-muted\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<p class=\"mt-2 text-xs text-muted\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var52 string
templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_free"))
var templ_7745c5c3_Var51 string
templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "limits.own_regions_free"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 218, Col: 78}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/admin_orgs.templ`, Line: 212, Col: 78}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "</p>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "</p>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "</section>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "</section>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+2
View File
@@ -6,6 +6,7 @@ import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
type AlertmanagerView struct {
Receivers []ReceiverRow
Alerts []AlertRow
Pager Pager
CanManage bool
}
@@ -67,6 +68,7 @@ templ AlertmanagerPage(p Page, me Me, v AlertmanagerView) {
}
</ul>
}
@pager(v.Pager, "newer", "older")
</section>
if v.CanManage {
<section class="max-w-2xl">
+23 -18
View File
@@ -15,6 +15,7 @@ import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
type AlertmanagerView struct {
Receivers []ReceiverRow
Alerts []AlertRow
Pager Pager
CanManage bool
}
@@ -86,7 +87,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.no_alerts"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 37, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 38, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -117,7 +118,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 45, Col: 43}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 46, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -130,7 +131,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.since", "Time", a.Since))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 46, Col: 104}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 47, Col: 104}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -148,7 +149,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(a.Summary)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 49, Col: 54}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 50, Col: 54}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -171,7 +172,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(l[0] + "=" + l[1])
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 53, Col: 87}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 54, Col: 87}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -194,7 +195,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(a.CreateURL)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 59, Col: 45}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 60, Col: 45}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)
if templ_7745c5c3_Err != nil {
@@ -207,7 +208,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.create_monitor"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 59, Col: 160}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 60, Col: 160}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -226,7 +227,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(m.URL)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 62, Col: 40}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 63, Col: 40}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)
if templ_7745c5c3_Err != nil {
@@ -239,7 +240,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(m.Label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 62, Col: 82}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 63, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -261,6 +262,10 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = pager(v.Pager, "newer", "older").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</section>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
@@ -287,7 +292,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
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/alertmanager.templ`, Line: 79, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 81, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -300,7 +305,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(r.Prefix)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 80, Col: 62}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 82, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -313,7 +318,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.last_received", "Time", r.LastSeen))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 83, Col: 115}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 85, Col: 115}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -326,7 +331,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/alertmanager/receivers/" + r.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 84, Col: 82}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 86, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)
if templ_7745c5c3_Err != nil {
@@ -339,7 +344,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "alertmanager.delete_confirm")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 84, Col: 142}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 86, Col: 142}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)
if templ_7745c5c3_Err != nil {
@@ -352,7 +357,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.delete"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 84, Col: 245}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 86, Col: 245}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -391,7 +396,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.copy_now"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 95, Col: 68}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 97, Col: 68}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -404,7 +409,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "alertmanager.config_hint"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 99, Col: 74}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 101, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -417,7 +422,7 @@ func AlertmanagerPage(p Page, me Me, v AlertmanagerView) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(alertmanagerExample)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 100, Col: 117}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/alertmanager.templ`, Line: 102, Col: 117}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
+2 -4
View File
@@ -13,13 +13,11 @@ type AuditEntry struct {
Failed bool
}
templ AuditPage(p Page, me Me, titleID, introID string, entries []AuditEntry, next string) {
templ AuditPage(p Page, me Me, titleID, introID string, entries []AuditEntry, pg Pager) {
@consoleShell(p, me) {
@settingsHeading(titleID, introID)
@auditList(entries)
if next != "" {
<a href={ templ.SafeURL(next) } class="mt-4 inline-block text-sm underline underline-offset-2">{ i18n.T(ctx, "audit.older") }</a>
}
@pager(pg, "newer", "older")
}
}
+54 -82
View File
@@ -22,7 +22,7 @@ type AuditEntry struct {
Failed bool
}
func AuditPage(p Page, me Me, titleID, introID string, entries []AuditEntry, next string) templ.Component {
func AuditPage(p Page, me Me, titleID, introID string, entries []AuditEntry, pg Pager) 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 {
@@ -59,37 +59,9 @@ func AuditPage(p Page, me Me, titleID, introID string, entries []AuditEntry, nex
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if next != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(next)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 21, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" class=\"mt-4 inline-block text-sm underline underline-offset-2\">")
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, "audit.older"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 21, Col: 126}
}
_, 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, 3, "</a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = pager(pg, "newer", "older").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
@@ -119,43 +91,43 @@ func auditList(entries []AuditEntry) templ.Component {
ctx = templ.InitializeContext(ctx)
ctx = templ.ClearChildren(ctx)
if len(entries) == 0 {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<p class=\"text-sm text-muted\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<p class=\"text-sm text-muted\">")
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, "audit.empty"))
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "audit.empty"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 28, Col: 60}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 26, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
_, 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, "</p>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</p>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<ul class=\"divide-y divide-rule border-y border-rule text-sm\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<ul class=\"divide-y divide-rule border-y border-rule text-sm\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, e := range entries {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<li class=\"grid gap-x-4 gap-y-0.5 py-2 sm:grid-cols-[10rem_1fr_auto]\"><span class=\"font-mono text-xs text-muted\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<li class=\"grid gap-x-4 gap-y-0.5 py-2 sm:grid-cols-[10rem_1fr_auto]\"><span class=\"font-mono text-xs text-muted\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(e.Time)
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(e.Time)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 33, Col: 56}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 31, Col: 56}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
_, 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, 8, "</span> <span>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</span> <span>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -163,25 +135,25 @@ func auditList(entries []AuditEntry) 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, 9, "<span class=\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<span class=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 = []any{templ.KV("text-down", e.Failed)}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var8...)
var templ_7745c5c3_Var6 = []any{templ.KV("text-down", e.Failed)}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var6...)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var8).String()).Resolve(ctx)
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var6).String()).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -195,93 +167,93 @@ func auditList(entries []AuditEntry) templ.Component {
}
templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, ">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, ">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(e.Action)
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(e.Action)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 35, Col: 64}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 33, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</span> ")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</span> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if e.Target != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<span class=\"text-muted\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<span class=\"text-muted\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + e.Target)
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + e.Target)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 37, Col: 51}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 35, Col: 51}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</span> ")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</span> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
if e.Actor != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<span class=\"block text-xs text-muted\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<span class=\"block text-xs text-muted\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(e.Actor)
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(e.Actor)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 40, Col: 55}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 38, Col: 55}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</span>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</span>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</span> <span class=\"font-mono text-xs text-muted\" title=\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</span> <span class=\"font-mono text-xs text-muted\" title=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(e.RequestID).Resolve(ctx)
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(e.RequestID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 43, Col: 67}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 41, Col: 67}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)
_, 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, 18, "\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(e.IP)
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(e.IP)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 43, Col: 76}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/audit.templ`, Line: 41, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
_, 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, 19, "</span></li>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</span></li>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</ul>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</ul>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+2
View File
@@ -23,6 +23,7 @@ type CheckerView struct {
Failed int
AvgLatency string
Recent []CheckerResult
Pager Pager
Siblings []CheckerLink
}
@@ -130,6 +131,7 @@ templ CheckerPage(p Page, me Me, v CheckerView) {
</tbody>
</table>
}
@pager(v.Pager, "newer", "older")
</section>
if len(v.Siblings) > 0 {
<section>
+32 -27
View File
@@ -32,6 +32,7 @@ type CheckerView struct {
Failed int
AvgLatency string
Recent []CheckerResult
Pager Pager
Siblings []CheckerLink
}
@@ -113,7 +114,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(v.Agent)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 61, Col: 13}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 62, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -126,7 +127,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(v.ID[:8])
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 62, Col: 69}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 63, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -139,7 +140,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(v.Region)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 65, Col: 14}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 66, Col: 14}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -153,7 +154,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, 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/checkers.templ`, Line: 67, Col: 38}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 68, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -167,7 +168,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, 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/checkers.templ`, Line: 69, Col: 33}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 70, Col: 33}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -186,7 +187,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "checkers.live"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 73, Col: 35}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 74, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -196,7 +197,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "checkers.gone"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 75, Col: 35}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 76, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -255,7 +256,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "checkers.idle"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 92, Col: 64}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 93, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -278,7 +279,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(r.MonitorURL)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 97, Col: 44}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 98, Col: 44}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)
if templ_7745c5c3_Err != nil {
@@ -291,7 +292,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(r.Monitor)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 97, Col: 82}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 98, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -304,7 +305,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "checkers.for", "Duration", r.For))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 98, Col: 98}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 99, Col: 98}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -323,7 +324,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "checkers.others", "Count", v.OtherOrgs))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 102, Col: 98}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 103, Col: 98}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -346,7 +347,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "checkers.refresh_hint"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 106, Col: 76}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 107, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -368,7 +369,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "checkers.no_recent"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 111, Col: 69}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 112, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -391,7 +392,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(r.Time)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 117, Col: 87}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 118, Col: 87}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -404,7 +405,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(r.MonitorURL)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 118, Col: 69}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 119, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18)
if templ_7745c5c3_Err != nil {
@@ -417,7 +418,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(r.Monitor)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 118, Col: 107}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 119, Col: 107}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -445,7 +446,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(r.Latency)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 126, Col: 61}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 127, Col: 61}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -458,7 +459,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(r.Detail)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 127, Col: 66}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 128, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -474,6 +475,10 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = pager(v.Pager, "newer", "older").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</section>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
@@ -499,7 +504,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(sb.URL)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 139, Col: 37}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 141, Col: 37}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)
if templ_7745c5c3_Err != nil {
@@ -512,7 +517,7 @@ func CheckerPage(p Page, me Me, v CheckerView) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(sb.Label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 139, Col: 87}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 141, Col: 87}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -562,7 +567,7 @@ func checkerFact(labelID, value string) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, labelID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 149, Col: 55}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 151, Col: 55}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -575,7 +580,7 @@ func checkerFact(labelID, value string) templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(value).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 150, Col: 54}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 152, Col: 54}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26)
if templ_7745c5c3_Err != nil {
@@ -588,7 +593,7 @@ func checkerFact(labelID, value string) templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(value)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 150, Col: 64}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 152, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {
@@ -627,7 +632,7 @@ func checkerCell(l CheckerLink) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(l.URL)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 156, Col: 32}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 158, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29)
if templ_7745c5c3_Err != nil {
@@ -640,7 +645,7 @@ func checkerCell(l CheckerLink) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(l.Label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 156, Col: 68}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 158, Col: 68}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -658,7 +663,7 @@ func checkerCell(l CheckerLink) templ.Component {
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(l.Label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 158, Col: 36}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/checkers.templ`, Line: 160, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
if templ_7745c5c3_Err != nil {
+2
View File
@@ -10,6 +10,7 @@ import (
// add or edit one.
type MaintenanceView struct {
Windows []MaintenanceRow
Pager Pager
Form MaintenanceForm
Monitors []TargetOption
Groups []TargetOption
@@ -111,6 +112,7 @@ templ MaintenancePage(p Page, me Me, v MaintenanceView) {
}
</ul>
}
@pager(v.Pager, "later", "earlier")
if v.CanWrite {
@maintenanceForm(v)
}
+43 -38
View File
@@ -19,6 +19,7 @@ import (
// add or edit one.
type MaintenanceView struct {
Windows []MaintenanceRow
Pager Pager
Form MaintenanceForm
Monitors []TargetOption
Groups []TargetOption
@@ -97,7 +98,7 @@ func maintenanceList(items []MaintenanceItem) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(m.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 60, Col: 40}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 61, Col: 40}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -115,7 +116,7 @@ func maintenanceList(items []MaintenanceItem) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.in_progress"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 62, Col: 95}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 63, Col: 95}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -133,7 +134,7 @@ func maintenanceList(items []MaintenanceItem) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(m.When)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 65, Col: 64}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 66, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -211,7 +212,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.empty"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 80, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 81, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -242,7 +243,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(w.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 88, Col: 43}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 89, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -260,7 +261,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.in_progress"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 90, Col: 98}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 91, Col: 98}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -278,7 +279,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(w.Schedule)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 93, Col: 61}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 94, Col: 61}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -291,7 +292,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(w.Targets)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 94, Col: 53}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 95, Col: 53}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -309,7 +310,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.next", "Time", w.Next))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 96, Col: 102}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 97, Col: 102}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -346,7 +347,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL("/maintenance?edit=" + w.ID)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 106, Col: 60}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 107, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)
if templ_7745c5c3_Err != nil {
@@ -359,7 +360,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.edit"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 106, Col: 125}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 107, Col: 125}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -372,7 +373,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/maintenance/" + w.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 107, Col: 70}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 108, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)
if templ_7745c5c3_Err != nil {
@@ -385,7 +386,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "maintenance.delete_confirm")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 107, Col: 129}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 108, Col: 129}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)
if templ_7745c5c3_Err != nil {
@@ -398,7 +399,7 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "common.delete"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 107, Col: 222}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 108, Col: 222}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -423,6 +424,10 @@ func MaintenancePage(p Page, me Me, v MaintenanceView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = pager(v.Pager, "later", "earlier").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if v.CanWrite {
templ_7745c5c3_Err = maintenanceForm(v).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
@@ -478,7 +483,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templruntime.NewAttributeExpression(maintenanceAPI(v.Form.ID)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 128, Col: 39}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 130, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19)
if templ_7745c5c3_Err != nil {
@@ -491,7 +496,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(maintenanceMethod(v.Form.ID)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 129, Col: 45}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 131, Col: 45}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)
if templ_7745c5c3_Err != nil {
@@ -528,7 +533,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.Form.Title).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 134, Col: 69}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 136, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)
if templ_7745c5c3_Err != nil {
@@ -583,7 +588,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.field_description"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 137, Col: 131}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 139, Col: 131}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -624,7 +629,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.Form.Start).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 142, Col: 76}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 144, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var27)
if templ_7745c5c3_Err != nil {
@@ -695,7 +700,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(v.Form.Duration)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 145, Col: 128}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 147, Col: 128}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31)
if templ_7745c5c3_Err != nil {
@@ -766,7 +771,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var35 string
templ_7745c5c3_Var35, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.Form.TimeZone).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 148, Col: 79}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 150, Col: 79}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35)
if templ_7745c5c3_Err != nil {
@@ -816,7 +821,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(tz).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 151, Col: 25}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 153, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var38)
if templ_7745c5c3_Err != nil {
@@ -901,7 +906,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var42 string
templ_7745c5c3_Var42, templ_7745c5c3_Err = templruntime.NewAttributeExpression(r).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 160, Col: 24}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 162, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var42)
if templ_7745c5c3_Err != nil {
@@ -924,7 +929,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var43 string
templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.recurrence_"+r))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 160, Col: 108}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 162, Col: 108}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
if templ_7745c5c3_Err != nil {
@@ -968,7 +973,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var45 string
templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(max(v.Form.Every, 1))).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 165, Col: 111}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 167, Col: 111}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var45)
if templ_7745c5c3_Err != nil {
@@ -1039,7 +1044,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var49 string
templ_7745c5c3_Var49, templ_7745c5c3_Err = templruntime.NewAttributeExpression(v.Form.Until).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 168, Col: 57}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 170, Col: 57}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var49)
if templ_7745c5c3_Err != nil {
@@ -1094,7 +1099,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var52 string
templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.field_weekdays"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 172, Col: 124}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 174, Col: 124}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
if templ_7745c5c3_Err != nil {
@@ -1112,7 +1117,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var53 string
templ_7745c5c3_Var53, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(d)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 176, Col: 80}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 178, Col: 80}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var53)
if templ_7745c5c3_Err != nil {
@@ -1135,7 +1140,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var54 string
templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "weekday."+strconv.Itoa(d)))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 177, Col: 50}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 179, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54))
if templ_7745c5c3_Err != nil {
@@ -1153,7 +1158,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var55 string
templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.weekdays_hint"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 181, Col: 90}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 183, Col: 90}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55))
if templ_7745c5c3_Err != nil {
@@ -1166,7 +1171,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var56 string
templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.field_groups"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 185, Col: 123}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 187, Col: 123}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56))
if templ_7745c5c3_Err != nil {
@@ -1184,7 +1189,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var57 string
templ_7745c5c3_Var57, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(indent(g.Depth))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 188, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 190, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57))
if templ_7745c5c3_Err != nil {
@@ -1197,7 +1202,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var58 string
templ_7745c5c3_Var58, templ_7745c5c3_Err = templruntime.NewAttributeExpression(g.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 189, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 191, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var58)
if templ_7745c5c3_Err != nil {
@@ -1220,7 +1225,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var59 string
templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(g.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 190, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 192, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59))
if templ_7745c5c3_Err != nil {
@@ -1238,7 +1243,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var60 string
templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "maintenance.field_monitors"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 196, Col: 125}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 198, Col: 125}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var60))
if templ_7745c5c3_Err != nil {
@@ -1256,7 +1261,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var61 string
templ_7745c5c3_Var61, templ_7745c5c3_Err = templruntime.NewAttributeExpression(m.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 200, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 202, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var61)
if templ_7745c5c3_Err != nil {
@@ -1279,7 +1284,7 @@ func maintenanceForm(v MaintenanceView) templ.Component {
var templ_7745c5c3_Var62 string
templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(m.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 201, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 203, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62))
if templ_7745c5c3_Err != nil {
@@ -1331,7 +1336,7 @@ func labeled(labelID string) templ.Component {
var templ_7745c5c3_Var64 string
templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, labelID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 214, Col: 105}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/maintenance.templ`, Line: 216, Col: 105}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))
if templ_7745c5c3_Err != nil {
+142 -40
View File
@@ -38,6 +38,9 @@ type GroupNode struct {
Total int
Monitors []MonitorRow
Children []GroupNode
// More counts the group's own monitors not shown; MoreURL shows them.
More int
MoreURL string
}
// GroupOption is a group in a select; Label is indented by depth.
@@ -49,7 +52,13 @@ type GroupOption struct {
// DashboardView is the data of the monitor list. Root holds ungrouped
// monitors and the top-level groups.
type DashboardView struct {
Root GroupNode
Root GroupNode
// Search, if set, lists Results instead of the tree.
Search string
Results []MonitorRow
// Focus, if set, names the one group Root holds, paged by Pager.
Focus string
Pager Pager
Empty bool
CanWrite bool
Counts map[Status]int
@@ -155,16 +164,52 @@ templ Dashboard(p Page, me Me, v DashboardView) {
}
</div>
</div>
if v.Empty {
<p class="border-y border-rule py-10 text-center text-sm text-muted">{ i18n.T(ctx, "console.monitors.empty") }</p>
} else {
<div class="border-t border-rule">
@monitorList(v.Root.Monitors)
for _, g := range v.Root.Children {
@groupBlock(g)
if !v.Empty {
<form method="get" action="/" class="mb-4 flex max-w-md gap-2">
if v.Range != "" {
<input type="hidden" name="range" value={ v.Range }/>
}
</div>
<p class="mt-3 text-right text-xs text-muted">{ i18n.T(ctx, "monitors.range_note", "Range", v.Range) }</p>
<input
type="search"
name="q"
value={ v.Search }
placeholder={ i18n.T(ctx, "monitors.search") }
aria-label={ i18n.T(ctx, "monitors.search") }
class="w-full border border-rule bg-transparent px-2.5 py-1.5 text-sm outline-none focus:border-ink"
/>
<button type="submit" class="border border-ink px-3 py-1.5 text-sm hover:bg-ink hover:text-paper">{ i18n.T(ctx, "moderation.search_button") }</button>
</form>
}
switch {
case v.Empty:
<p class="border-y border-rule py-10 text-center text-sm text-muted">{ i18n.T(ctx, "console.monitors.empty") }</p>
case v.Search != "":
<p class="mb-3 text-sm"><a href="/" class="text-muted hover:text-ink">← { i18n.T(ctx, "monitors.all") }</a></p>
if len(v.Results) == 0 {
<p class="border-y border-rule py-10 text-center text-sm text-muted">{ i18n.T(ctx, "monitors.no_match") }</p>
} else {
<div class="border-t border-rule">
@monitorList(v.Results)
</div>
}
@pager(v.Pager, "previous", "next")
default:
if v.Focus != "" {
<p class="mb-3 text-sm">
<a href="/" class="text-muted hover:text-ink">{ i18n.T(ctx, "monitors.all") }</a>
<span class="text-muted">›</span>
<span class="font-medium">{ v.Focus }</span>
</p>
}
<div class="border-t border-rule">
@monitorList(v.Root.Monitors)
@moreLink(v.Root)
for _, g := range v.Root.Children {
@groupBlock(g)
}
</div>
@pager(v.Pager, "previous", "next")
<p class="mt-3 text-right text-xs text-muted">{ i18n.T(ctx, "monitors.range_note", "Range", v.Range) }</p>
}
<p class="mt-8 text-sm"><a href="/groups" class="text-muted hover:text-ink">{ i18n.T(ctx, "groups.manage") }</a></p>
}
@@ -193,6 +238,13 @@ templ monitorList(ms []MonitorRow) {
}
}
// moreLink leads to the monitors of a group that are not shown.
templ moreLink(g GroupNode) {
if g.More > 0 {
<a href={ templ.SafeURL(g.MoreURL) } class="block border-b border-rule py-2.5 text-sm text-muted hover:text-ink">{ i18n.T(ctx, "monitors.show_all", "Count", g.More+len(g.Monitors)) } →</a>
}
}
// groupBlock renders a group and, recursively, its subgroups. <details>
// makes groups collapsible without JavaScript.
templ groupBlock(g GroupNode) {
@@ -204,6 +256,7 @@ templ groupBlock(g GroupNode) {
</summary>
<div class="ml-4 border-l border-rule pl-4">
@monitorList(g.Monitors)
@moreLink(g)
for _, c := range g.Children {
@groupBlock(c)
}
@@ -248,6 +301,10 @@ type MonitorDetailView struct {
Latency LatencyLine
Recent []ResultRow
Incidents []IncidentRow
// MoreIncidents is set when the monitor has more incidents than shown.
MoreIncidents bool
// MoreResults is set when the monitor has more results than shown.
MoreResults bool
CanWrite bool
// Maintenance lists current and upcoming maintenance.
Maintenance []MaintenanceItem
@@ -366,6 +423,9 @@ templ MonitorDetail(p Page, me Me, v MonitorDetailView) {
<section class="mb-10">
@sectionHeading("incidents.title")
@incidentList(v.Incidents, false)
if v.MoreIncidents {
<a href={ templ.SafeURL("/incidents?monitor=" + v.Row.ID) } class="mt-3 inline-block text-sm text-muted hover:text-ink">{ i18n.T(ctx, "incidents.all_of_monitor") } →</a>
}
</section>
}
if len(v.Evidence) > 0 {
@@ -373,37 +433,64 @@ templ MonitorDetail(p Page, me Me, v MonitorDetailView) {
}
<section>
@sectionHeading("monitors.recent")
<table class="w-full text-left text-sm">
<tbody class="divide-y divide-rule border-y border-rule">
for _, r := range v.Recent {
<tr>
<td class="py-1.5 pr-4 font-mono text-xs whitespace-nowrap text-muted">{ r.Time }</td>
<td class="py-1.5 pr-4">{ r.Region }</td>
<td class="py-1.5 pr-4 font-mono text-xs">
@checkerCell(r.Checker)
</td>
<td class="py-1.5 pr-4">
if r.OK {
<span class="text-up">●</span>
} else {
<span class="text-down">●</span>
}
</td>
<td class="py-1.5 pr-4 font-mono text-xs">{ r.Latency }</td>
<td class="py-1.5 font-mono text-xs text-muted">
{ r.Detail }
if r.EvidenceURL != "" {
<a href={ templ.SafeURL(r.EvidenceURL) } class="ml-2 underline underline-offset-2 hover:text-ink">{ i18n.T(ctx, "evidence.show") }</a>
}
</td>
</tr>
}
</tbody>
</table>
@resultTable(v.Recent)
if v.MoreResults {
<a href={ templ.SafeURL("/monitors/" + v.Row.ID + "/results") } class="mt-3 inline-block text-sm text-muted hover:text-ink">{ i18n.T(ctx, "monitors.all_results") } →</a>
}
</section>
}
}
templ resultTable(rows []ResultRow) {
<table class="w-full text-left text-sm">
<tbody class="divide-y divide-rule border-y border-rule">
for _, r := range rows {
<tr>
<td class="py-1.5 pr-4 font-mono text-xs whitespace-nowrap text-muted">{ r.Time }</td>
<td class="py-1.5 pr-4">{ r.Region }</td>
<td class="py-1.5 pr-4 font-mono text-xs">
@checkerCell(r.Checker)
</td>
<td class="py-1.5 pr-4">
if r.OK {
<span class="text-up">●</span>
} else {
<span class="text-down">●</span>
}
</td>
<td class="py-1.5 pr-4 font-mono text-xs">{ r.Latency }</td>
<td class="py-1.5 font-mono text-xs text-muted">
{ r.Detail }
if r.EvidenceURL != "" {
<a href={ templ.SafeURL(r.EvidenceURL) } class="ml-2 underline underline-offset-2 hover:text-ink">{ i18n.T(ctx, "evidence.show") }</a>
}
</td>
</tr>
}
</tbody>
</table>
}
// ResultsView is a page of a monitor's check results.
type ResultsView struct {
MonitorID, Monitor string
Rows []ResultRow
Pager Pager
}
templ ResultsPage(p Page, me Me, v ResultsView) {
@consoleShell(p, me) {
<p class="mb-4 text-sm"><a href={ templ.SafeURL("/monitors/" + v.MonitorID) } class="text-muted hover:text-ink">← { v.Monitor }</a></p>
@settingsHeading("monitors.results_title", "")
if len(v.Rows) == 0 {
<p class="border-y border-rule py-10 text-center text-sm text-muted">{ i18n.T(ctx, "monitors.no_results") }</p>
} else {
@resultTable(v.Rows)
}
@pager(v.Pager, "newer", "older")
}
}
templ incidentList(rows []IncidentRow, showMonitor bool) {
<ul class="divide-y divide-rule border-y border-rule text-sm">
for _, r := range rows {
@@ -428,14 +515,29 @@ templ incidentList(rows []IncidentRow, showMonitor bool) {
</ul>
}
templ IncidentsPage(p Page, me Me, rows []IncidentRow) {
// IncidentsView is a page of incidents, of one monitor if Monitor is set.
type IncidentsView struct {
Rows []IncidentRow
Pager Pager
Monitor, MonitorID string
}
templ IncidentsPage(p Page, me Me, v IncidentsView) {
@consoleShell(p, me) {
@settingsHeading("incidents.title", "")
if len(rows) == 0 {
if v.Monitor != "" {
<p class="-mt-4 mb-6 text-sm">
{ i18n.T(ctx, "incidents.of_monitor") }
<a href={ templ.SafeURL("/monitors/" + v.MonitorID) } class="font-medium hover:underline">{ v.Monitor }</a>
<a href="/incidents" class="ml-3 text-muted hover:text-ink">{ i18n.T(ctx, "incidents.all") }</a>
</p>
}
if len(v.Rows) == 0 {
<p class="border-y border-rule py-10 text-center text-sm text-muted">{ i18n.T(ctx, "incidents.none") }</p>
} else {
@incidentList(rows, true)
@incidentList(v.Rows, v.Monitor == "")
}
@pager(v.Pager, "newer", "older")
}
}
File diff suppressed because it is too large. Load diff
+2
View File
@@ -43,6 +43,7 @@ type PendingInvite struct {
// MembersView is the data of the members page.
type MembersView struct {
Members []Member
Pager Pager
Roles []Role
Invitations []PendingInvite
CanManage bool
@@ -152,6 +153,7 @@ templ MembersPage(p Page, me Me, v MembersView) {
}
</tbody>
</table>
@pager(v.Pager, "previous", "next")
if v.CanManage {
<div class="grid gap-12 md:grid-cols-2">
<section>
+83 -78
View File
@@ -52,6 +52,7 @@ type PendingInvite struct {
// MembersView is the data of the members page.
type MembersView struct {
Members []Member
Pager Pager
Roles []Role
Invitations []PendingInvite
CanManage bool
@@ -90,7 +91,7 @@ func settingsHeading(titleID, introID string) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, titleID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 61, Col: 62}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 62, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -108,7 +109,7 @@ func settingsHeading(titleID, introID string) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, introID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 63, Col: 69}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 64, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -147,7 +148,7 @@ func sectionHeading(id string) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, id))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 68, Col: 91}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 69, Col: 91}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -185,7 +186,7 @@ func roleSelect(roles []Role, name string) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(name).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 72, Col: 20}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 73, Col: 20}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)
if templ_7745c5c3_Err != nil {
@@ -203,7 +204,7 @@ func roleSelect(roles []Role, name string) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(r.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 74, Col: 23}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 75, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)
if templ_7745c5c3_Err != nil {
@@ -216,7 +217,7 @@ func roleSelect(roles []Role, name string) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 74, Col: 34}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 75, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -275,7 +276,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "auth.field.email"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 85, Col: 72}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 86, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -288,7 +289,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.roles"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 86, Col: 69}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 87, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -306,7 +307,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(m.Email)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 94, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 95, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -324,7 +325,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(m.DisplayName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 96, Col: 62}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 97, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -347,7 +348,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.owner"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 101, Col: 64}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 102, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -370,7 +371,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(a.RoleName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 106, Col: 22}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 107, Col: 22}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -388,7 +389,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(a.Scope)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 108, Col: 48}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 109, Col: 48}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -407,7 +408,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/assignments/" + a.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 113, Col: 52}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 114, Col: 52}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19)
if templ_7745c5c3_Err != nil {
@@ -420,7 +421,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "members.unassign")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 115, Col: 56}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 116, Col: 56}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)
if templ_7745c5c3_Err != nil {
@@ -448,7 +449,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "sso.action.edit"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 125, Col: 99}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 126, Col: 99}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -461,7 +462,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/members/" + m.UserID + "/roles").Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 127, Col: 64}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 128, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)
if templ_7745c5c3_Err != nil {
@@ -486,7 +487,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.scope"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 131, Col: 123}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 132, Col: 123}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -499,7 +500,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.scope_org"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 133, Col: 64}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 134, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -517,7 +518,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templruntime.NewAttributeExpression(sc.Value).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 135, Col: 38}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 136, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25)
if templ_7745c5c3_Err != nil {
@@ -530,7 +531,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(sc.Label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 135, Col: 51}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 136, Col: 51}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -556,7 +557,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/members/" + m.UserID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 143, Col: 51}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 144, Col: 51}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var27)
if templ_7745c5c3_Err != nil {
@@ -569,7 +570,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "members.remove_confirm")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 144, Col: 63}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 145, Col: 63}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28)
if templ_7745c5c3_Err != nil {
@@ -582,7 +583,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.remove"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 146, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 147, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
if templ_7745c5c3_Err != nil {
@@ -602,6 +603,10 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = pager(v.Pager, "previous", "next").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if v.CanManage {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<div class=\"grid gap-12 md:grid-cols-2\"><section>")
if templ_7745c5c3_Err != nil {
@@ -630,7 +635,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.role"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 163, Col: 117}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 165, Col: 117}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -659,7 +664,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.invite_link"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 168, Col: 67}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 170, Col: 67}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
if templ_7745c5c3_Err != nil {
@@ -690,7 +695,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var32 string
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(inv.Email)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 179, Col: 26}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 181, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
if templ_7745c5c3_Err != nil {
@@ -703,7 +708,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(inv.RoleName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 179, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 181, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
if templ_7745c5c3_Err != nil {
@@ -716,7 +721,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/invitations/" + inv.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 180, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 182, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34)
if templ_7745c5c3_Err != nil {
@@ -729,7 +734,7 @@ func MembersPage(p Page, me Me, v MembersView) templ.Component {
var templ_7745c5c3_Var35 string
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.revoke"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 180, Col: 142}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 182, Col: 142}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
if templ_7745c5c3_Err != nil {
@@ -834,7 +839,7 @@ func permissionChecks(all, grantable, checked []string) templ.Component {
var templ_7745c5c3_Var39 string
templ_7745c5c3_Var39, templ_7745c5c3_Err = templruntime.NewAttributeExpression(perm).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 207, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 209, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var39)
if templ_7745c5c3_Err != nil {
@@ -863,7 +868,7 @@ func permissionChecks(all, grantable, checked []string) templ.Component {
var templ_7745c5c3_Var40 string
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "perm."+perm))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 213, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 215, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
if templ_7745c5c3_Err != nil {
@@ -927,7 +932,7 @@ func RolesPage(p Page, me Me, v RolesView) templ.Component {
var templ_7745c5c3_Var43 string
templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 227, Col: 15}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 229, Col: 15}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
if templ_7745c5c3_Err != nil {
@@ -945,7 +950,7 @@ func RolesPage(p Page, me Me, v RolesView) templ.Component {
var templ_7745c5c3_Var44 string
templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "roles.built_in"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 229, Col: 77}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 231, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))
if templ_7745c5c3_Err != nil {
@@ -968,7 +973,7 @@ func RolesPage(p Page, me Me, v RolesView) templ.Component {
var templ_7745c5c3_Var45 string
templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/roles/" + r.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 235, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 237, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var45)
if templ_7745c5c3_Err != nil {
@@ -981,7 +986,7 @@ func RolesPage(p Page, me Me, v RolesView) templ.Component {
var templ_7745c5c3_Var46 string
templ_7745c5c3_Var46, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "roles.delete_confirm")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 236, Col: 58}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 238, Col: 58}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var46)
if templ_7745c5c3_Err != nil {
@@ -994,7 +999,7 @@ func RolesPage(p Page, me Me, v RolesView) templ.Component {
var templ_7745c5c3_Var47 string
templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "roles.delete"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 238, Col: 37}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 240, Col: 37}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
if templ_7745c5c3_Err != nil {
@@ -1017,7 +1022,7 @@ func RolesPage(p Page, me Me, v RolesView) templ.Component {
var templ_7745c5c3_Var48 string
templ_7745c5c3_Var48, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/roles/" + r.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 242, Col: 43}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 244, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var48)
if templ_7745c5c3_Err != nil {
@@ -1060,7 +1065,7 @@ func RolesPage(p Page, me Me, v RolesView) templ.Component {
var templ_7745c5c3_Var49 string
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "perm."+perm))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 251, Col: 80}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 253, Col: 80}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
if templ_7745c5c3_Err != nil {
@@ -1206,7 +1211,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var52 string
templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.policy", "Count", v.MaxDays))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 305, Col: 83}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 307, Col: 83}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
if templ_7745c5c3_Err != nil {
@@ -1229,7 +1234,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var53 string
templ_7745c5c3_Var53, 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/org.templ`, Line: 311, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 313, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53))
if templ_7745c5c3_Err != nil {
@@ -1247,7 +1252,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var54 string
templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.owner"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 313, Col: 70}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 315, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54))
if templ_7745c5c3_Err != nil {
@@ -1265,7 +1270,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var55 string
templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.permissions"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 315, Col: 75}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 317, Col: 75}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55))
if templ_7745c5c3_Err != nil {
@@ -1278,7 +1283,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var56 string
templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.created"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 316, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 318, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56))
if templ_7745c5c3_Err != nil {
@@ -1291,7 +1296,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var57 string
templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.expires"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 317, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 319, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57))
if templ_7745c5c3_Err != nil {
@@ -1304,7 +1309,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var58 string
templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.last_used"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 318, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 320, Col: 73}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var58))
if templ_7745c5c3_Err != nil {
@@ -1322,7 +1327,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var59 string
templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(t.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 325, Col: 39}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 327, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59))
if templ_7745c5c3_Err != nil {
@@ -1335,7 +1340,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var60 string
templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(t.Prefix)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 325, Col: 101}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 327, Col: 101}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var60))
if templ_7745c5c3_Err != nil {
@@ -1353,7 +1358,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var61 string
templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.JoinStringErrs(t.UserEmail)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 327, Col: 45}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 329, Col: 45}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var61))
if templ_7745c5c3_Err != nil {
@@ -1376,7 +1381,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var62 string
templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "perm."+perm))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 332, Col: 79}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 334, Col: 79}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62))
if templ_7745c5c3_Err != nil {
@@ -1394,7 +1399,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var63 string
templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(t.CreatedAt)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 336, Col: 80}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 338, Col: 80}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))
if templ_7745c5c3_Err != nil {
@@ -1407,7 +1412,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var64 string
templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(t.ExpiresAt)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 337, Col: 80}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 339, Col: 80}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))
if templ_7745c5c3_Err != nil {
@@ -1420,7 +1425,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var65 string
templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(t.LastUsedAt)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 338, Col: 81}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 340, Col: 81}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65))
if templ_7745c5c3_Err != nil {
@@ -1433,7 +1438,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var66 string
templ_7745c5c3_Var66, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/org/tokens/" + t.ID).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 342, Col: 44}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 344, Col: 44}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var66)
if templ_7745c5c3_Err != nil {
@@ -1446,7 +1451,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var67 string
templ_7745c5c3_Var67, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "tokens.revoke_confirm")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 343, Col: 60}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 345, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var67)
if templ_7745c5c3_Err != nil {
@@ -1459,7 +1464,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var68 string
templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "members.revoke"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 345, Col: 40}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 347, Col: 40}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68))
if templ_7745c5c3_Err != nil {
@@ -1510,7 +1515,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var69 string
templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.expires"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 360, Col: 117}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 362, Col: 117}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69))
if templ_7745c5c3_Err != nil {
@@ -1529,7 +1534,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var70 string
templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.never"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 364, Col: 55}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 366, Col: 55}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))
if templ_7745c5c3_Err != nil {
@@ -1547,7 +1552,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var71 string
templ_7745c5c3_Var71, templ_7745c5c3_Err = templruntime.NewAttributeExpression(strconv.Itoa(d)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 366, Col: 39}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 368, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var71)
if templ_7745c5c3_Err != nil {
@@ -1570,7 +1575,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var72 string
templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.days", "Count", d))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 366, Col: 103}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 368, Col: 103}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72))
if templ_7745c5c3_Err != nil {
@@ -1597,7 +1602,7 @@ func TokensPage(p Page, me Me, v TokensView) templ.Component {
var templ_7745c5c3_Var73 string
templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.copy_now"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 373, Col: 61}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 375, Col: 61}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73))
if templ_7745c5c3_Err != nil {
@@ -1697,7 +1702,7 @@ func OrgSettingsPage(p Page, me Me, v OrgSettings) templ.Component {
var templ_7745c5c3_Var76 string
templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "org.require_totp_hint"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 404, Col: 82}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 406, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76))
if templ_7745c5c3_Err != nil {
@@ -1718,7 +1723,7 @@ func OrgSettingsPage(p Page, me Me, v OrgSettings) templ.Component {
var templ_7745c5c3_Var77 string
templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "org.require_sso_hint"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 406, Col: 81}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 408, Col: 81}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var77))
if templ_7745c5c3_Err != nil {
@@ -1731,7 +1736,7 @@ func OrgSettingsPage(p Page, me Me, v OrgSettings) templ.Component {
var templ_7745c5c3_Var78 string
templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "org.token_max_days"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 408, Col: 121}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 410, Col: 121}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78))
if templ_7745c5c3_Err != nil {
@@ -1744,7 +1749,7 @@ func OrgSettingsPage(p Page, me Me, v OrgSettings) templ.Component {
var templ_7745c5c3_Var79 string
templ_7745c5c3_Var79, templ_7745c5c3_Err = templruntime.NewAttributeExpression(maxDaysValue(v.TokenMaxDays)).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 415, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 417, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var79)
if templ_7745c5c3_Err != nil {
@@ -1757,7 +1762,7 @@ func OrgSettingsPage(p Page, me Me, v OrgSettings) templ.Component {
var templ_7745c5c3_Var80 string
templ_7745c5c3_Var80, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "org.token_max_days_none")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 416, Col: 58}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 418, Col: 58}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var80)
if templ_7745c5c3_Err != nil {
@@ -1770,7 +1775,7 @@ func OrgSettingsPage(p Page, me Me, v OrgSettings) templ.Component {
var templ_7745c5c3_Var81 string
templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "org.token_max_days_hint"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 420, Col: 79}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 422, Col: 79}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81))
if templ_7745c5c3_Err != nil {
@@ -1858,7 +1863,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var84 string
templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "error.invitation_invalid"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 444, Col: 63}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 446, Col: 63}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84))
if templ_7745c5c3_Err != nil {
@@ -1876,7 +1881,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var85 string
templ_7745c5c3_Var85, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "invite.summary", "Org", v.OrgName, "Role", v.RoleName))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 446, Col: 96}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 448, Col: 96}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var85))
if templ_7745c5c3_Err != nil {
@@ -1889,7 +1894,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var86 string
templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(v.Email)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 447, Col: 46}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 449, Col: 46}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86))
if templ_7745c5c3_Err != nil {
@@ -1908,7 +1913,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var87 string
templ_7745c5c3_Var87, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/invitations/" + v.Token + "/accept").Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 450, Col: 59}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 452, Col: 59}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var87)
if templ_7745c5c3_Err != nil {
@@ -1938,7 +1943,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var88 string
templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "error.invitation_email_mismatch"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 455, Col: 82}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 457, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88))
if templ_7745c5c3_Err != nil {
@@ -1951,7 +1956,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var89 string
templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "console.nav.logout"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 456, Col: 110}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 458, Col: 110}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89))
if templ_7745c5c3_Err != nil {
@@ -1969,7 +1974,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var90 string
templ_7745c5c3_Var90, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL("/login?next=/invite/" + v.Token)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 458, Col: 62}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 460, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var90)
if templ_7745c5c3_Err != nil {
@@ -1982,7 +1987,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var91 string
templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "invite.sign_in"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 458, Col: 153}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 460, Col: 153}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91))
if templ_7745c5c3_Err != nil {
@@ -2000,7 +2005,7 @@ func InvitationPage(p Page, v Invitation) templ.Component {
var templ_7745c5c3_Var92 string
templ_7745c5c3_Var92, templ_7745c5c3_Err = templruntime.NewAttributeExpression("/invitations/" + v.Token + "/signup").Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 460, Col: 59}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 462, Col: 59}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var92)
if templ_7745c5c3_Err != nil {
@@ -2074,7 +2079,7 @@ func tokenUsage() templ.Component {
var templ_7745c5c3_Var94 string
templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "tokens.usage"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 481, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 483, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94))
if templ_7745c5c3_Err != nil {
@@ -2087,7 +2092,7 @@ func tokenUsage() templ.Component {
var templ_7745c5c3_Var95 string
templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "apidocs.title"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 484, Col: 98}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/org.templ`, Line: 486, Col: 98}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95))
if templ_7745c5c3_Err != nil {
+30
View File
@@ -0,0 +1,30 @@
package web
import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
// Pager links the neighbouring pages of a list; empty links are at the
// list's ends.
type Pager struct {
// Prev leads to newer, or earlier, items; First to the list's start.
Prev, First string
// Next leads to older, or later, items.
Next string
}
// pager shows the page links. prevID and nextID name them, e.g. "newer"
// and "older" for lists newest first.
templ pager(pg Pager, prevID, nextID string) {
if pg.Prev != "" || pg.Next != "" {
<nav class="mt-4 flex flex-wrap items-center gap-x-5 gap-y-2 text-sm" aria-label={ i18n.T(ctx, "pager.label") }>
if pg.First != "" {
<a href={ templ.SafeURL(pg.First) } class="text-muted hover:text-ink">{ i18n.T(ctx, "pager.first") }</a>
}
if pg.Prev != "" {
<a href={ templ.SafeURL(pg.Prev) } rel="prev" class="text-muted hover:text-ink">← { i18n.T(ctx, "pager."+prevID) }</a>
}
if pg.Next != "" {
<a href={ templ.SafeURL(pg.Next) } rel="next" class="ml-auto text-muted hover:text-ink">{ i18n.T(ctx, "pager."+nextID) } →</a>
}
</nav>
}
}
+165
View File
@@ -0,0 +1,165 @@
// 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 "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
// Pager links the neighbouring pages of a list; empty links are at the
// list's ends.
type Pager struct {
// Prev leads to newer, or earlier, items; First to the list's start.
Prev, First string
// Next leads to older, or later, items.
Next string
}
// pager shows the page links. prevID and nextID name them, e.g. "newer"
// and "older" for lists newest first.
func pager(pg Pager, prevID, nextID 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)
if pg.Prev != "" || pg.Next != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<nav class=\"mt-4 flex flex-wrap items-center gap-x-5 gap-y-2 text-sm\" aria-label=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(i18n.T(ctx, "pager.label")).Resolve(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/pager.templ`, Line: 18, Col: 111}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if pg.First != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(pg.First)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/pager.templ`, Line: 20, Col: 37}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" class=\"text-muted hover:text-ink\">")
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, "pager.first"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/pager.templ`, Line: 20, Col: 102}
}
_, 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, "</a> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
if pg.Prev != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(pg.Prev)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/pager.templ`, Line: 23, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" rel=\"prev\" class=\"text-muted hover:text-ink\">← ")
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, "pager."+prevID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/pager.templ`, Line: 23, Col: 118}
}
_, 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, "</a> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
if pg.Next != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(pg.Next)).ResolveURL(ctx)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/pager.templ`, Line: 26, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\" rel=\"next\" class=\"ml-auto text-muted hover:text-ink\">")
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, "pager."+nextID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/pager.templ`, Line: 26, Col: 122}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, " →</a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</nav>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
return nil
})
}
var _ = templruntime.GeneratedTemplate
+33 -25
View File
@@ -1,10 +1,6 @@
package web
import (
"net/url"
"git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
)
import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n"
// Region is a row in a region list.
type Region struct {
@@ -163,16 +159,11 @@ templ RegionsPage(p Page, me Me, v RegionsView) {
}
}
templ AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []CheckTypeOption, platformPrivate bool, mod ModerationView, orgs OrgsView) {
templ AdminPage(p Page, me Me, v RegionsView, storage StorageView, checkTypes []CheckTypeOption, platformPrivate bool, limits LimitsView) {
@consoleShell(p, me) {
@settingsHeading("admin.title", "admin.intro")
<p class="-mt-4 mb-8 flex gap-4 text-sm">
<a href="/admin/audit" class="underline underline-offset-2">{ i18n.T(ctx, "audit.platform_title") }</a>
<a href="/admin/legal" class="underline underline-offset-2">{ i18n.T(ctx, "legal.platform_title") }</a>
</p>
@moderationSection(mod)
@orgsSection(orgs)
@limitsSection(orgs.Defaults)
@adminLinks()
@limitsSection(limits)
@regionsBody(v)
@checkerNetworkSection(platformPrivate)
@checkTypesSection(checkTypes, "/admin/check-types", "/admin", "admin.check_types_intro")
@@ -223,8 +214,9 @@ templ checkTypesSection(types []CheckTypeOption, api, next, introID string) {
type ModerationView struct {
Search string
Pages []ModeratedPage
// Limited is set when more pages match than are shown.
Limited bool
Pager Pager
// Next is the page to return to after an action.
Next string
}
// ModeratedPage is a status page with the organization and account
@@ -245,18 +237,13 @@ type ModeratedTarget struct {
Admin bool
}
func (v ModerationView) next() string {
if v.Search == "" {
return "/admin#moderation"
}
return "/admin?q=" + url.QueryEscape(v.Search) + "#moderation"
}
func (v ModerationView) next() string { return v.Next }
templ moderationSection(v ModerationView) {
<section id="moderation" class="mb-12">
@sectionHeading("moderation.title")
<p class="mb-4 max-w-3xl text-sm text-muted">{ i18n.T(ctx, "moderation.intro") }</p>
<form method="get" action="/admin#moderation" class="mb-4 flex max-w-xl gap-2">
<form method="get" action="/admin/status-pages" class="mb-4 flex max-w-xl gap-2">
<input
type="search"
name="q"
@@ -323,10 +310,8 @@ templ moderationSection(v ModerationView) {
</tbody>
</table>
</div>
if v.Limited {
<p class="mt-3 text-xs text-muted">{ i18n.T(ctx, "moderation.limited") }</p>
}
}
@pager(v.Pager, "newer", "older")
</section>
}
@@ -374,3 +359,26 @@ templ moderationActions(kind, api, suspended, name, next string) {
>{ i18n.T(ctx, "moderation.delete_"+kind) }</button>
</div>
}
templ adminLinks() {
<p class="-mt-4 mb-8 flex flex-wrap gap-x-4 gap-y-1 text-sm">
<a href="/admin/status-pages" class="underline underline-offset-2">{ i18n.T(ctx, "moderation.title") }</a>
<a href="/admin/orgs" class="underline underline-offset-2">{ i18n.T(ctx, "orgs.title") }</a>
<a href="/admin/audit" class="underline underline-offset-2">{ i18n.T(ctx, "audit.platform_title") }</a>
<a href="/admin/legal" class="underline underline-offset-2">{ i18n.T(ctx, "legal.platform_title") }</a>
</p>
}
templ AdminStatusPagesPage(p Page, me Me, v ModerationView) {
@consoleShell(p, me) {
<p class="mb-4 text-sm"><a href="/admin" class="text-muted hover:text-ink">← { i18n.T(ctx, "admin.title") }</a></p>
@moderationSection(v)
}
}
templ AdminOrgsPage(p Page, me Me, v OrgsView) {
@consoleShell(p, me) {
<p class="mb-4 text-sm"><a href="/admin" class="text-muted hover:text-ink">← { i18n.T(ctx, "admin.title") }</a></p>
@orgsSection(v)
}
}
File diff suppressed because it is too large. Load diff