Page every list on the Domains page and the organization's Members, and check each table for its own pager
The Domains page's placements rendered every served name, and its claim history the latest 200 rows under a header that counted the rows shown, so past 200 the count was wrong and the older claims unreachable. Both are now governed lists embedded in the page: ten rows by default with the size picker, the true total, a search over the name and the holding organization, and a filter by state (placements) or status (history). Placements gain an Organization column, so the search's second field is visible in the rows it matches. The live claims keep their parameters and their page navigations, and every list carries the other two's state. Each list's failed read shows its own notice inside its panel, with no count, no empty state and no table. The organization page's Members showed the 16 most recently joined. It is now a governed list with a search over name and email, ordered in the query by join time with the person id breaking ties; the query's 200-row limit goes with the cap. The shared controls now honour an embedded list's scope throughout: the search's Clear, the filter pills and the no-match clear link swap only their panel, refresh the sibling panels and push the URL, and the Clear is a link that still works without scripts. "Clear search and filters" keeps the page's other state on every list. Each search box can name its hidden label and renders its own element ids, so a page with several searches announces and identifies each one. The lint's unpaged-table rule passed a template once it rendered the list controls anywhere, which is how two unpaged tables sat beside a paged one. It now checks each table in a page body for its own pager, or an exemption comment with a reason directly before it, and ignores tables and pager calls named inside comments. Closes #36.
This commit is contained in:
@@ -244,7 +244,7 @@ Every mutation waits for server confirmation before the UI updates. HTMX's reque
|
||||
| `"Failed to save: " + err.Error()` in a render/toast/`http.Error` call | `web.FieldErrorsFromDB` → 422 + `FieldErrors` for constraint violations; `slog.Error` + generic message otherwise (§4; enforced by the `raw-error-render` lint rule) |
|
||||
| Writing the row first and running the invariant guard after it (`CreateGrant` then the same-tier check) | Every guard runs before the first write — a guard that short-circuits after the row exists leaves an orphan no later flow can reach |
|
||||
| Leaving a control visible whose effect nothing implements ("until the behaviour is built") | Hide it, or relabel it to what it actually does; a rendered control is a promise, and the handler is what has to keep it |
|
||||
| Deciding whether a table pages by checking its page against an enumerated list of governed pages (a page nobody added to the list is silently exempt) | A table whose rows grow with the deployment is paged, searchable and shows its true total (`operator-list-scale`); `member-console lint` refuses an unpaged body table (`table-without-list-controls`), and a curated configuration table is exempted beside the table with a `list-scale exempt:` comment that gives the reason |
|
||||
| Deciding whether a table pages by checking its page against an enumerated list of governed pages (a page nobody added to the list is silently exempt) | A table whose rows grow with the deployment is paged, searchable and shows its true total (`operator-list-scale`); `member-console lint` refuses an unpaged body table (`table-without-list-controls`): each table on a page body needs its own `listPager` after it, and a curated configuration or detail-page table is exempted with a `list-scale exempt:` comment, giving the reason, before the one table it exempts |
|
||||
|
||||
### 9a. Grant lifecycle ≠ delivery state
|
||||
|
||||
|
||||
@@ -457,11 +457,11 @@ type ListLiveClaimsForOperatorPageRow struct {
|
||||
// so page one carries the claims that need attention rather than whatever
|
||||
// fifty rows the planner reached first.
|
||||
//
|
||||
// This is the one query in the stream that reads core (the domains migration
|
||||
// grants core_reader to domains_writer for exactly this kind of read). It
|
||||
// projects columns rather than whole rows so no core model enters this
|
||||
// package's API — sqlc.yaml documents the rename entries a whole-row join
|
||||
// would otherwise need.
|
||||
// Like the operator's other paged reads, this one reads core (the domains
|
||||
// migration grants core_reader to domains_writer for exactly this kind of
|
||||
// read). It projects columns rather than whole rows so no core model enters
|
||||
// this package's API — sqlc.yaml documents the rename entries a whole-row
|
||||
// join would otherwise need.
|
||||
//
|
||||
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
// match against the claimed root name or the owning organization's name
|
||||
@@ -633,20 +633,32 @@ func (q *Queries) ListRecentClaimInitiations(ctx context.Context, arg ListRecent
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listTerminalClaimsForOperator = `-- name: ListTerminalClaimsForOperator :many
|
||||
const listTerminalClaimsForOperatorPage = `-- name: ListTerminalClaimsForOperatorPage :many
|
||||
SELECT c.claim_id, c.root_fqdn, c.kind, c.status, c.created_at,
|
||||
c.evidence_at, c.abandoned_at, c.system_canceled_at,
|
||||
c.workspace_id, w.name AS workspace_name,
|
||||
o.org_id, o.name AS org_name
|
||||
o.org_id, o.name AS org_name,
|
||||
count(*) OVER() AS total_count
|
||||
FROM domains.claims c
|
||||
JOIN core.workspaces w ON w.workspace_id = c.workspace_id
|
||||
JOIN core.organizations o ON o.org_id = w.org_id
|
||||
WHERE c.status IN ('expired', 'canceled', 'released')
|
||||
ORDER BY c.created_at DESC
|
||||
LIMIT 200
|
||||
AND ($1::text IS NULL OR c.status = $1::text)
|
||||
AND ($2::text IS NULL
|
||||
OR c.root_fqdn ILIKE '%' || $2::text || '%'
|
||||
OR o.name ILIKE '%' || $2::text || '%')
|
||||
ORDER BY c.created_at DESC, c.claim_id DESC
|
||||
LIMIT $4::int OFFSET $3::int
|
||||
`
|
||||
|
||||
type ListTerminalClaimsForOperatorRow struct {
|
||||
type ListTerminalClaimsForOperatorPageParams struct {
|
||||
Status sql.NullString `json:"status"`
|
||||
Q sql.NullString `json:"q"`
|
||||
PageOffset int32 `json:"page_offset"`
|
||||
PageLimit int32 `json:"page_limit"`
|
||||
}
|
||||
|
||||
type ListTerminalClaimsForOperatorPageRow struct {
|
||||
ClaimID string `json:"claim_id"`
|
||||
RootFqdn string `json:"root_fqdn"`
|
||||
Kind string `json:"kind"`
|
||||
@@ -659,30 +671,45 @@ type ListTerminalClaimsForOperatorRow struct {
|
||||
WorkspaceName string `json:"workspace_name"`
|
||||
OrgID string `json:"org_id"`
|
||||
OrgName string `json:"org_name"`
|
||||
TotalCount int64 `json:"total_count"`
|
||||
}
|
||||
|
||||
// The operator claims ledger section (ux-ia-naming task 9.2): every claim
|
||||
// that has left a live state, deployment-wide, newest first. Today only live
|
||||
// claims render on the moderation surface; this read makes expired,
|
||||
// canceled, and released claims reachable too, in a list segregated from the
|
||||
// live one.
|
||||
// The operator claim history section, governed by operator-list-scale: one
|
||||
// page of every claim that has left a live state, deployment-wide, newest
|
||||
// first. The live moderation list shows only live claims; this read makes
|
||||
// expired, canceled, and released claims reachable too, in a list segregated
|
||||
// from the live one.
|
||||
//
|
||||
// The three ledger columns ride along unconditionally (not just for external
|
||||
// claims) so the handler can decide presentation; blame is read from these
|
||||
// columns, never inferred from status (invariant 9 -- status alone says
|
||||
// nothing about fault). Capped at 200: this is a page display read, not a
|
||||
// business-rule cap like the budget queries above, and terminal rows only
|
||||
// accumulate, so an unbounded read would eventually make the section
|
||||
// unusable rather than just long.
|
||||
func (q *Queries) ListTerminalClaimsForOperator(ctx context.Context) ([]ListTerminalClaimsForOperatorRow, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listTerminalClaimsForOperator)
|
||||
// nothing about fault). Paging bounds the read: terminal rows only
|
||||
// accumulate, and each page costs the same however many there are.
|
||||
//
|
||||
// sqlc.narg(status): the status facet over the terminal vocabulary; NULL
|
||||
// means all three. The IN keeps live rows out whatever the facet says, so a
|
||||
// value from outside the vocabulary can never widen the list.
|
||||
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
// match against the claimed root name or the owning organization's name.
|
||||
// count(*) OVER() is the true total for the filtered set, so the stated
|
||||
// total and the section header never reflect only the page.
|
||||
// Claims written in one transaction share created_at, so ties fall to the
|
||||
// claim id: it is time-ordered, which lists the later-written claim first, so
|
||||
// each lists on exactly one page.
|
||||
func (q *Queries) ListTerminalClaimsForOperatorPage(ctx context.Context, arg ListTerminalClaimsForOperatorPageParams) ([]ListTerminalClaimsForOperatorPageRow, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listTerminalClaimsForOperatorPage,
|
||||
arg.Status,
|
||||
arg.Q,
|
||||
arg.PageOffset,
|
||||
arg.PageLimit,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []ListTerminalClaimsForOperatorRow{}
|
||||
items := []ListTerminalClaimsForOperatorPageRow{}
|
||||
for rows.Next() {
|
||||
var i ListTerminalClaimsForOperatorRow
|
||||
var i ListTerminalClaimsForOperatorPageRow
|
||||
if err := rows.Scan(
|
||||
&i.ClaimID,
|
||||
&i.RootFqdn,
|
||||
@@ -696,6 +723,7 @@ func (q *Queries) ListTerminalClaimsForOperator(ctx context.Context) ([]ListTerm
|
||||
&i.WorkspaceName,
|
||||
&i.OrgID,
|
||||
&i.OrgName,
|
||||
&i.TotalCount,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
||||
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
|
||||
|
||||
package domains
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// The operator Domains page reads placements and terminal claims one page at
|
||||
// a time, each with the true total for the search and filter
|
||||
// (operator-list-scale). The suite writes to a database other tests are
|
||||
// filling, so every test scopes its reads by a token its own rows share.
|
||||
|
||||
// renameOrgOf renames the organization that owns workspaceID and returns the
|
||||
// new name, so a test can search by a part of it.
|
||||
func renameOrgOf(t *testing.T, database *sql.DB, workspaceID, name string) {
|
||||
t.Helper()
|
||||
if _, err := database.ExecContext(context.Background(),
|
||||
`UPDATE core.organizations SET name = $1
|
||||
WHERE org_id = (SELECT org_id FROM core.workspaces WHERE workspace_id = $2)`,
|
||||
name, workspaceID); err != nil {
|
||||
t.Fatalf("rename organization of %s: %v", workspaceID, err)
|
||||
}
|
||||
}
|
||||
|
||||
// insertClaim writes a claim straight to the table, bypassing the registry's
|
||||
// lifecycle, and returns its id.
|
||||
func insertClaim(t *testing.T, database *sql.DB, workspaceID, root, status, createdAt string) string {
|
||||
t.Helper()
|
||||
var id string
|
||||
if err := database.QueryRowContext(context.Background(),
|
||||
`INSERT INTO domains.claims (workspace_id, root_fqdn, reversed_labels, kind, status, created_at)
|
||||
VALUES ($1, $2, $2, 'external', $3, $4::timestamptz) RETURNING claim_id`,
|
||||
workspaceID, root, status, createdAt).Scan(&id); err != nil {
|
||||
t.Fatalf("insert %s claim %s: %v", status, root, err)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
func insertPlacement(t *testing.T, database *sql.DB, claimID, fqdn string, servable bool) {
|
||||
t.Helper()
|
||||
if _, err := database.ExecContext(context.Background(),
|
||||
`INSERT INTO domains.placements (claim_id, fqdn, reversed_labels, provider, resource_ref, servable)
|
||||
VALUES ($1, $2, $2, 'testprovider', $3, $4)`,
|
||||
claimID, fqdn, "res-"+uniqueToken(), servable); err != nil {
|
||||
t.Fatalf("insert placement %s: %v", fqdn, err)
|
||||
}
|
||||
}
|
||||
|
||||
func placementNames(rows []ListPlacementsForOperatorPageRow) []string {
|
||||
names := make([]string, len(rows))
|
||||
for i, row := range rows {
|
||||
names[i] = row.Fqdn
|
||||
}
|
||||
return names
|
||||
}
|
||||
|
||||
// TestListPlacementsPageSearchesFiltersAndCounts: the search matches the
|
||||
// served name or the holding organization's name in either case, the servable
|
||||
// filter narrows it, the total describes the filtered set under a page
|
||||
// smaller than the result, and names come back in name order.
|
||||
func TestListPlacementsPageSearchesFiltersAndCounts(t *testing.T) {
|
||||
r, database := newRegistryTestEnv(t)
|
||||
ctx := context.Background()
|
||||
north, south := newWorkspace(t, database), newWorkspace(t, database)
|
||||
token, orgToken := uniqueToken(), uniqueToken()
|
||||
renameOrgOf(t, database, north, "Org "+orgToken+" North")
|
||||
|
||||
northClaim := insertClaim(t, database, north, token+"-n.example", "active", "2026-01-01T00:00:00Z")
|
||||
southClaim := insertClaim(t, database, south, token+"-s.example", "active", "2026-01-01T00:00:00Z")
|
||||
insertPlacement(t, database, northClaim, token+"-b.example", true)
|
||||
insertPlacement(t, database, northClaim, token+"-a.example", true)
|
||||
insertPlacement(t, database, southClaim, token+"-c.example", false)
|
||||
|
||||
rows, total, err := r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: token, Limit: 50})
|
||||
if err != nil {
|
||||
t.Fatalf("list placements: %v", err)
|
||||
}
|
||||
want := []string{token + "-a.example", token + "-b.example", token + "-c.example"}
|
||||
if got := placementNames(rows); !slices.Equal(got, want) || total != 3 {
|
||||
t.Errorf("search for the shared token = %v with total %d, want %v with total 3", got, total, want)
|
||||
}
|
||||
if rows[0].OrgID == "" || rows[0].OrgName != "Org "+orgToken+" North" {
|
||||
t.Errorf("row carries org %q (%q), want the holder's id and name", rows[0].OrgID, rows[0].OrgName)
|
||||
}
|
||||
|
||||
rows, total, err = r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: token + "-B", Limit: 50})
|
||||
if err != nil || len(rows) != 1 || total != 1 || rows[0].Fqdn != token+"-b.example" {
|
||||
t.Errorf("a mixed-case part of a served name = (%v, %d, %v), want only the -b name", placementNames(rows), total, err)
|
||||
}
|
||||
|
||||
rows, total, err = r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: strings.ToUpper(orgToken), Limit: 50})
|
||||
if err != nil {
|
||||
t.Fatalf("search by organization: %v", err)
|
||||
}
|
||||
if got := placementNames(rows); !slices.Equal(got, want[:2]) || total != 2 {
|
||||
t.Errorf("search by part of the organization's name = %v with total %d, want the two north names", got, total)
|
||||
}
|
||||
|
||||
unservable := false
|
||||
rows, total, err = r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: token, Servable: &unservable, Limit: 50})
|
||||
if err != nil || len(rows) != 1 || total != 1 || rows[0].Fqdn != token+"-c.example" || rows[0].Servable {
|
||||
t.Errorf("unservable filter = (%v, %d, %v), want only the -c name", placementNames(rows), total, err)
|
||||
}
|
||||
servable := true
|
||||
_, total, err = r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: token, Servable: &servable, Limit: 50})
|
||||
if err != nil || total != 2 {
|
||||
t.Errorf("servable filter total = (%d, %v), want 2", total, err)
|
||||
}
|
||||
|
||||
rows, total, err = r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: token, Limit: 2})
|
||||
if err != nil || len(rows) != 2 || total != 3 {
|
||||
t.Errorf("first page of two = (%d rows, total %d, %v), want 2 rows under the true total 3", len(rows), total, err)
|
||||
}
|
||||
rows, total, err = r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: token, Limit: 2, Offset: 2})
|
||||
if err != nil || len(rows) != 1 || total != 3 || rows[0].Fqdn != want[2] {
|
||||
t.Errorf("second page of two = (%v, total %d, %v), want the -c name under total 3", placementNames(rows), total, err)
|
||||
}
|
||||
|
||||
rows, total, err = r.ListPlacementsPage(ctx, OperatorPlacementsPage{Q: token + "-nothing", Limit: 50})
|
||||
if err != nil || len(rows) != 0 || total != 0 {
|
||||
t.Errorf("a search matching nothing = (%d rows, total %d, %v), want none and zero", len(rows), total, err)
|
||||
}
|
||||
}
|
||||
|
||||
// terminalFixture is the claims the terminal-list tests read: 210 terminal
|
||||
// claims of one holder (a second apart, statuses rotating through the three
|
||||
// terminal values), a live claim that must never list, and two expired
|
||||
// claims of another organization written in the same instant.
|
||||
type terminalFixture struct {
|
||||
token, orgToken string
|
||||
}
|
||||
|
||||
const terminalCount = 210
|
||||
|
||||
func seedTerminalClaims(t *testing.T, database *sql.DB) terminalFixture {
|
||||
t.Helper()
|
||||
holder, other := newWorkspace(t, database), newWorkspace(t, database)
|
||||
fx := terminalFixture{token: uniqueToken(), orgToken: uniqueToken()}
|
||||
renameOrgOf(t, database, other, "Org "+fx.orgToken+" East")
|
||||
if _, err := database.ExecContext(context.Background(), `
|
||||
INSERT INTO domains.claims (workspace_id, root_fqdn, reversed_labels, kind, status, created_at)
|
||||
SELECT $1, $2 || '-' || n || '.example', $2 || '-' || n, 'external',
|
||||
(ARRAY['expired', 'canceled', 'released'])[1 + n % 3],
|
||||
'2026-01-01T00:00:00Z'::timestamptz + n * interval '1 second'
|
||||
FROM generate_series(1, $3::int) AS n`, holder, fx.token, terminalCount); err != nil {
|
||||
t.Fatalf("insert terminal claims: %v", err)
|
||||
}
|
||||
insertClaim(t, database, holder, fx.token+"-live.example", "active", "2026-01-01T00:00:00Z")
|
||||
tied := "2027-01-01T00:00:00Z"
|
||||
insertClaim(t, database, other, fx.token+"-tie-1.example", "expired", tied)
|
||||
insertClaim(t, database, other, fx.token+"-tie-2.example", "expired", tied)
|
||||
return fx
|
||||
}
|
||||
|
||||
// TestListTerminalClaimsPageOrdersAndPages: only terminal claims list, newest
|
||||
// first with ties in claim-id order, the total is the filtered set's, more
|
||||
// than the old 200-row cap is reachable by paging, and every claim lists on
|
||||
// exactly one page.
|
||||
func TestListTerminalClaimsPageOrdersAndPages(t *testing.T) {
|
||||
r, database := newRegistryTestEnv(t)
|
||||
ctx := context.Background()
|
||||
fx := seedTerminalClaims(t, database)
|
||||
const all = terminalCount + 2
|
||||
|
||||
rows, total, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: fx.token, Limit: 50})
|
||||
if err != nil {
|
||||
t.Fatalf("list terminal claims: %v", err)
|
||||
}
|
||||
if total != all || len(rows) != 50 {
|
||||
t.Fatalf("first page = %d rows under total %d, want 50 under %d", len(rows), total, all)
|
||||
}
|
||||
for _, row := range rows {
|
||||
if row.Status == StatusPending || row.Status == StatusActive {
|
||||
t.Fatalf("a live claim %s (%s) is in the terminal list", row.RootFqdn, row.Status)
|
||||
}
|
||||
}
|
||||
if rows[0].CreatedAt.Before(rows[2].CreatedAt) {
|
||||
t.Error("the list is not newest first")
|
||||
}
|
||||
if !rows[0].CreatedAt.Equal(rows[1].CreatedAt) || rows[0].ClaimID < rows[1].ClaimID {
|
||||
t.Errorf("tied claims list as %s then %s, want claim-id order, later id first", rows[0].ClaimID, rows[1].ClaimID)
|
||||
}
|
||||
|
||||
// Past the 200 rows the read used to stop at.
|
||||
last, lastTotal, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: fx.token, Limit: 50, Offset: 200})
|
||||
if err != nil || len(last) != 12 || lastTotal != all {
|
||||
t.Errorf("page past row 200 = (%d rows, total %d, %v), want 12 rows under %d", len(last), lastTotal, err, all)
|
||||
}
|
||||
|
||||
seen := map[string]bool{}
|
||||
for offset := int32(0); offset < all; offset += 50 {
|
||||
page, _, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: fx.token, Limit: 50, Offset: offset})
|
||||
if err != nil {
|
||||
t.Fatalf("page at %d: %v", offset, err)
|
||||
}
|
||||
for _, row := range page {
|
||||
if seen[row.ClaimID] {
|
||||
t.Fatalf("claim %s lists on two pages", row.ClaimID)
|
||||
}
|
||||
seen[row.ClaimID] = true
|
||||
}
|
||||
}
|
||||
if len(seen) != all {
|
||||
t.Errorf("paging reached %d claims, want %d", len(seen), all)
|
||||
}
|
||||
}
|
||||
|
||||
// TestListTerminalClaimsPageTiesPageByClaimID ties twenty terminal claims at
|
||||
// one instant and pages them three at a time, so the ties straddle page
|
||||
// boundaries; the claim id is the only thing that can list them each once,
|
||||
// in strictly descending id.
|
||||
func TestListTerminalClaimsPageTiesPageByClaimID(t *testing.T) {
|
||||
r, database := newRegistryTestEnv(t)
|
||||
ctx := context.Background()
|
||||
holder := newWorkspace(t, database)
|
||||
token := uniqueToken()
|
||||
const tied = 20
|
||||
for i := 0; i < tied; i++ {
|
||||
insertClaim(t, database, holder, fmt.Sprintf("%s-%02d.example", token, i), "expired", "2026-03-01T00:00:00Z")
|
||||
}
|
||||
|
||||
var got []string
|
||||
for offset := int32(0); offset < tied; offset += 3 {
|
||||
page, total, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: token, Limit: 3, Offset: offset})
|
||||
if err != nil || total != tied {
|
||||
t.Fatalf("page at %d = (total %d, %v), want total %d", offset, total, err, tied)
|
||||
}
|
||||
for _, row := range page {
|
||||
got = append(got, row.ClaimID)
|
||||
}
|
||||
}
|
||||
if len(got) != tied {
|
||||
t.Fatalf("paging listed %d claims, want %d", len(got), tied)
|
||||
}
|
||||
for i := 1; i < len(got); i++ {
|
||||
if got[i-1] <= got[i] {
|
||||
t.Fatalf("claims %s then %s: want each once in strictly descending claim id", got[i-1], got[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestListTerminalClaimsPageFiltersAndSearches: the status filter narrows to
|
||||
// one terminal value and never widens past them, and the search matches the
|
||||
// root name or the organization's name in either case.
|
||||
func TestListTerminalClaimsPageFiltersAndSearches(t *testing.T) {
|
||||
r, database := newRegistryTestEnv(t)
|
||||
ctx := context.Background()
|
||||
fx := seedTerminalClaims(t, database)
|
||||
|
||||
canceled, canceledTotal, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: fx.token, Status: StatusCanceled, Limit: 10})
|
||||
if err != nil || canceledTotal != terminalCount/3 || len(canceled) != 10 {
|
||||
t.Errorf("canceled filter = (%d rows, total %d, %v), want 10 rows under %d", len(canceled), canceledTotal, err, terminalCount/3)
|
||||
}
|
||||
for _, row := range canceled {
|
||||
if row.Status != StatusCanceled {
|
||||
t.Errorf("status filter listed a %s claim", row.Status)
|
||||
}
|
||||
}
|
||||
|
||||
// A value from outside the terminal vocabulary never widens the list.
|
||||
live, liveTotal, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: fx.token, Status: StatusActive, Limit: 50})
|
||||
if err != nil || len(live) != 0 || liveTotal != 0 {
|
||||
t.Errorf("status filter active = (%d rows, total %d, %v), want none", len(live), liveTotal, err)
|
||||
}
|
||||
|
||||
byRoot, byRootTotal, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: strings.ToUpper(fx.token + "-17."), Limit: 50})
|
||||
if err != nil || byRootTotal != 1 || len(byRoot) != 1 || byRoot[0].RootFqdn != fx.token+"-17.example" {
|
||||
t.Errorf("search by root, mixed case = (%d rows, total %d, %v), want the -17 claim", len(byRoot), byRootTotal, err)
|
||||
}
|
||||
|
||||
byOrg, byOrgTotal, err := r.ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage{Q: strings.ToUpper(fx.orgToken), Limit: 50})
|
||||
if err != nil || byOrgTotal != 2 || len(byOrg) != 2 {
|
||||
t.Fatalf("search by part of the organization's name = (%d rows, total %d, %v), want the two tied claims", len(byOrg), byOrgTotal, err)
|
||||
}
|
||||
if byOrg[0].OrgName != "Org "+fx.orgToken+" East" || byOrg[0].ClaimID < byOrg[1].ClaimID {
|
||||
t.Errorf("organization search rows = %s then %s under %q, want later claim id first under the holder's name",
|
||||
byOrg[0].ClaimID, byOrg[1].ClaimID, byOrg[0].OrgName)
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ package domains
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"github.com/lib/pq"
|
||||
@@ -158,60 +159,6 @@ func (q *Queries) GetPlacementByResource(ctx context.Context, arg GetPlacementBy
|
||||
return i, err
|
||||
}
|
||||
|
||||
const listAllPlacementsForOperator = `-- name: ListAllPlacementsForOperator :many
|
||||
SELECT placement_id, claim_id, fqdn, provider, resource_ref, servable, created_at
|
||||
FROM domains.placements
|
||||
ORDER BY fqdn
|
||||
`
|
||||
|
||||
type ListAllPlacementsForOperatorRow struct {
|
||||
PlacementID string `json:"placement_id"`
|
||||
ClaimID string `json:"claim_id"`
|
||||
Fqdn string `json:"fqdn"`
|
||||
Provider string `json:"provider"`
|
||||
ResourceRef string `json:"resource_ref"`
|
||||
Servable bool `json:"servable"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
// The operator placements section (ux-ia-naming task 9.1): every exact name
|
||||
// actually being served, deployment-wide, each with the provider resource it
|
||||
// is wired to. Claims and placements are never conflated
|
||||
// (docs/models/domains-registry.md, "Claim vs placement") -- a claim can hold
|
||||
// a name that serves nothing, and this is the query that answers what
|
||||
// actually serves. Ordered by fqdn so the list reads in the same namespace
|
||||
// order as the claims table above it.
|
||||
func (q *Queries) ListAllPlacementsForOperator(ctx context.Context) ([]ListAllPlacementsForOperatorRow, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listAllPlacementsForOperator)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []ListAllPlacementsForOperatorRow{}
|
||||
for rows.Next() {
|
||||
var i ListAllPlacementsForOperatorRow
|
||||
if err := rows.Scan(
|
||||
&i.PlacementID,
|
||||
&i.ClaimID,
|
||||
&i.Fqdn,
|
||||
&i.Provider,
|
||||
&i.ResourceRef,
|
||||
&i.Servable,
|
||||
&i.CreatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listPlacementsByClaim = `-- name: ListPlacementsByClaim :many
|
||||
SELECT placement_id, claim_id, fqdn, reversed_labels, provider, resource_ref, servable, created_at, updated_at FROM domains.placements
|
||||
WHERE claim_id = $1
|
||||
@@ -292,6 +239,101 @@ func (q *Queries) ListPlacementsByFQDNs(ctx context.Context, fqdns []string) ([]
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listPlacementsForOperatorPage = `-- name: ListPlacementsForOperatorPage :many
|
||||
SELECT p.placement_id, p.claim_id, p.fqdn, p.provider, p.resource_ref,
|
||||
p.servable, p.created_at,
|
||||
o.org_id, o.name AS org_name,
|
||||
count(*) OVER() AS total_count
|
||||
FROM domains.placements p
|
||||
JOIN domains.claims c ON c.claim_id = p.claim_id
|
||||
JOIN core.workspaces w ON w.workspace_id = c.workspace_id
|
||||
JOIN core.organizations o ON o.org_id = w.org_id
|
||||
WHERE ($1::text IS NULL
|
||||
OR p.fqdn ILIKE '%' || $1::text || '%'
|
||||
OR o.name ILIKE '%' || $1::text || '%')
|
||||
AND ($2::boolean IS NULL OR p.servable = $2::boolean)
|
||||
ORDER BY p.fqdn, p.placement_id
|
||||
LIMIT $4::int OFFSET $3::int
|
||||
`
|
||||
|
||||
type ListPlacementsForOperatorPageParams struct {
|
||||
Q sql.NullString `json:"q"`
|
||||
Servable sql.NullBool `json:"servable"`
|
||||
PageOffset int32 `json:"page_offset"`
|
||||
PageLimit int32 `json:"page_limit"`
|
||||
}
|
||||
|
||||
type ListPlacementsForOperatorPageRow struct {
|
||||
PlacementID string `json:"placement_id"`
|
||||
ClaimID string `json:"claim_id"`
|
||||
Fqdn string `json:"fqdn"`
|
||||
Provider string `json:"provider"`
|
||||
ResourceRef string `json:"resource_ref"`
|
||||
Servable bool `json:"servable"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
OrgID string `json:"org_id"`
|
||||
OrgName string `json:"org_name"`
|
||||
TotalCount int64 `json:"total_count"`
|
||||
}
|
||||
|
||||
// The operator placements section, governed by operator-list-scale: one page
|
||||
// of the exact names actually being served, deployment-wide, each with the
|
||||
// provider resource it is wired to and the organization that holds the claim
|
||||
// it is placed under. Claims and placements are never conflated
|
||||
// (docs/models/domains-registry.md, "Claim vs placement") -- a claim can hold
|
||||
// a name that serves nothing, and this is the query that answers what
|
||||
// actually serves. Ordered by fqdn; the placement id breaks a tie, though
|
||||
// fqdn is unique.
|
||||
//
|
||||
// It joins core because the holder is searched and shown (the domains
|
||||
// migration grants core_reader to domains_writer for this kind of read).
|
||||
// claim_id is NOT NULL, so the joins drop no placement.
|
||||
//
|
||||
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
// match against the served name or the holding organization's name.
|
||||
// sqlc.narg(servable): NULL matches both; set, only placements with that
|
||||
// servability.
|
||||
// count(*) OVER() is the true total for the filtered set, so the stated
|
||||
// total and the section header never reflect only the page.
|
||||
func (q *Queries) ListPlacementsForOperatorPage(ctx context.Context, arg ListPlacementsForOperatorPageParams) ([]ListPlacementsForOperatorPageRow, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listPlacementsForOperatorPage,
|
||||
arg.Q,
|
||||
arg.Servable,
|
||||
arg.PageOffset,
|
||||
arg.PageLimit,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []ListPlacementsForOperatorPageRow{}
|
||||
for rows.Next() {
|
||||
var i ListPlacementsForOperatorPageRow
|
||||
if err := rows.Scan(
|
||||
&i.PlacementID,
|
||||
&i.ClaimID,
|
||||
&i.Fqdn,
|
||||
&i.Provider,
|
||||
&i.ResourceRef,
|
||||
&i.Servable,
|
||||
&i.CreatedAt,
|
||||
&i.OrgID,
|
||||
&i.OrgName,
|
||||
&i.TotalCount,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listPlacementsInSubtree = `-- name: ListPlacementsInSubtree :many
|
||||
SELECT placement_id, claim_id, fqdn, reversed_labels, provider, resource_ref, servable, created_at, updated_at FROM domains.placements
|
||||
WHERE reversed_labels LIKE $1::text || '.%'
|
||||
|
||||
+44
-23
@@ -59,14 +59,6 @@ type Querier interface {
|
||||
// when fewer than @budget entries remain in the window, which is when the
|
||||
// @budget-th newest ages out.
|
||||
ListAbandonmentsInScope(ctx context.Context, arg ListAbandonmentsInScopeParams) ([]sql.NullTime, error)
|
||||
// The operator placements section (ux-ia-naming task 9.1): every exact name
|
||||
// actually being served, deployment-wide, each with the provider resource it
|
||||
// is wired to. Claims and placements are never conflated
|
||||
// (docs/models/domains-registry.md, "Claim vs placement") -- a claim can hold
|
||||
// a name that serves nothing, and this is the query that answers what
|
||||
// actually serves. Ordered by fqdn so the list reads in the same namespace
|
||||
// order as the claims table above it.
|
||||
ListAllPlacementsForOperator(ctx context.Context) ([]ListAllPlacementsForOperatorRow, error)
|
||||
// The expiry sweep's candidate read (claim-expiry-and-carve-guards D1). This
|
||||
// is the query idx_claims_pending_expires_at was created for: the partial
|
||||
// index over (expires_at) WHERE status = 'pending' answers it directly, and
|
||||
@@ -97,11 +89,11 @@ type Querier interface {
|
||||
// so page one carries the claims that need attention rather than whatever
|
||||
// fifty rows the planner reached first.
|
||||
//
|
||||
// This is the one query in the stream that reads core (the domains migration
|
||||
// grants core_reader to domains_writer for exactly this kind of read). It
|
||||
// projects columns rather than whole rows so no core model enters this
|
||||
// package's API — sqlc.yaml documents the rename entries a whole-row join
|
||||
// would otherwise need.
|
||||
// Like the operator's other paged reads, this one reads core (the domains
|
||||
// migration grants core_reader to domains_writer for exactly this kind of
|
||||
// read). It projects columns rather than whole rows so no core model enters
|
||||
// this package's API — sqlc.yaml documents the rename entries a whole-row
|
||||
// join would otherwise need.
|
||||
//
|
||||
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
// match against the claimed root name or the owning organization's name
|
||||
@@ -126,6 +118,26 @@ type Querier interface {
|
||||
// Ancestor walk on placements: an operator placement above a candidate root
|
||||
// blocks carving it. Exact equality keeps this on the fqdn unique index.
|
||||
ListPlacementsByFQDNs(ctx context.Context, fqdns []string) ([]Placement, error)
|
||||
// The operator placements section, governed by operator-list-scale: one page
|
||||
// of the exact names actually being served, deployment-wide, each with the
|
||||
// provider resource it is wired to and the organization that holds the claim
|
||||
// it is placed under. Claims and placements are never conflated
|
||||
// (docs/models/domains-registry.md, "Claim vs placement") -- a claim can hold
|
||||
// a name that serves nothing, and this is the query that answers what
|
||||
// actually serves. Ordered by fqdn; the placement id breaks a tie, though
|
||||
// fqdn is unique.
|
||||
//
|
||||
// It joins core because the holder is searched and shown (the domains
|
||||
// migration grants core_reader to domains_writer for this kind of read).
|
||||
// claim_id is NOT NULL, so the joins drop no placement.
|
||||
//
|
||||
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
// match against the served name or the holding organization's name.
|
||||
// sqlc.narg(servable): NULL matches both; set, only placements with that
|
||||
// servability.
|
||||
// count(*) OVER() is the true total for the filtered set, so the stated
|
||||
// total and the section header never reflect only the page.
|
||||
ListPlacementsForOperatorPage(ctx context.Context, arg ListPlacementsForOperatorPageParams) ([]ListPlacementsForOperatorPageRow, error)
|
||||
// Descendant scan via the reversed-label prefix; excludes the subtree root
|
||||
// itself (an exact hit is the unique index's business).
|
||||
ListPlacementsInSubtree(ctx context.Context, reversedRoot string) ([]Placement, error)
|
||||
@@ -151,20 +163,29 @@ type Querier interface {
|
||||
// console failure is never charged to the member, and the initiation
|
||||
// budget is a charge.
|
||||
ListRecentClaimInitiations(ctx context.Context, arg ListRecentClaimInitiationsParams) ([]time.Time, error)
|
||||
// The operator claims ledger section (ux-ia-naming task 9.2): every claim
|
||||
// that has left a live state, deployment-wide, newest first. Today only live
|
||||
// claims render on the moderation surface; this read makes expired,
|
||||
// canceled, and released claims reachable too, in a list segregated from the
|
||||
// live one.
|
||||
// The operator claim history section, governed by operator-list-scale: one
|
||||
// page of every claim that has left a live state, deployment-wide, newest
|
||||
// first. The live moderation list shows only live claims; this read makes
|
||||
// expired, canceled, and released claims reachable too, in a list segregated
|
||||
// from the live one.
|
||||
//
|
||||
// The three ledger columns ride along unconditionally (not just for external
|
||||
// claims) so the handler can decide presentation; blame is read from these
|
||||
// columns, never inferred from status (invariant 9 -- status alone says
|
||||
// nothing about fault). Capped at 200: this is a page display read, not a
|
||||
// business-rule cap like the budget queries above, and terminal rows only
|
||||
// accumulate, so an unbounded read would eventually make the section
|
||||
// unusable rather than just long.
|
||||
ListTerminalClaimsForOperator(ctx context.Context) ([]ListTerminalClaimsForOperatorRow, error)
|
||||
// nothing about fault). Paging bounds the read: terminal rows only
|
||||
// accumulate, and each page costs the same however many there are.
|
||||
//
|
||||
// sqlc.narg(status): the status facet over the terminal vocabulary; NULL
|
||||
// means all three. The IN keeps live rows out whatever the facet says, so a
|
||||
// value from outside the vocabulary can never widen the list.
|
||||
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
// match against the claimed root name or the owning organization's name.
|
||||
// count(*) OVER() is the true total for the filtered set, so the stated
|
||||
// total and the section header never reflect only the page.
|
||||
// Claims written in one transaction share created_at, so ties fall to the
|
||||
// claim id: it is time-ordered, which lists the later-written claim first, so
|
||||
// each lists on exactly one page.
|
||||
ListTerminalClaimsForOperatorPage(ctx context.Context, arg ListTerminalClaimsForOperatorPageParams) ([]ListTerminalClaimsForOperatorPageRow, error)
|
||||
// Verification success. Guarded on pending so a late workflow write never
|
||||
// reanimates a canceled or expired claim.
|
||||
//
|
||||
|
||||
@@ -53,11 +53,11 @@ ORDER BY c.created_at DESC;
|
||||
-- so page one carries the claims that need attention rather than whatever
|
||||
-- fifty rows the planner reached first.
|
||||
--
|
||||
-- This is the one query in the stream that reads core (the domains migration
|
||||
-- grants core_reader to domains_writer for exactly this kind of read). It
|
||||
-- projects columns rather than whole rows so no core model enters this
|
||||
-- package's API — sqlc.yaml documents the rename entries a whole-row join
|
||||
-- would otherwise need.
|
||||
-- Like the operator's other paged reads, this one reads core (the domains
|
||||
-- migration grants core_reader to domains_writer for exactly this kind of
|
||||
-- read). It projects columns rather than whole rows so no core model enters
|
||||
-- this package's API — sqlc.yaml documents the rename entries a whole-row
|
||||
-- join would otherwise need.
|
||||
--
|
||||
-- sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
-- match against the claimed root name or the owning organization's name
|
||||
@@ -264,30 +264,44 @@ WHERE workspace_id = @workspace_id
|
||||
ORDER BY abandoned_at DESC
|
||||
LIMIT @budget::bigint;
|
||||
|
||||
-- name: ListTerminalClaimsForOperator :many
|
||||
-- The operator claims ledger section (ux-ia-naming task 9.2): every claim
|
||||
-- that has left a live state, deployment-wide, newest first. Today only live
|
||||
-- claims render on the moderation surface; this read makes expired,
|
||||
-- canceled, and released claims reachable too, in a list segregated from the
|
||||
-- live one.
|
||||
-- name: ListTerminalClaimsForOperatorPage :many
|
||||
-- The operator claim history section, governed by operator-list-scale: one
|
||||
-- page of every claim that has left a live state, deployment-wide, newest
|
||||
-- first. The live moderation list shows only live claims; this read makes
|
||||
-- expired, canceled, and released claims reachable too, in a list segregated
|
||||
-- from the live one.
|
||||
--
|
||||
-- The three ledger columns ride along unconditionally (not just for external
|
||||
-- claims) so the handler can decide presentation; blame is read from these
|
||||
-- columns, never inferred from status (invariant 9 -- status alone says
|
||||
-- nothing about fault). Capped at 200: this is a page display read, not a
|
||||
-- business-rule cap like the budget queries above, and terminal rows only
|
||||
-- accumulate, so an unbounded read would eventually make the section
|
||||
-- unusable rather than just long.
|
||||
-- nothing about fault). Paging bounds the read: terminal rows only
|
||||
-- accumulate, and each page costs the same however many there are.
|
||||
--
|
||||
-- sqlc.narg(status): the status facet over the terminal vocabulary; NULL
|
||||
-- means all three. The IN keeps live rows out whatever the facet says, so a
|
||||
-- value from outside the vocabulary can never widen the list.
|
||||
-- sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
-- match against the claimed root name or the owning organization's name.
|
||||
-- count(*) OVER() is the true total for the filtered set, so the stated
|
||||
-- total and the section header never reflect only the page.
|
||||
-- Claims written in one transaction share created_at, so ties fall to the
|
||||
-- claim id: it is time-ordered, which lists the later-written claim first, so
|
||||
-- each lists on exactly one page.
|
||||
SELECT c.claim_id, c.root_fqdn, c.kind, c.status, c.created_at,
|
||||
c.evidence_at, c.abandoned_at, c.system_canceled_at,
|
||||
c.workspace_id, w.name AS workspace_name,
|
||||
o.org_id, o.name AS org_name
|
||||
o.org_id, o.name AS org_name,
|
||||
count(*) OVER() AS total_count
|
||||
FROM domains.claims c
|
||||
JOIN core.workspaces w ON w.workspace_id = c.workspace_id
|
||||
JOIN core.organizations o ON o.org_id = w.org_id
|
||||
WHERE c.status IN ('expired', 'canceled', 'released')
|
||||
ORDER BY c.created_at DESC
|
||||
LIMIT 200;
|
||||
AND (sqlc.narg(status)::text IS NULL OR c.status = sqlc.narg(status)::text)
|
||||
AND (sqlc.narg(q)::text IS NULL
|
||||
OR c.root_fqdn ILIKE '%' || sqlc.narg(q)::text || '%'
|
||||
OR o.name ILIKE '%' || sqlc.narg(q)::text || '%')
|
||||
ORDER BY c.created_at DESC, c.claim_id DESC
|
||||
LIMIT sqlc.arg(page_limit)::int OFFSET sqlc.arg(page_offset)::int;
|
||||
|
||||
-- name: ListRecentClaimInitiations :many
|
||||
-- The breadth budget read (design D5): external claims this workspace started
|
||||
|
||||
@@ -50,14 +50,37 @@ ORDER BY reversed_labels;
|
||||
DELETE FROM domains.placements
|
||||
WHERE placement_id = $1;
|
||||
|
||||
-- name: ListAllPlacementsForOperator :many
|
||||
-- The operator placements section (ux-ia-naming task 9.1): every exact name
|
||||
-- actually being served, deployment-wide, each with the provider resource it
|
||||
-- is wired to. Claims and placements are never conflated
|
||||
-- name: ListPlacementsForOperatorPage :many
|
||||
-- The operator placements section, governed by operator-list-scale: one page
|
||||
-- of the exact names actually being served, deployment-wide, each with the
|
||||
-- provider resource it is wired to and the organization that holds the claim
|
||||
-- it is placed under. Claims and placements are never conflated
|
||||
-- (docs/models/domains-registry.md, "Claim vs placement") -- a claim can hold
|
||||
-- a name that serves nothing, and this is the query that answers what
|
||||
-- actually serves. Ordered by fqdn so the list reads in the same namespace
|
||||
-- order as the claims table above it.
|
||||
SELECT placement_id, claim_id, fqdn, provider, resource_ref, servable, created_at
|
||||
FROM domains.placements
|
||||
ORDER BY fqdn;
|
||||
-- actually serves. Ordered by fqdn; the placement id breaks a tie, though
|
||||
-- fqdn is unique.
|
||||
--
|
||||
-- It joins core because the holder is searched and shown (the domains
|
||||
-- migration grants core_reader to domains_writer for this kind of read).
|
||||
-- claim_id is NOT NULL, so the joins drop no placement.
|
||||
--
|
||||
-- sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
||||
-- match against the served name or the holding organization's name.
|
||||
-- sqlc.narg(servable): NULL matches both; set, only placements with that
|
||||
-- servability.
|
||||
-- count(*) OVER() is the true total for the filtered set, so the stated
|
||||
-- total and the section header never reflect only the page.
|
||||
SELECT p.placement_id, p.claim_id, p.fqdn, p.provider, p.resource_ref,
|
||||
p.servable, p.created_at,
|
||||
o.org_id, o.name AS org_name,
|
||||
count(*) OVER() AS total_count
|
||||
FROM domains.placements p
|
||||
JOIN domains.claims c ON c.claim_id = p.claim_id
|
||||
JOIN core.workspaces w ON w.workspace_id = c.workspace_id
|
||||
JOIN core.organizations o ON o.org_id = w.org_id
|
||||
WHERE (sqlc.narg(q)::text IS NULL
|
||||
OR p.fqdn ILIKE '%' || sqlc.narg(q)::text || '%'
|
||||
OR o.name ILIKE '%' || sqlc.narg(q)::text || '%')
|
||||
AND (sqlc.narg(servable)::boolean IS NULL OR p.servable = sqlc.narg(servable)::boolean)
|
||||
ORDER BY p.fqdn, p.placement_id
|
||||
LIMIT sqlc.arg(page_limit)::int OFFSET sqlc.arg(page_offset)::int;
|
||||
|
||||
@@ -606,38 +606,94 @@ func (r *Registry) ListAllLiveClaimsPage(ctx context.Context, p OperatorClaimsPa
|
||||
return rows, total, nil
|
||||
}
|
||||
|
||||
// ListAllTerminalClaims returns every claim that has left a live state
|
||||
// (expired, canceled, released), deployment-wide, newest first, with the
|
||||
// three ledger columns riding along -- the read behind the operator claims
|
||||
// ledger section (ux-ia-naming task 9.2). Blame lives in evidence_at /
|
||||
// abandoned_at / system_canceled_at, never in status; this query is the only
|
||||
// place those three columns are read together for display. Capped at 200 by
|
||||
// the query itself: a page display bound, not a business rule.
|
||||
func (r *Registry) ListAllTerminalClaims(ctx context.Context) ([]ListTerminalClaimsForOperatorRow, error) {
|
||||
if r.q == nil {
|
||||
return nil, ErrNoDatabase
|
||||
}
|
||||
rows, err := r.q.ListTerminalClaimsForOperator(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("domains: list terminal claims: %w", err)
|
||||
}
|
||||
return rows, nil
|
||||
// OperatorTerminalClaimsPage is the window the operator claim history reads
|
||||
// terminal claims through. Q is a case-insensitive substring matched against
|
||||
// the claimed root name or the owning organization's name; Status is the
|
||||
// terminal facet ("expired", "canceled" or "released"), empty meaning all
|
||||
// three. Limit of zero reads no rows, which is the caller's bug, not a silent
|
||||
// unbounded read.
|
||||
type OperatorTerminalClaimsPage struct {
|
||||
Q string
|
||||
Status string
|
||||
Limit int32
|
||||
Offset int32
|
||||
}
|
||||
|
||||
// ListAllPlacements returns every placement in the deployment -- the exact
|
||||
// names actually being served -- ordered by fqdn. The read behind the
|
||||
// operator placements section (ux-ia-naming task 9.1): claims and placements
|
||||
// are never conflated, so the moderation surface needs its own read of what
|
||||
// actually serves, separate from who holds what.
|
||||
func (r *Registry) ListAllPlacements(ctx context.Context) ([]ListAllPlacementsForOperatorRow, error) {
|
||||
// ListTerminalClaimsPage returns one page of the claims that have left a live
|
||||
// state (expired, canceled, released), deployment-wide, newest first, with
|
||||
// the three ledger columns riding along, plus the true total for the search
|
||||
// and facet -- the read behind the operator claim history section, governed
|
||||
// by operator-list-scale. Blame lives in evidence_at / abandoned_at /
|
||||
// system_canceled_at, never in status; this query is the only place those
|
||||
// three columns are read together for display.
|
||||
//
|
||||
// The total comes from the query's count(*) OVER(), so it describes the whole
|
||||
// filtered set rather than the page; an empty page carries no total, which is
|
||||
// the zero this returns.
|
||||
func (r *Registry) ListTerminalClaimsPage(ctx context.Context, p OperatorTerminalClaimsPage) ([]ListTerminalClaimsForOperatorPageRow, int64, error) {
|
||||
if r.q == nil {
|
||||
return nil, ErrNoDatabase
|
||||
return nil, 0, ErrNoDatabase
|
||||
}
|
||||
rows, err := r.q.ListAllPlacementsForOperator(ctx)
|
||||
rows, err := r.q.ListTerminalClaimsForOperatorPage(ctx, ListTerminalClaimsForOperatorPageParams{
|
||||
Q: sql.NullString{String: p.Q, Valid: p.Q != ""},
|
||||
Status: sql.NullString{String: p.Status, Valid: p.Status != ""},
|
||||
PageLimit: p.Limit,
|
||||
PageOffset: p.Offset,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("domains: list placements: %w", err)
|
||||
return nil, 0, fmt.Errorf("domains: list terminal claims: %w", err)
|
||||
}
|
||||
return rows, nil
|
||||
var total int64
|
||||
if len(rows) > 0 {
|
||||
total = rows[0].TotalCount
|
||||
}
|
||||
return rows, total, nil
|
||||
}
|
||||
|
||||
// OperatorPlacementsPage is the window the operator placements section reads
|
||||
// through. Q is a case-insensitive substring matched against the served name
|
||||
// or the holding organization's name; Servable, when set, keeps only the
|
||||
// placements with that servability. Limit of zero reads no rows, which is the
|
||||
// caller's bug, not a silent unbounded read.
|
||||
type OperatorPlacementsPage struct {
|
||||
Q string
|
||||
Servable *bool
|
||||
Limit int32
|
||||
Offset int32
|
||||
}
|
||||
|
||||
// ListPlacementsPage returns one page of the deployment's placements -- the
|
||||
// exact names actually being served -- ordered by fqdn, each with the
|
||||
// organization that holds its claim, plus the true total for the search and
|
||||
// filter. The read behind the operator placements section: claims and
|
||||
// placements are never conflated, so the moderation surface needs its own
|
||||
// read of what actually serves, separate from who holds what.
|
||||
//
|
||||
// The total comes from the query's count(*) OVER(), so it describes the whole
|
||||
// filtered set rather than the page; an empty page carries no total, which is
|
||||
// the zero this returns.
|
||||
func (r *Registry) ListPlacementsPage(ctx context.Context, p OperatorPlacementsPage) ([]ListPlacementsForOperatorPageRow, int64, error) {
|
||||
if r.q == nil {
|
||||
return nil, 0, ErrNoDatabase
|
||||
}
|
||||
servable := sql.NullBool{}
|
||||
if p.Servable != nil {
|
||||
servable = sql.NullBool{Bool: *p.Servable, Valid: true}
|
||||
}
|
||||
rows, err := r.q.ListPlacementsForOperatorPage(ctx, ListPlacementsForOperatorPageParams{
|
||||
Q: sql.NullString{String: p.Q, Valid: p.Q != ""},
|
||||
Servable: servable,
|
||||
PageLimit: p.Limit,
|
||||
PageOffset: p.Offset,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, 0, fmt.Errorf("domains: list placements: %w", err)
|
||||
}
|
||||
var total int64
|
||||
if len(rows) > 0 {
|
||||
total = rows[0].TotalCount
|
||||
}
|
||||
return rows, total, nil
|
||||
}
|
||||
|
||||
func placementAt(ctx context.Context, q Querier, fqdn string) (*Placement, error) {
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
from OperatorDomainsData's methods. -->
|
||||
{{ template "notice" .Error }}
|
||||
|
||||
<div id="domain-page-header">
|
||||
{{ template "pageHeader" .Header }}
|
||||
</div>
|
||||
|
||||
<!-- Effective claim policy. These are core flags with no settings page, so
|
||||
this section is the only place a deployment's numbers are visible. What
|
||||
@@ -56,12 +58,19 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<!-- The live-claims table is the governed list on this page
|
||||
(operator-list-scale, design D4): search over the claimed name and the
|
||||
holder's name, the status facet over the live vocabulary, and
|
||||
true-total pagination, all from operator_list_controls.html driven by
|
||||
.Nav. The header count above is that same true total. Placements and
|
||||
history below are unpaged and carry no controls. -->
|
||||
<!-- The live-claims table is the first of the page's three governed lists
|
||||
(operator-list-scale): search over the claimed name and the holder's
|
||||
name, the status facet over the live vocabulary, and true-total
|
||||
pagination, all from operator_list_controls.html driven by .Nav. The
|
||||
header count above is that same true total. The live claims navigate
|
||||
the page, which refreshes that count; placements and history below are
|
||||
embedded lists, each with its own panel, search, filter and pager. A
|
||||
failed read shows its notice in place of the list, never an empty
|
||||
state. -->
|
||||
<div id="domain-claims-panel">
|
||||
{{ if not .ClaimsError.Empty }}
|
||||
{{ template "notice" .ClaimsError }}
|
||||
{{ else }}
|
||||
{{ if eq (len .Claims) 0 }}
|
||||
{{ if .Nav.Filtered }}
|
||||
{{ template "listControls" .Nav }}
|
||||
@@ -129,22 +138,36 @@
|
||||
</div>
|
||||
{{ template "listPager" .Nav }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Placements: the exact names actually being served, and only the exact
|
||||
names actually being served. A claim with no placements serves zero
|
||||
names, so this list is deliberately separate from the claims table
|
||||
above it (docs/models/domains-registry.md, "Claim vs placement"): an
|
||||
operator asking "what is live right now" wants this table, not that
|
||||
one. -->
|
||||
one. The section header sits inside the panel so its count follows the
|
||||
panel's search, and the Organization column shows the holder the search
|
||||
also matches. -->
|
||||
<div id="domain-placements-panel">
|
||||
{{ template "sectionHeader" .PlacementsHeader }}
|
||||
{{ if eq (len .Placements) 0 }}
|
||||
{{ template "emptyState" .NoPlacements }}
|
||||
{{ if not .PlacementsError.Empty }}
|
||||
{{ template "notice" .PlacementsError }}
|
||||
{{ else if eq (len .Placements) 0 }}
|
||||
{{ if .PlacementsNav.Filtered }}
|
||||
{{ template "listControls" .PlacementsNav }}
|
||||
{{ template "listNoMatch" .PlacementsNav }}
|
||||
{{ else }}
|
||||
{{ template "emptyState" .NoPlacements }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ template "listControls" .PlacementsNav }}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm align-middle table-record">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Organization</th>
|
||||
<th>Provider</th>
|
||||
<th>Resource</th>
|
||||
<th>State</th>
|
||||
@@ -154,6 +177,7 @@
|
||||
{{ range .Placements }}
|
||||
<tr>
|
||||
<th scope="row" class="text-nowrap"><code class="text-break">{{ .Name }}</code></th>
|
||||
<td><a href="{{ routeURL "/operator/organizations/{orgID}" .OrgID }}">{{ .OrgName }}</a></td>
|
||||
<td class="text-nowrap"><code class="small">{{ .Provider }}</code></td>
|
||||
<td class="text-nowrap"><code class="text-break">{{ .ResourceRef }}</code></td>
|
||||
<td>{{ template "statusBadge" .StateBadge }}</td>
|
||||
@@ -162,7 +186,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ template "listPager" .PlacementsNav }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Claims ledger history: expired, canceled, and released claims. An
|
||||
ordinary section, not a disclosure (task 10, round 2), below the live
|
||||
@@ -173,11 +199,21 @@
|
||||
Outcome are read from the ledger columns instead: Evidence reports
|
||||
whether evidence_at was ever stamped; Outcome names which of
|
||||
abandoned_at / system_canceled_at / evidence_at applies, for external
|
||||
claims only. -->
|
||||
claims only. The section header sits inside the panel so its count
|
||||
follows the panel's search and filter. -->
|
||||
<div id="domain-history-panel">
|
||||
{{ template "sectionHeader" .HistoryHeader }}
|
||||
{{ if eq (len .TerminalClaims) 0 }}
|
||||
{{ template "emptyState" .NoHistory }}
|
||||
{{ if not .HistoryError.Empty }}
|
||||
{{ template "notice" .HistoryError }}
|
||||
{{ else if eq (len .TerminalClaims) 0 }}
|
||||
{{ if .HistoryNav.Filtered }}
|
||||
{{ template "listControls" .HistoryNav }}
|
||||
{{ template "listNoMatch" .HistoryNav }}
|
||||
{{ else }}
|
||||
{{ template "emptyState" .NoHistory }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ template "listControls" .HistoryNav }}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm table-record align-middle">
|
||||
<thead>
|
||||
@@ -212,4 +248,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ template "listPager" .HistoryNav }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
{{ end }}
|
||||
{{ if gt (len .Usage) 0 }}
|
||||
<div class="table-responsive mt-2">
|
||||
{{/* list-scale exempt: detail-page table, one row per resource key this organization's deliveries carry */}}
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -258,13 +259,24 @@
|
||||
</div>
|
||||
|
||||
<!-- Members -->
|
||||
{{/* #members-panel: the m_ list's scoped swap target, section header
|
||||
included so the count follows the search. A failed read shows its
|
||||
notice in place of the list, never an empty state. */}}
|
||||
<div id="members-panel">
|
||||
{{ template "sectionHeader" .MembersHeader }}
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
{{ if not .MembersError.Empty }}
|
||||
{{ template "notice" .MembersError }}
|
||||
{{ if eq (len .Members) 0 }}
|
||||
{{ template "emptyState" .NoMembers }}
|
||||
{{ else if eq (len .Members) 0 }}
|
||||
{{ if .MembersNav.Filtered }}
|
||||
{{ template "listControls" .MembersNav }}
|
||||
{{ template "listNoMatch" .MembersNav }}
|
||||
{{ else }}
|
||||
{{ template "emptyState" .NoMembers }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ template "listControls" .MembersNav }}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm table-record">
|
||||
<thead>
|
||||
@@ -287,12 +299,11 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ if .MembersCapped }}
|
||||
<p class="text-muted small mb-0 mt-2">Showing the latest 16 of {{ .MembersTotal }}.</p>
|
||||
{{ end }}
|
||||
{{ template "listPager" .MembersNav }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Entitlement changes -->
|
||||
{{/* The composite's trail of entitlement set rule commits that moved this
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
(nav.ExtraInputs) rides along as hidden inputs
|
||||
because a GET form replaces the whole query string.
|
||||
listControls: listSearch + optional facet pills, rendered above
|
||||
the table (the standalone-page layout). Facet pills
|
||||
the table. Facet pills
|
||||
are links (one click to set, "All" to clear), the
|
||||
active pill marked.
|
||||
active pill marked; on an embedded list they are
|
||||
scoped requests like the tabs.
|
||||
listTabs: the nav-tabs rendering of FacetOptions, for embedded
|
||||
lists whose facet is a small set of modes (e.g. the
|
||||
grants ledger's Active/History). Unlike the pills
|
||||
@@ -27,7 +28,8 @@
|
||||
listNoMatch: the searched-or-filtered-to-nothing state, distinct
|
||||
from the list's true-empty state (which
|
||||
empty-state-guidance owns): names the term, links
|
||||
back to the bare list.
|
||||
back to the list with its own search and filters
|
||||
dropped and its siblings' state kept (ClearAllURL).
|
||||
|
||||
environmentNotice takes a server.EnvironmentNotice instead: the one
|
||||
muted line above a billing view that names the rows its Stripe
|
||||
@@ -37,7 +39,9 @@
|
||||
the four billing views because its markup and its switch are the
|
||||
same line four times over.
|
||||
|
||||
When nav.Target is set (embedded lists), every control issues a
|
||||
When nav.Target is set (embedded lists), every control (the tabs,
|
||||
the facet pills, the pager, the page-size links, the search's Clear
|
||||
and the no-match line's clear link) issues a
|
||||
scoped htmx request (hx-get with hx-target/hx-select on the panel's
|
||||
selector, outerHTML swap, URL pushed) so only that panel re-renders
|
||||
and the page never scrolls (scroll-into-view is opt-in in htmx; a
|
||||
@@ -61,9 +65,9 @@
|
||||
status pills is wider than a phone, and a flex item wider than the
|
||||
viewport widens the whole page (page-anatomy H7). */}}
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item"><a class="nav-link py-1 px-2 small {{ if not .Facet }}active{{ end }}" href="{{ .FacetURL "" }}">All</a></li>
|
||||
<li class="nav-item"><a class="nav-link py-1 px-2 small {{ if not .Facet }}active{{ end }}" href="{{ .FacetURL "" }}"{{ if $.Target }} hx-get="{{ .FacetURL "" }}" hx-target="{{ $.Target }}" hx-select="{{ $.Target }}"{{ if $.SyncSelect }} hx-select-oob="{{ $.SyncSelect }}"{{ end }} hx-swap="outerHTML" hx-push-url="true"{{ end }}>All</a></li>
|
||||
{{ range .FacetOptions }}
|
||||
<li class="nav-item"><a class="nav-link py-1 px-2 small {{ if $.FacetActive .Value }}active{{ end }}" href="{{ $.FacetURL .Value }}">{{ .Label }}</a></li>
|
||||
<li class="nav-item"><a class="nav-link py-1 px-2 small {{ if $.FacetActive .Value }}active{{ end }}" href="{{ $.FacetURL .Value }}"{{ if $.Target }} hx-get="{{ $.FacetURL .Value }}" hx-target="{{ $.Target }}" hx-select="{{ $.Target }}"{{ if $.SyncSelect }} hx-select-oob="{{ $.SyncSelect }}"{{ end }} hx-swap="outerHTML" hx-push-url="true"{{ end }}>{{ .Label }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
@@ -105,7 +109,7 @@
|
||||
{{ define "listNoMatch" }}
|
||||
<div class="text-center py-4">
|
||||
<p class="mb-1">No rows match{{ if .Q }} "{{ .Q }}"{{ end }}{{ if .Facet }}{{ if .Q }} with{{ else }} with{{ end }} the current filter{{ end }}.</p>
|
||||
<p class="small text-body-secondary mb-0"><a href="{{ .BasePath }}"{{ if .Target }} hx-get="{{ .BasePath }}" hx-target="{{ .Target }}" hx-select="{{ .Target }}"{{ if .SyncSelect }} hx-select-oob="{{ .SyncSelect }}"{{ end }} hx-swap="outerHTML" hx-push-url="true"{{ end }}>Clear search and filters</a></p>
|
||||
<p class="small text-body-secondary mb-0"><a href="{{ .ClearAllURL }}"{{ if .Target }} hx-get="{{ .ClearAllURL }}" hx-target="{{ .Target }}" hx-select="{{ .Target }}"{{ if .SyncSelect }} hx-select-oob="{{ .SyncSelect }}"{{ end }} hx-swap="outerHTML" hx-push-url="true"{{ end }}>Clear search and filters</a></p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
<button type="submit" class="{{ .CommitClasses }}"{{ with .CommitDescribedBy }} aria-describedby="{{ . }}"{{ end }}><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>{{ .Commit }}</button>
|
||||
{{ end }}
|
||||
{{ with .WayOut }}{{ if .Shown }}
|
||||
{{ if eq .Kind "link" }}{{ if .HXTarget }}<button type="button" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}" hx-get="{{ .URL }}" hx-target="{{ .HXTarget }}" hx-swap="{{ if .HXSwap }}{{ .HXSwap }}{{ else }}innerHTML{{ end }}">{{ .Label }}</button>{{ else }}<a href="{{ .URL }}" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}">{{ .Label }}</a>{{ end }}
|
||||
{{ if eq .Kind "link" }}{{ if .HXTarget }}{{ if .HXSelect }}<a href="{{ .URL }}" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}" hx-get="{{ .URL }}" hx-target="{{ .HXTarget }}" hx-select="{{ .HXSelect }}"{{ with .HXSelectOOB }} hx-select-oob="{{ . }}"{{ end }} hx-swap="{{ if .HXSwap }}{{ .HXSwap }}{{ else }}innerHTML{{ end }}"{{ if .HXPushURL }} hx-push-url="true"{{ end }}>{{ .Label }}</a>{{ else }}<button type="button" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}" hx-get="{{ .URL }}" hx-target="{{ .HXTarget }}"{{ with .HXSelectOOB }} hx-select-oob="{{ . }}"{{ end }} hx-swap="{{ if .HXSwap }}{{ .HXSwap }}{{ else }}innerHTML{{ end }}"{{ if .HXPushURL }} hx-push-url="true"{{ end }}>{{ .Label }}</button>{{ end }}{{ else }}<a href="{{ .URL }}" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}">{{ .Label }}</a>{{ end }}
|
||||
{{ else if eq .Kind "close-panel" }}<button type="button" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}" data-bs-toggle="collapse" data-bs-target="#{{ .PanelID }}">{{ .Label }}</button>
|
||||
{{ else if eq .Kind "dismiss-modal" }}<button type="button" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}" data-bs-dismiss="modal">{{ .Label }}</button>
|
||||
{{ else if eq .Kind "discard" }}<button type="button" class="btn btn-outline-secondary{{ if $.Dense }} btn-sm{{ end }}" hx-get="{{ .URL }}" hx-target="{{ $.Target }}" hx-select="{{ $.Target }}" hx-swap="outerHTML">{{ .Label }}</button>
|
||||
|
||||
@@ -438,6 +438,14 @@ type WayOut struct {
|
||||
// page's Cancel to its own list needs.
|
||||
HXTarget string
|
||||
HXSwap string
|
||||
// HXSelect, HXSelectOOB and HXPushURL complete a scoped request that
|
||||
// replaces a panel of a routable page: the response is the whole page, so
|
||||
// HXSelect names the part of it to swap in, HXSelectOOB the sibling parts
|
||||
// to refresh from the same response, and HXPushURL puts URL in the address
|
||||
// bar. Each renders only when set.
|
||||
HXSelect string
|
||||
HXSelectOOB string
|
||||
HXPushURL bool
|
||||
}
|
||||
|
||||
// LinkOut leaves the form by navigating, the create page's Cancel.
|
||||
@@ -846,3 +854,17 @@ func (s FormSpec) swap() string {
|
||||
}
|
||||
return "outerHTML"
|
||||
}
|
||||
|
||||
// PanelLinkOut leaves the form by a scoped htmx GET that replaces a panel of
|
||||
// a routable page, the way a governed list's own search does: the page the
|
||||
// URL returns is cut down to target (outerHTML), the panels named by
|
||||
// selectOOB, when any, are refreshed from it, and the URL goes into the
|
||||
// address bar. ScopedLinkOut is the way out for a partial route, which must
|
||||
// not be pushed.
|
||||
func PanelLinkOut(label, url, target, selectOOB string) WayOut {
|
||||
return WayOut{
|
||||
Kind: WayOutLink, Label: label, URL: url,
|
||||
HXTarget: target, HXSwap: "outerHTML",
|
||||
HXSelect: target, HXSelectOOB: selectOOB, HXPushURL: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,6 +482,10 @@ type WayOutView struct {
|
||||
PanelID string
|
||||
HXTarget string
|
||||
HXSwap string
|
||||
// HXSelect, HXSelectOOB and HXPushURL are WayOut's.
|
||||
HXSelect string
|
||||
HXSelectOOB string
|
||||
HXPushURL bool
|
||||
}
|
||||
|
||||
// CommitLinkView is a commit that is a link out of the console
|
||||
|
||||
@@ -327,7 +327,10 @@ func checkPlacementWrite(t *testing.T, fixture placementFixture, row placementWr
|
||||
t.Errorf("site count = %d, want %d", count, wantCount)
|
||||
}
|
||||
if row.operator {
|
||||
placements, err := domains.New(database).ListAllPlacementsForOperator(t.Context())
|
||||
placements, err := domains.New(database).ListPlacementsForOperatorPage(t.Context(), domains.ListPlacementsForOperatorPageParams{
|
||||
Q: sql.NullString{String: name, Valid: true},
|
||||
PageLimit: 50,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
+87
-25
@@ -57,9 +57,9 @@ var (
|
||||
rawFormTagRe = regexp.MustCompile(`<form[\s>]`)
|
||||
rawFormClassRe = regexp.MustCompile(`\bform-(label|control|select|check-input)\b`)
|
||||
formPartRe = regexp.MustCompile(`template\s+"form"`)
|
||||
// rawTableRe and listControlsCallRe implement table-without-list-controls
|
||||
// (spec ui-quality-gate "Lint refuses an unpaged body table", design D5,
|
||||
// modelled on the raw-form-part pairing above): the governed-list
|
||||
// rawTableRe and listPagerCallRe implement table-without-list-controls
|
||||
// (spec ui-quality-gate "Lint refuses an unpaged body table", design D5
|
||||
// and D9, modelled on the raw-form-part pairing above): the governed-list
|
||||
// contract (spec operator-list-scale) is an enumeration of which lists
|
||||
// must paginate, not something the renderer checks structurally, so a
|
||||
// new runtime list could ship as a bare <table> and never be paged. The
|
||||
@@ -67,8 +67,14 @@ var (
|
||||
// reviewed beside the table it exempts, which is why
|
||||
// anatomy_allowlist.txt stays empty for this rule (ui-quality-gate "The
|
||||
// anatomy allowlist is empty").
|
||||
rawTableRe = regexp.MustCompile(`<table[\s>]`)
|
||||
listControlsCallRe = regexp.MustCompile(`template\s+"(listControls|listPager)"`)
|
||||
rawTableRe = regexp.MustCompile(`<table[\s>]`)
|
||||
listPagerCallRe = regexp.MustCompile(`template\s+"listPager"`)
|
||||
// commentRe matches a template comment or an HTML comment, the longest
|
||||
// leftmost one first; listScaleMarkerRe matches a template comment that
|
||||
// is an exemption marker with a reason (anything but the comment's own
|
||||
// closing) after the colon.
|
||||
commentRe = regexp.MustCompile(`(?s)\{\{-?\s*/\*.*?\*/\s*-?\}\}|<!--.*?-->`)
|
||||
listScaleMarkerRe = regexp.MustCompile(`^\{\{-?\s*/\*\s*list-scale exempt:\s*(?:[^\s*]|\*[^/])`)
|
||||
// buttonTagRe and disabledTokenRe implement disabled-outside-part (spec
|
||||
// ui-quality-gate "Lint refuses a hand-rolled disabled control", design
|
||||
// D6): the button tag itself may span several source lines (a template
|
||||
@@ -379,13 +385,9 @@ type templateFacts struct {
|
||||
// rendersFormPart is true when the template renders a form region
|
||||
// through the part, {{ template "form" ... }}.
|
||||
rendersFormPart bool
|
||||
// isPageBody, hasListControls and hasListScaleExempt scope
|
||||
// table-without-list-controls (spec ui-quality-gate, design D5): a
|
||||
// whole-file presence check, like rendersFormPart, so a table wrapped
|
||||
// in listControls/listPager anywhere in the file passes, and the marker
|
||||
// is likewise a whole-file check because it is reviewed beside the
|
||||
// table rather than parsed for position.
|
||||
isPageBody, hasListControls, hasListScaleExempt bool
|
||||
// isPageBody scopes table-without-list-controls to the templates a
|
||||
// handler renders as a page (spec ui-quality-gate, design D5).
|
||||
isPageBody bool
|
||||
}
|
||||
|
||||
// lineRule is one per-line anatomy rule: it fires on a line its pattern
|
||||
@@ -419,8 +421,6 @@ var lineRules = []lineRule{
|
||||
msg: `renders a form region without the form part; every form on either surface is one declaration rendered by ui_form.html (spec form-library, page-anatomy "Every page is built from the shared parts")`},
|
||||
{rule: "raw-form-control", re: rawFormClassRe, when: notFormPart,
|
||||
msg: `composes a form label or control outside the form part; declare the field on the form's forms.FormSpec and let ui_form_field.html render it (spec form-library)`},
|
||||
{rule: "table-without-list-controls", re: rawTableRe, when: unpagedPageBody,
|
||||
msg: `renders a <table> without the shared list controls; wrap it in {{ template "listControls" }} and {{ template "listPager" }} (spec operator-list-scale), or mark it {{/* list-scale exempt: <reason> */}} if it is a curated configuration list or a detail-page table (spec ui-quality-gate, design D5)`},
|
||||
{rule: "raw-page-title", re: rawH1Re, exempt: []string{partPageHeader},
|
||||
msg: `renders an <h1> outside the pageHeader part; build a server.PageHeader and {{ template "pageHeader" ... }} (design-system.md §6)`},
|
||||
{rule: "raw-section-title", re: rawH2Re, exempt: []string{partSectionHeader, confirmModal},
|
||||
@@ -441,10 +441,6 @@ var lineRules = []lineRule{
|
||||
|
||||
func notFormPart(f templateFacts) bool { return !f.isFormPart }
|
||||
|
||||
func unpagedPageBody(f templateFacts) bool {
|
||||
return f.isPageBody && !f.hasListControls && !f.hasListScaleExempt
|
||||
}
|
||||
|
||||
// mutedWithinThreeLines reports whether text-muted or text-body-secondary
|
||||
// appears on line i or the two lines after it: a centered block is an empty
|
||||
// state only when muted text appears that close.
|
||||
@@ -464,16 +460,17 @@ func anatomyViolations(path, src string, isPageBody bool) []Violation {
|
||||
}
|
||||
base := filepath.Base(path)
|
||||
f := templateFacts{
|
||||
base: base,
|
||||
lines: strings.Split(src, "\n"),
|
||||
isFormPart: base == partForm || base == partFormField,
|
||||
rendersFormPart: formPartRe.MatchString(src),
|
||||
isPageBody: isPageBody,
|
||||
hasListControls: listControlsCallRe.MatchString(src),
|
||||
hasListScaleExempt: strings.Contains(src, "list-scale exempt:"),
|
||||
base: base,
|
||||
lines: strings.Split(src, "\n"),
|
||||
isFormPart: base == partForm || base == partFormField,
|
||||
rendersFormPart: formPartRe.MatchString(src),
|
||||
isPageBody: isPageBody,
|
||||
}
|
||||
disabledOutsidePart(f, src, add)
|
||||
actionsColumn(src, add)
|
||||
if isPageBody {
|
||||
tablesWithoutListControls(src, add)
|
||||
}
|
||||
for i := range f.lines {
|
||||
for _, r := range lineRules {
|
||||
if r.fires(f, i) {
|
||||
@@ -485,6 +482,71 @@ func anatomyViolations(path, src string, isPageBody bool) []Violation {
|
||||
return v
|
||||
}
|
||||
|
||||
// tablesWithoutListControls applies table-without-list-controls (spec
|
||||
// ui-quality-gate "Lint refuses an unpaged body table", design D5 and D9) to
|
||||
// one page body: every <table> needs a listPager call after its opening and
|
||||
// before the next table's opening (or the end of the template), or a
|
||||
// "list-scale exempt:" marker after the previous table's opening (or the
|
||||
// start of the template) and before its own. Paging is what the rule checks;
|
||||
// search and filters stay operator-list-scale's requirements. Position stands
|
||||
// in for a parse of the template's branches, because a list's pager follows
|
||||
// its table in every governed template; a marker therefore covers the one
|
||||
// table it precedes, and a pager after the last table cannot lend itself to
|
||||
// the tables before it.
|
||||
//
|
||||
// Tables and pager calls are found in a copy of the source with every
|
||||
// template comment and HTML comment blanked, so a <table> or a listPager
|
||||
// named in a comment counts for nothing; the blanking keeps every newline,
|
||||
// so line numbers do not move. A marker counts only as a template comment
|
||||
// ({{/* list-scale exempt: reason */}}) with a reason after the colon: an
|
||||
// HTML comment ships to every browser, and a marker with no reason says
|
||||
// nothing a reviewer can weigh.
|
||||
func tablesWithoutListControls(src string, add func(line int, rule, msg string)) {
|
||||
blanked, markers := blankComments(src)
|
||||
tables := rawTableRe.FindAllStringIndex(blanked, -1)
|
||||
for i, table := range tables {
|
||||
before, after := 0, len(blanked)
|
||||
if i > 0 {
|
||||
before = tables[i-1][0]
|
||||
}
|
||||
if i+1 < len(tables) {
|
||||
after = tables[i+1][0]
|
||||
}
|
||||
exempt := false
|
||||
for _, m := range markers {
|
||||
if m >= before && m < table[0] {
|
||||
exempt = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if exempt || listPagerCallRe.MatchString(blanked[table[0]:after]) {
|
||||
continue
|
||||
}
|
||||
add(lineAt(src, table[0]), "table-without-list-controls", `renders a <table> without its own pager; follow it with {{ template "listPager" }} (spec operator-list-scale), or put {{/* list-scale exempt: <reason> */}} before it if it is a curated configuration list or a detail-page table; the marker covers the one table it precedes (spec ui-quality-gate, design D5)`)
|
||||
}
|
||||
}
|
||||
|
||||
// blankComments returns src with every template comment and HTML comment
|
||||
// replaced by spaces of the same length (newlines kept), and the offsets of
|
||||
// the template comments that are list-scale exemption markers with a reason.
|
||||
// Comments are found left to right in one pass, so a template comment inside
|
||||
// an HTML comment is part of the HTML comment and never a marker.
|
||||
func blankComments(src string) (string, []int) {
|
||||
var markers []int
|
||||
out := []byte(src)
|
||||
for _, loc := range commentRe.FindAllStringIndex(src, -1) {
|
||||
if listScaleMarkerRe.MatchString(src[loc[0]:loc[1]]) {
|
||||
markers = append(markers, loc[0])
|
||||
}
|
||||
for i := loc[0]; i < loc[1]; i++ {
|
||||
if out[i] != '\n' {
|
||||
out[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(out), markers
|
||||
}
|
||||
|
||||
// disabledOutsidePart applies disabled-outside-part (spec ui-quality-gate
|
||||
// "Lint refuses a hand-rolled disabled control", design D6): a disabled
|
||||
// <button> outside the part has no reason in the DOM, no aria-describedby
|
||||
|
||||
@@ -6,6 +6,7 @@ package lint
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -438,6 +439,63 @@ func TestTableWithoutListControlsFires(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestTableWithoutListControlsChecksEachTable pins ui-quality-gate "Lint
|
||||
// refuses an unpaged body table" (design D9): the rule asks each table of a
|
||||
// page body for its own pager, or for a marker between the previous table
|
||||
// and itself, so one paged list cannot lend its pager to a table beside it.
|
||||
func TestTableWithoutListControlsChecksEachTable(t *testing.T) {
|
||||
const table = `<table class="table"><tr><td>row</td></tr></table>`
|
||||
const pager = `{{ template "listPager" .Nav }}`
|
||||
const marker = `{{/* list-scale exempt: curated configuration list */}}`
|
||||
cases := []struct {
|
||||
name string
|
||||
src string
|
||||
isPage bool
|
||||
wantLines []int
|
||||
}{
|
||||
{"a lone paged table passes", table + "\n" + pager, true, nil},
|
||||
{"a second table after the first's pager is reported, the first is not", table + "\n" + pager + "\n" + table, true, []int{3}},
|
||||
{"one marker before the first of two tables reports the second", marker + "\n" + table + "\n" + table, true, []int{3}},
|
||||
{"a marker before each of two tables passes", marker + "\n" + table + "\n" + marker + "\n" + table, true, nil},
|
||||
{"a pager before the first table reports both tables", pager + "\n" + table + "\n" + table, true, []int{2, 3}},
|
||||
{"a marker in an HTML comment is not a marker", "<!-- list-scale exempt: curated configuration list -->\n" + table, true, []int{2}},
|
||||
{"a marker with no reason is not a marker", `{{/* list-scale exempt: */}}` + "\n" + table, true, []int{2}},
|
||||
{"a marker nested in an HTML comment is not a marker", "<!-- " + marker + " -->\n" + table, true, []int{2}},
|
||||
{"a marker in a template comment with a reason passes", `{{- /* list-scale exempt: detail page */ -}}` + "\n" + table, true, nil},
|
||||
{"a pager quoted in a comment lends no pass", table + "\n" + `{{/* page it with {{ template "listPager" .Nav }} when it grows */}}`, true, []int{1}},
|
||||
{"a pager quoted in an HTML comment lends no pass", table + "\n" + `<!-- {{ template "listPager" .Nav }} -->`, true, []int{1}},
|
||||
{"a table named in a comment before a real pager does not end the table's span", table + "\n" + `{{/* the <table> above is paged below */}}` + "\n" + pager, true, nil},
|
||||
{"a table named in an HTML comment is not a table", `<!-- <table class="table"> -->` + "\n" + table + "\n" + pager, true, nil},
|
||||
{"a partial that is no page body is not examined", table + "\n" + table, false, nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
path := filepath.Join(dir, "partials", "operator_tables.html")
|
||||
writeFile(t, path, `{{ template "pageHeader" .Header }}`+"\n"+c.src)
|
||||
pages := map[string]struct{}{}
|
||||
if c.isPage {
|
||||
pages[filepath.Base(path)] = struct{}{}
|
||||
}
|
||||
vs, _ := ruleAnatomy([]string{dir}, "", pages)
|
||||
var got []int
|
||||
for _, v := range vs {
|
||||
if v.Rule == "table-without-list-controls" {
|
||||
got = append(got, v.Line)
|
||||
}
|
||||
}
|
||||
// The page header takes line 1, so the case's lines shift by one.
|
||||
var want []int
|
||||
for _, l := range c.wantLines {
|
||||
want = append(want, l+1)
|
||||
}
|
||||
if !slices.Equal(got, want) {
|
||||
t.Errorf("table-without-list-controls lines = %v, want %v", got, want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// TestDisabledOutsidePartFires pins ui-quality-gate "Lint refuses a
|
||||
// hand-rolled disabled control" (design D6): a bare disabled <button>
|
||||
// fails outside the part (including one whose disabled attribute sits on
|
||||
|
||||
+2
-1
@@ -33,7 +33,8 @@ templates/partials/operator_handbuilt.html:1: [form-without-part] renders a form
|
||||
templates/partials/operator_handbuilt.html:2: [raw-form-control] composes a form label or control outside the form part; declare the field on the form's forms.FormSpec and let ui_form_field.html render it (spec form-library)
|
||||
templates/partials/operator_handbuilt.html:3: [raw-form-control] composes a form label or control outside the form part; declare the field on the form's forms.FormSpec and let ui_form_field.html render it (spec form-library)
|
||||
templates/partials/operator_mixed.html:2: [raw-form-control] writes a <form> tag outside the form part; declare the form as a forms.FormSpec beside its handler and render it with {{ template "form" .Form }} (spec form-library)
|
||||
templates/partials/operator_page_bare.html:2: [table-without-list-controls] renders a <table> without the shared list controls; wrap it in {{ template "listControls" }} and {{ template "listPager" }} (spec operator-list-scale), or mark it {{/* list-scale exempt: <reason> */}} if it is a curated configuration list or a detail-page table (spec ui-quality-gate, design D5)
|
||||
templates/partials/operator_page_bare.html:2: [table-without-list-controls] renders a <table> without its own pager; follow it with {{ template "listPager" }} (spec operator-list-scale), or put {{/* list-scale exempt: <reason> */}} before it if it is a curated configuration list or a detail-page table; the marker covers the one table it precedes (spec ui-quality-gate, design D5)
|
||||
templates/partials/operator_page_listed.html:3: [table-without-list-controls] renders a <table> without its own pager; follow it with {{ template "listPager" }} (spec operator-list-scale), or put {{/* list-scale exempt: <reason> */}} before it if it is a curated configuration list or a detail-page table; the marker covers the one table it precedes (spec ui-quality-gate, design D5)
|
||||
templates/partials/operator_page_untitled.html:1: [page-without-header] renders as a page but does not render the pageHeader part; every page is titled through it, with the location trail above the title and outside any box (page-anatomy "One title size and one header layout")
|
||||
== go copy
|
||||
server/handler.go:5: [em-dash-copy] UI copy uses an em dash; write it as a semicolon, colon, or comma (the lone empty-value marker is exempt)
|
||||
|
||||
@@ -78,8 +78,8 @@ var verdictTemplates = map[string]string{
|
||||
</button>
|
||||
<button class="btn" hx-disabled-elt="this">Five</button>
|
||||
<select><option disabled>Six</option></select>`,
|
||||
// Tables on pages: bare, beside the list controls, marked, and a
|
||||
// fragment no handler renders as a page.
|
||||
// Tables on pages: bare, with list controls but no pager (fails), paged,
|
||||
// marked, and a fragment no handler renders as a page.
|
||||
"partials/operator_page_bare.html": `{{ template "pageHeader" .Header }}
|
||||
<table class="table"><tr><td>row</td></tr></table>`,
|
||||
"partials/operator_page_listed.html": `{{ template "pageHeader" .Header }}
|
||||
|
||||
@@ -99,8 +99,7 @@ JOIN core.persons p ON p.person_id = om.person_id
|
||||
JOIN core.roles r ON r.role_id = om.role_id
|
||||
WHERE om.org_id = $1
|
||||
AND om.status = 'active'
|
||||
ORDER BY p.display_name ASC
|
||||
LIMIT 200
|
||||
ORDER BY om.joined_at DESC, om.person_id ASC
|
||||
`
|
||||
|
||||
type ListActiveMembersByOrgIDRow struct {
|
||||
@@ -114,8 +113,11 @@ type ListActiveMembersByOrgIDRow struct {
|
||||
}
|
||||
|
||||
// Operator composite's Members section. Active members only (status='active',
|
||||
// excluding removed/historical rows). Defensive LIMIT 200 per design D5;
|
||||
// pagination is YAGNI until a real org pushes 50+ members.
|
||||
// excluding removed/historical rows). Unbounded: the section searches and
|
||||
// pages the whole set Go-side, so a LIMIT here would make its stated total
|
||||
// the cap rather than the member count. Most recently joined first; the person
|
||||
// id (unique within an organization) breaks a tie, so the order is total and
|
||||
// each member lands on exactly one page.
|
||||
func (q *Queries) ListActiveMembersByOrgID(ctx context.Context, orgID string) ([]ListActiveMembersByOrgIDRow, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listActiveMembersByOrgID, orgID)
|
||||
if err != nil {
|
||||
|
||||
@@ -88,8 +88,11 @@ type Querier interface {
|
||||
GetWorkspaceByID(ctx context.Context, workspaceID string) (Workspace, error)
|
||||
GetWorkspacesByOrgID(ctx context.Context, orgID string) ([]Workspace, error)
|
||||
// Operator composite's Members section. Active members only (status='active',
|
||||
// excluding removed/historical rows). Defensive LIMIT 200 per design D5;
|
||||
// pagination is YAGNI until a real org pushes 50+ members.
|
||||
// excluding removed/historical rows). Unbounded: the section searches and
|
||||
// pages the whole set Go-side, so a LIMIT here would make its stated total
|
||||
// the cap rather than the member count. Most recently joined first; the person
|
||||
// id (unique within an organization) breaks a tie, so the order is total and
|
||||
// each member lands on exactly one page.
|
||||
ListActiveMembersByOrgID(ctx context.Context, orgID string) ([]ListActiveMembersByOrgIDRow, error)
|
||||
// Person-detail "Org memberships" section. Returns each org the person
|
||||
// belongs to (active memberships only) with the org's display fields and
|
||||
|
||||
@@ -17,8 +17,11 @@ GROUP BY om.org_id;
|
||||
|
||||
-- name: ListActiveMembersByOrgID :many
|
||||
-- Operator composite's Members section. Active members only (status='active',
|
||||
-- excluding removed/historical rows). Defensive LIMIT 200 per design D5;
|
||||
-- pagination is YAGNI until a real org pushes 50+ members.
|
||||
-- excluding removed/historical rows). Unbounded: the section searches and
|
||||
-- pages the whole set Go-side, so a LIMIT here would make its stated total
|
||||
-- the cap rather than the member count. Most recently joined first; the person
|
||||
-- id (unique within an organization) breaks a tie, so the order is total and
|
||||
-- each member lands on exactly one page.
|
||||
SELECT
|
||||
om.org_member_id,
|
||||
om.person_id,
|
||||
@@ -32,8 +35,7 @@ JOIN core.persons p ON p.person_id = om.person_id
|
||||
JOIN core.roles r ON r.role_id = om.role_id
|
||||
WHERE om.org_id = $1
|
||||
AND om.status = 'active'
|
||||
ORDER BY p.display_name ASC
|
||||
LIMIT 200;
|
||||
ORDER BY om.joined_at DESC, om.person_id ASC;
|
||||
|
||||
-- name: ListActiveMembershipsByPersonID :many
|
||||
-- Person-detail "Org memberships" section. Returns each org the person
|
||||
|
||||
@@ -668,7 +668,8 @@ func (OrgEnrollmentData) GrantsHeader() SectionHeader {
|
||||
return SectionHeader{Title: "Grants"}
|
||||
}
|
||||
|
||||
// MembersHeader carries the true total; the table itself is capped.
|
||||
// MembersHeader carries the true total for the current search; the table
|
||||
// shows one page of it.
|
||||
func (d OrgEnrollmentData) MembersHeader() SectionHeader {
|
||||
h := SectionHeader{Title: "Members"}
|
||||
if d.MembersTotal > 0 {
|
||||
|
||||
@@ -205,9 +205,14 @@ type ListNav struct {
|
||||
PerPage int
|
||||
DefaultPerPage int
|
||||
PerPageOptions []int
|
||||
// SearchLabel is the search input's visually hidden label; empty means
|
||||
// "Search this list". A page with several searches names each one, so a
|
||||
// screen reader does not announce several identical fields.
|
||||
SearchLabel string
|
||||
// Target is the CSS selector of the panel wrapping an EMBEDDED list.
|
||||
// When set, every control the shared defines emit (tab, pager,
|
||||
// page-size and clear links, and the search form) issues a scoped
|
||||
// When set, every control the shared defines emit (tab, facet pill,
|
||||
// pager, page-size link, the search's Clear, the no-match line's clear
|
||||
// link built by ClearAllURL, and the search form) issues a scoped
|
||||
// htmx request — hx-get with hx-target/hx-select on this selector,
|
||||
// outerHTML swap, URL pushed — so only the panel re-renders and the
|
||||
// operator's scroll position is untouched (maintainer 2026-08-24:
|
||||
@@ -357,6 +362,12 @@ func (n ListNav) FacetURL(value string) string { return n.url(n.Q, value, 1, n.P
|
||||
// ClearSearchURL drops the search term, preserving the facet and size.
|
||||
func (n ListNav) ClearSearchURL() string { return n.url("", n.Facet, 1, n.PerPage) }
|
||||
|
||||
// ClearAllURL drops the list's own search, facet, page and size, and keeps
|
||||
// Extra, so clearing one list leaves the page's other state (a sibling list's
|
||||
// search, a billing view's environment) where it was. A list with no Extra
|
||||
// clears to the bare base path.
|
||||
func (n ListNav) ClearAllURL() string { return n.url("", "", 1, 0) }
|
||||
|
||||
// PerPageURL switches the page size, preserving search and facet and
|
||||
// resetting to page 1 (a size change re-windows the whole set).
|
||||
func (n ListNav) PerPageURL(v int) string { return n.url(n.Q, n.Facet, 1, v) }
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"maps"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"git.coopcloud.tech/wiki-cafe/member-console/internal/forms"
|
||||
)
|
||||
@@ -60,10 +61,14 @@ func listSearchForm(n ListNav) forms.FormView {
|
||||
spec := listControlsForm
|
||||
spec.Path = n.BasePath
|
||||
spec.Target = n.Target
|
||||
searchLabel := n.SearchLabel
|
||||
if searchLabel == "" {
|
||||
searchLabel = "Search this list"
|
||||
}
|
||||
spec.Fields = []forms.Field{
|
||||
{
|
||||
Name: n.QParam(),
|
||||
Label: "Search this list",
|
||||
Label: searchLabel,
|
||||
HideLabel: true,
|
||||
Control: forms.Text,
|
||||
Optional: true,
|
||||
@@ -87,10 +92,12 @@ func listSearchForm(n ListNav) forms.FormView {
|
||||
spec.Fields = append(spec.Fields, forms.Field{Name: n.PerParam(), Label: "Page size", Control: forms.Hidden, Optional: true})
|
||||
}
|
||||
if n.Q != "" {
|
||||
spec.WayOut = forms.ScopedLinkOut("Clear", n.ClearSearchURL(), n.Target)
|
||||
// An embedded list's Clear is the same scoped request the search
|
||||
// itself is: it selects the list's panel, refreshes the siblings and
|
||||
// pushes the URL. A standalone list's is an ordinary boosted
|
||||
// navigation.
|
||||
spec.WayOut = forms.PanelLinkOut("Clear", n.ClearSearchURL(), n.Target, n.SyncSelect)
|
||||
if n.Target == "" {
|
||||
// A standalone list's Clear is an ordinary boosted navigation,
|
||||
// the same as the search itself.
|
||||
spec.WayOut = forms.LinkOut("Clear", n.ClearSearchURL())
|
||||
}
|
||||
}
|
||||
@@ -109,7 +116,9 @@ func listSearchForm(n ListNav) forms.FormView {
|
||||
values.Set(n.PerParam(), strconv.Itoa(n.EffectivePerPage()))
|
||||
}
|
||||
|
||||
b := forms.Binding{Mode: forms.ModeRecord, Values: values}
|
||||
// Instance gives each list's search its own element ids when a page
|
||||
// renders several; an unprefixed list keeps the default ids.
|
||||
b := forms.Binding{Mode: forms.ModeRecord, Values: values, Instance: strings.TrimSuffix(n.ParamPrefix, "_")}
|
||||
if n.Target != "" {
|
||||
b.HXSelect = n.Target
|
||||
if n.SyncSelect != "" {
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"errors"
|
||||
"math"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -110,6 +111,19 @@ func TestListNavMathAndURLs(t *testing.T) {
|
||||
if got := n.ClearSearchURL(); got != "/operator/grants?state=live" {
|
||||
t.Errorf("ClearSearchURL = %q", got)
|
||||
}
|
||||
// ClearAllURL drops this list's own search, facet, page and size, and
|
||||
// keeps what the page holds besides: a sibling list's state, the billing
|
||||
// views' environment. With nothing else it is the bare base path.
|
||||
if got := n.ClearAllURL(); got != "/operator/grants" {
|
||||
t.Errorf("ClearAllURL = %q, want the bare base path", got)
|
||||
}
|
||||
embedded := ListNav{
|
||||
BasePath: "/operator/domains", FacetParam: "p_state", ParamPrefix: "p_", Q: "x", Facet: "servable", Page: 3, PerPage: 25, DefaultPerPage: 10,
|
||||
Extra: url.Values{"h_q": {"y"}, "q": {"z"}, "p_q": {"stale"}, "p_state": {"stale"}},
|
||||
}
|
||||
if got := embedded.ClearAllURL(); got != "/operator/domains?h_q=y&q=z" {
|
||||
t.Errorf("ClearAllURL with siblings = %q, want the siblings' state kept and this list's dropped", got)
|
||||
}
|
||||
|
||||
empty := ListNav{BasePath: "/operator/persons", Total: 0, Page: 1}
|
||||
if empty.Pages() != 1 || empty.From() != 0 || empty.To() != 0 || empty.Showing() != "" {
|
||||
|
||||
@@ -102,12 +102,14 @@ func TestPagesUseTheParts(t *testing.T) {
|
||||
name: "domains", template: "operator_domains.html",
|
||||
data: OperatorDomainsData{
|
||||
Claims: []OperatorDomainClaimRow{{ClaimID: "c1", Root: "a.example", Kind: domains.KindExternal, Status: domains.StatusPending, OrgID: "o1", OrgName: "Org", Evidence: true, Releasable: true}},
|
||||
Placements: []OperatorPlacementRow{{Name: "a.example", Provider: "fedwiki", ResourceRef: "site-1", Servable: true}},
|
||||
Placements: []OperatorPlacementRow{{Name: "a.example", OrgID: "o1", OrgName: "Org", Provider: "fedwiki", ResourceRef: "site-1", Servable: true}},
|
||||
TerminalClaims: []OperatorTerminalClaimRow{{Root: "b.example", Kind: domains.KindOperatorRoot, Status: domains.StatusExpired, Evidence: true}},
|
||||
Policy: OperatorDomainPolicyView{ClaimWindow: "72h"},
|
||||
// The header count is the governed list's true total now
|
||||
// (operator-list-scale), not len(Claims).
|
||||
Nav: ListNav{BasePath: "/operator/domains", Total: 1},
|
||||
// Each header count is its governed list's true total
|
||||
// (operator-list-scale), not the rows rendered.
|
||||
Nav: ListNav{BasePath: "/operator/domains", Total: 1},
|
||||
PlacementsNav: ListNav{BasePath: "/operator/domains", Total: 1, ParamPrefix: "p_"},
|
||||
HistoryNav: ListNav{BasePath: "/operator/domains", Total: 1, ParamPrefix: "h_"},
|
||||
},
|
||||
want: []string{
|
||||
`<h1 class="h2 mb-0">Domains</h1>`, `>1 live claim</span>`,
|
||||
|
||||
@@ -77,7 +77,11 @@ type OperatorDomainPolicyView struct {
|
||||
// separate from the claims table above it: it answers "what actually
|
||||
// serves", not "who holds what".
|
||||
type OperatorPlacementRow struct {
|
||||
Name string
|
||||
Name string
|
||||
// OrgID and OrgName are the organization that holds the claim this name
|
||||
// is placed under, the second field the placements search matches.
|
||||
OrgID string
|
||||
OrgName string
|
||||
Provider string
|
||||
ResourceRef string
|
||||
// Servable is kept in sync from the provider resource's own state (an
|
||||
@@ -113,12 +117,24 @@ type OperatorDomainsData struct {
|
||||
TerminalClaims []OperatorTerminalClaimRow
|
||||
Placements []OperatorPlacementRow
|
||||
Policy OperatorDomainPolicyView
|
||||
// Nav governs the live-claims table only (operator-list-scale: search,
|
||||
// the status facet, and true-total pagination). Placements and history
|
||||
// stay unpaged on the same URL; if they ever page they take
|
||||
// ParseListParamsNS prefixes so the three cannot collide (design D4).
|
||||
Nav ListNav
|
||||
Error notice.Notice
|
||||
// Nav governs the live-claims table, PlacementsNav the placements and
|
||||
// HistoryNav the claim history (operator-list-scale: search, a status
|
||||
// facet, and true-total pagination each). The three share one URL: the
|
||||
// live claims keep the unprefixed q, status and page, placements take
|
||||
// p_ and history h_, so the three cannot collide. The live claims
|
||||
// navigate the page, which refreshes the header's count with their
|
||||
// search; placements and history are embedded lists that swap their own
|
||||
// panels and refresh the other two out of band.
|
||||
Nav ListNav
|
||||
PlacementsNav ListNav
|
||||
HistoryNav ListNav
|
||||
// Error carries the missing registry and the force-release answers.
|
||||
// Each list's failed read sets its own notice, shown inside its panel,
|
||||
// so a scoped swap never turns a failed read into an empty list.
|
||||
Error notice.Notice
|
||||
ClaimsError notice.Notice
|
||||
PlacementsError notice.Notice
|
||||
HistoryError notice.Notice
|
||||
}
|
||||
|
||||
// domainClaimFacets is the live claim vocabulary — exactly the two statuses
|
||||
@@ -129,6 +145,20 @@ var domainClaimFacets = []FacetOption{
|
||||
{Value: "active", Label: "Active"},
|
||||
}
|
||||
|
||||
// placementStateFacets and historyStatusFacets are the vocabularies of the
|
||||
// placements' and the history's filters: the words the State and Status
|
||||
// badges already show.
|
||||
var placementStateFacets = []FacetOption{
|
||||
{Value: "servable", Label: "Servable"},
|
||||
{Value: "unservable", Label: "Unservable"},
|
||||
}
|
||||
|
||||
var historyStatusFacets = []FacetOption{
|
||||
{Value: "expired", Label: "Expired"},
|
||||
{Value: "canceled", Label: "Canceled"},
|
||||
{Value: "released", Label: "Released"},
|
||||
}
|
||||
|
||||
// Page anatomy: the page data and its rows build the shared parts' values
|
||||
// here, so the template never composes a title, a badge class, or an empty
|
||||
// state (docs/design-system.md §6). Statuses use the registry's own
|
||||
@@ -137,13 +167,17 @@ var domainClaimFacets = []FacetOption{
|
||||
|
||||
// Header is the page header with the live-claim count in its slot.
|
||||
func (d OperatorDomainsData) Header() PageHeader {
|
||||
return PageHeader{
|
||||
h := PageHeader{
|
||||
Title: "Domains",
|
||||
Lead: "Every live claim in this deployment, and the names being served.",
|
||||
// The true total for the current search and filter, never the
|
||||
// page's row count (operator-list-scale).
|
||||
Count: countLabel(int(d.Nav.Total), "live claim", "live claims"),
|
||||
}
|
||||
// The true total for the current search and filter, never the page's
|
||||
// row count (operator-list-scale). A failed read produced no total, so
|
||||
// its header states none.
|
||||
if d.ClaimsError.Empty() {
|
||||
h.Count = countLabel(int(d.Nav.Total), "live claim", "live claims")
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
||||
// PolicyHeader titles the effective-claim-policy disclosure.
|
||||
@@ -153,12 +187,20 @@ func (OperatorDomainsData) PolicyHeader() SectionHeader {
|
||||
|
||||
// PlacementsHeader titles the placements section with its count.
|
||||
func (d OperatorDomainsData) PlacementsHeader() SectionHeader {
|
||||
return SectionHeader{Title: "Placements", Count: countLabel(len(d.Placements), "served name", "served names")}
|
||||
h := SectionHeader{Title: "Placements"}
|
||||
if d.PlacementsError.Empty() {
|
||||
h.Count = countLabel(int(d.PlacementsNav.Total), "served name", "served names")
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
||||
// HistoryHeader titles the claim-history section with its count.
|
||||
func (d OperatorDomainsData) HistoryHeader() SectionHeader {
|
||||
return SectionHeader{Title: "Claim history", Count: countLabel(len(d.TerminalClaims), "terminal claim", "terminal claims")}
|
||||
h := SectionHeader{Title: "Claim history"}
|
||||
if d.HistoryError.Empty() {
|
||||
h.Count = countLabel(int(d.HistoryNav.Total), "terminal claim", "terminal claims")
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
||||
// NoClaims, NoPlacements, and NoHistory are the three empty states.
|
||||
@@ -280,19 +322,22 @@ func domainTerminalOutcome(kind string, evidenceAt, abandonedAt, systemCanceledA
|
||||
}
|
||||
}
|
||||
|
||||
// loadDomainsPageData reads one page of the deployment's live claims plus the
|
||||
// effective policy, the placements, and the claim history. A read failure
|
||||
// yields the banner rather than an empty table, so "no claims" never silently
|
||||
// means "the query broke".
|
||||
// loadDomainsPageData reads the effective policy and one page of each of the
|
||||
// page's three lists: the deployment's live claims, its placements, and its
|
||||
// claim history. The three reads are independent: a failed read logs and sets
|
||||
// its own notice, shown inside its panel, and leaves its list empty, so "no
|
||||
// rows" never silently means "the query broke" and one failure hides nothing
|
||||
// else.
|
||||
//
|
||||
// The live-claims table is the governed list (operator-list-scale, design
|
||||
// D4): its search, status facet, and page come off the request. The
|
||||
// force-release re-render reads the same parameters from the POST it
|
||||
// answers, which carries none, so a moderated claim leaves an unfiltered
|
||||
// first page -- the list the operator is left looking at is current either
|
||||
// way. The other three sections are unpaged and read the request not at all.
|
||||
// All three lists are governed (operator-list-scale). The live claims read
|
||||
// the unprefixed q, status and page and keep their 50-row page; placements
|
||||
// read p_q, p_state, p_page and p_per, and history h_q, h_status, h_page and
|
||||
// h_per, ten rows by default. Each nav carries the other two lists' state in
|
||||
// every link it builds. The force-release re-render reads these parameters
|
||||
// from the POST it answers, which carries none, so a moderated claim leaves
|
||||
// all three lists on their unfiltered first page -- the lists the operator is
|
||||
// left looking at are current either way.
|
||||
func (h *OperatorPartialsHandler) loadDomainsPageData(r *http.Request, errMsg string) OperatorDomainsData {
|
||||
ctx := r.Context()
|
||||
data := OperatorDomainsData{Error: notice.Problem(errMsg)}
|
||||
if h.Registry == nil {
|
||||
data.Error = notice.Problem("The domain registry isn't available.")
|
||||
@@ -308,6 +353,16 @@ func (h *OperatorPartialsHandler) loadDomainsPageData(r *http.Request, errMsg st
|
||||
InitiationBudget: formatPolicyBudget(policy.InitiationBudget),
|
||||
}
|
||||
|
||||
h.loadLiveClaims(r, &data)
|
||||
h.loadPlacements(r, &data)
|
||||
h.loadTerminalClaims(r, &data)
|
||||
return data
|
||||
}
|
||||
|
||||
// loadLiveClaims fills the live claims list and its nav. Its links navigate
|
||||
// the page, so it sets no Target.
|
||||
func (h *OperatorPartialsHandler) loadLiveClaims(r *http.Request, data *OperatorDomainsData) {
|
||||
ctx := r.Context()
|
||||
params := ParseListParams(r, "status")
|
||||
params.Facet = ValidFacet(params.Facet, domainClaimFacets)
|
||||
rows, total, err := FetchPage(¶ms, func(limit, offset int32) ([]domains.ListLiveClaimsForOperatorPageRow, int64, error) {
|
||||
@@ -320,18 +375,20 @@ func (h *OperatorPartialsHandler) loadDomainsPageData(r *http.Request, errMsg st
|
||||
})
|
||||
if err != nil {
|
||||
h.Logger.Error("failed to list live domain claims", slog.Any("error", err))
|
||||
data.Error = notice.Problem("Failed to load domain claims.")
|
||||
return data
|
||||
data.ClaimsError = notice.Problem("Failed to load domain claims.")
|
||||
return
|
||||
}
|
||||
data.Nav = ListNav{
|
||||
BasePath: "/operator/domains",
|
||||
SearchPlaceholder: "Domain or organization",
|
||||
SearchLabel: "Search live claims",
|
||||
FacetParam: "status",
|
||||
FacetOptions: domainClaimFacets,
|
||||
Q: params.Q,
|
||||
Facet: params.Facet,
|
||||
Page: params.Page,
|
||||
Total: total,
|
||||
Extra: siblingListState(r, "", "status"),
|
||||
}
|
||||
data.Claims = make([]OperatorDomainClaimRow, len(rows))
|
||||
for i, row := range rows {
|
||||
@@ -349,15 +406,99 @@ func (h *OperatorPartialsHandler) loadDomainsPageData(r *http.Request, errMsg st
|
||||
Placed: row.Kind != domains.KindOperatorRoot && row.PlacementCount > 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
terminal, err := h.Registry.ListAllTerminalClaims(ctx)
|
||||
// loadPlacements fills the placements list and its nav: an embedded list
|
||||
// under p_ that swaps #domain-placements-panel and refreshes the other two.
|
||||
func (h *OperatorPartialsHandler) loadPlacements(r *http.Request, data *OperatorDomainsData) {
|
||||
ctx := r.Context()
|
||||
params := ParseListParamsNS(r, "p_", "p_state")
|
||||
params.PerPage = ParsePerPage(r, "p_", embeddedListDefaultPerPage)
|
||||
params.Facet = ValidFacet(params.Facet, placementStateFacets)
|
||||
rows, total, err := FetchPage(¶ms, func(limit, offset int32) ([]domains.ListPlacementsForOperatorPageRow, int64, error) {
|
||||
page := domains.OperatorPlacementsPage{Q: params.Q, Limit: limit, Offset: offset}
|
||||
if params.Facet != "" {
|
||||
servable := params.Facet == "servable"
|
||||
page.Servable = &servable
|
||||
}
|
||||
return h.Registry.ListPlacementsPage(ctx, page)
|
||||
})
|
||||
if err != nil {
|
||||
h.Logger.Error("failed to list domain placements", slog.Any("error", err))
|
||||
data.PlacementsError = notice.Problem("Failed to load domain placements.")
|
||||
return
|
||||
}
|
||||
data.PlacementsNav = ListNav{
|
||||
BasePath: "/operator/domains",
|
||||
SearchPlaceholder: "Served name or organization",
|
||||
SearchLabel: "Search placements",
|
||||
FacetParam: "p_state",
|
||||
FacetOptions: placementStateFacets,
|
||||
Q: params.Q,
|
||||
Facet: params.Facet,
|
||||
Page: params.Page,
|
||||
Total: total,
|
||||
ParamPrefix: "p_",
|
||||
Extra: siblingListState(r, "p_", "p_state"),
|
||||
PerPage: params.PerPage,
|
||||
DefaultPerPage: embeddedListDefaultPerPage,
|
||||
PerPageOptions: perPageOptions,
|
||||
Target: "#domain-placements-panel",
|
||||
SyncSelect: "#domain-page-header,#domain-claims-panel,#domain-history-panel",
|
||||
}
|
||||
data.Placements = make([]OperatorPlacementRow, len(rows))
|
||||
for i, row := range rows {
|
||||
data.Placements[i] = OperatorPlacementRow{
|
||||
Name: row.Fqdn,
|
||||
OrgID: row.OrgID,
|
||||
OrgName: row.OrgName,
|
||||
Provider: row.Provider,
|
||||
ResourceRef: row.ResourceRef,
|
||||
Servable: row.Servable,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// loadTerminalClaims fills the claim history list and its nav: an embedded
|
||||
// list under h_ that swaps #domain-history-panel and refreshes the other two.
|
||||
func (h *OperatorPartialsHandler) loadTerminalClaims(r *http.Request, data *OperatorDomainsData) {
|
||||
ctx := r.Context()
|
||||
params := ParseListParamsNS(r, "h_", "h_status")
|
||||
params.PerPage = ParsePerPage(r, "h_", embeddedListDefaultPerPage)
|
||||
params.Facet = ValidFacet(params.Facet, historyStatusFacets)
|
||||
rows, total, err := FetchPage(¶ms, func(limit, offset int32) ([]domains.ListTerminalClaimsForOperatorPageRow, int64, error) {
|
||||
return h.Registry.ListTerminalClaimsPage(ctx, domains.OperatorTerminalClaimsPage{
|
||||
Q: params.Q,
|
||||
Status: params.Facet,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
})
|
||||
})
|
||||
if err != nil {
|
||||
h.Logger.Error("failed to list terminal domain claims", slog.Any("error", err))
|
||||
data.Error = notice.Problem("Failed to load domain claims.")
|
||||
return data
|
||||
data.HistoryError = notice.Problem("Failed to load domain claims.")
|
||||
return
|
||||
}
|
||||
data.TerminalClaims = make([]OperatorTerminalClaimRow, len(terminal))
|
||||
for i, row := range terminal {
|
||||
data.HistoryNav = ListNav{
|
||||
BasePath: "/operator/domains",
|
||||
SearchPlaceholder: "Domain or organization",
|
||||
SearchLabel: "Search claim history",
|
||||
FacetParam: "h_status",
|
||||
FacetOptions: historyStatusFacets,
|
||||
Q: params.Q,
|
||||
Facet: params.Facet,
|
||||
Page: params.Page,
|
||||
Total: total,
|
||||
ParamPrefix: "h_",
|
||||
Extra: siblingListState(r, "h_", "h_status"),
|
||||
PerPage: params.PerPage,
|
||||
DefaultPerPage: embeddedListDefaultPerPage,
|
||||
PerPageOptions: perPageOptions,
|
||||
Target: "#domain-history-panel",
|
||||
SyncSelect: "#domain-page-header,#domain-claims-panel,#domain-placements-panel",
|
||||
}
|
||||
data.TerminalClaims = make([]OperatorTerminalClaimRow, len(rows))
|
||||
for i, row := range rows {
|
||||
data.TerminalClaims[i] = OperatorTerminalClaimRow{
|
||||
ClaimID: row.ClaimID,
|
||||
Root: row.RootFqdn,
|
||||
@@ -370,23 +511,6 @@ func (h *OperatorPartialsHandler) loadDomainsPageData(r *http.Request, errMsg st
|
||||
Outcome: domainTerminalOutcome(row.Kind, row.EvidenceAt, row.AbandonedAt, row.SystemCanceledAt),
|
||||
}
|
||||
}
|
||||
|
||||
placements, err := h.Registry.ListAllPlacements(ctx)
|
||||
if err != nil {
|
||||
h.Logger.Error("failed to list domain placements", slog.Any("error", err))
|
||||
data.Error = notice.Problem("Failed to load domain placements.")
|
||||
return data
|
||||
}
|
||||
data.Placements = make([]OperatorPlacementRow, len(placements))
|
||||
for i, row := range placements {
|
||||
data.Placements[i] = OperatorPlacementRow{
|
||||
Name: row.Fqdn,
|
||||
Provider: row.Provider,
|
||||
ResourceRef: row.ResourceRef,
|
||||
Servable: row.Servable,
|
||||
}
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// GetDomainsPage handles GET /operator/domains — live claims across every
|
||||
|
||||
@@ -321,7 +321,12 @@ func TestForceReleaseRefusalsKeepTheClaim(t *testing.T) {
|
||||
holder := newRollbackWorkspace(t, env.database)
|
||||
|
||||
// A claim with a placement on it.
|
||||
placed, err := env.registry.ClaimExternal(ctx, holder, uniqueDomainsTestName())
|
||||
// Both claims share one token, and the page is asked for the placements
|
||||
// matching it: the shared database holds other tests' placements, so the
|
||||
// unplaced claim's name must be one the search would match for the
|
||||
// "must not appear" check below to mean something.
|
||||
token := uniqueDomainsTestToken()
|
||||
placed, err := env.registry.ClaimExternal(ctx, holder, token+"-placed.example")
|
||||
if err != nil {
|
||||
t.Fatalf("claim: %v", err)
|
||||
}
|
||||
@@ -389,7 +394,12 @@ func TestOperatorDomainsPlacementsSectionListsWhatActuallyServes(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
holder := newRollbackWorkspace(t, env.database)
|
||||
|
||||
placed, err := env.registry.ClaimExternal(ctx, holder, uniqueDomainsTestName())
|
||||
// Both claims share one token, and the page is asked for the placements
|
||||
// matching it: the shared database holds other tests' placements, so the
|
||||
// unplaced claim's name must be one the search would match for the
|
||||
// "must not appear" check below to mean something.
|
||||
token := uniqueDomainsTestToken()
|
||||
placed, err := env.registry.ClaimExternal(ctx, holder, token+"-placed.example")
|
||||
if err != nil {
|
||||
t.Fatalf("claim: %v", err)
|
||||
}
|
||||
@@ -410,12 +420,12 @@ func TestOperatorDomainsPlacementsSectionListsWhatActuallyServes(t *testing.T) {
|
||||
t.Fatalf("place: %v", err)
|
||||
}
|
||||
|
||||
unplaced, err := env.registry.ClaimExternal(ctx, holder, uniqueDomainsTestName())
|
||||
unplaced, err := env.registry.ClaimExternal(ctx, holder, token+"-unplaced.example")
|
||||
if err != nil {
|
||||
t.Fatalf("claim: %v", err)
|
||||
}
|
||||
|
||||
code, body := env.do(env.operator, http.MethodGet, "/operator/domains")
|
||||
code, body := env.do(env.operator, http.MethodGet, "/operator/domains?p_q="+token)
|
||||
if code != http.StatusOK {
|
||||
t.Fatalf("GET /operator/domains = %d, want %d", code, http.StatusOK)
|
||||
}
|
||||
@@ -445,7 +455,11 @@ func TestOperatorDomainsTerminalClaimsReachableWithLedgerColumns(t *testing.T) {
|
||||
holder := newRollbackWorkspace(t, env.database)
|
||||
q := domains.New(env.database)
|
||||
|
||||
abandoned, err := env.registry.ClaimExternal(ctx, holder, uniqueDomainsTestName())
|
||||
// The history is asked for the claims matching the test's token, so the
|
||||
// shared database's other terminal claims neither crowd these three off
|
||||
// the first page nor change what the check below can see.
|
||||
token := uniqueDomainsTestToken()
|
||||
abandoned, err := env.registry.ClaimExternal(ctx, holder, token+"-abandoned.example")
|
||||
if err != nil {
|
||||
t.Fatalf("claim: %v", err)
|
||||
}
|
||||
@@ -455,7 +469,7 @@ func TestOperatorDomainsTerminalClaimsReachableWithLedgerColumns(t *testing.T) {
|
||||
t.Fatalf("expire claim = (%d, %v)", rows, err)
|
||||
}
|
||||
|
||||
rolledBack, err := env.registry.ClaimExternal(ctx, holder, uniqueDomainsTestName())
|
||||
rolledBack, err := env.registry.ClaimExternal(ctx, holder, token+"-rolledback.example")
|
||||
if err != nil {
|
||||
t.Fatalf("claim: %v", err)
|
||||
}
|
||||
@@ -463,12 +477,12 @@ func TestOperatorDomainsTerminalClaimsReachableWithLedgerColumns(t *testing.T) {
|
||||
t.Fatalf("system-cancel claim = (%d, %v)", rows, err)
|
||||
}
|
||||
|
||||
stillPending, err := env.registry.ClaimExternal(ctx, holder, uniqueDomainsTestName())
|
||||
stillPending, err := env.registry.ClaimExternal(ctx, holder, token+"-pending.example")
|
||||
if err != nil {
|
||||
t.Fatalf("claim: %v", err)
|
||||
}
|
||||
|
||||
code, body := env.do(env.operator, http.MethodGet, "/operator/domains")
|
||||
code, body := env.do(env.operator, http.MethodGet, "/operator/domains?h_q="+token)
|
||||
if code != http.StatusOK {
|
||||
t.Fatalf("GET /operator/domains = %d, want %d", code, http.StatusOK)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,337 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
||||
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
|
||||
|
||||
package server
|
||||
|
||||
// The Domains page holds three governed lists on one URL (operator-list-scale
|
||||
// "A governed list is a paged, searchable list"): the live claims, the
|
||||
// placements under p_ and the claim history under h_. These tests drive the
|
||||
// page from the route in, against rows the page's own token scopes, because
|
||||
// the suite shares its database with other tests.
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"html"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// listsFixture is one organization's rows for the Domains page lists: twenty
|
||||
// terminal claims (twelve expired, eight canceled) and twenty-five
|
||||
// placements (three of them unservable), all carrying token, plus one live
|
||||
// claim that is also the placements' claim.
|
||||
type listsFixture struct {
|
||||
token string
|
||||
orgID string
|
||||
orgName string
|
||||
}
|
||||
|
||||
func seedDomainsLists(t *testing.T, env *domainsModerationEnv) listsFixture {
|
||||
t.Helper()
|
||||
ctx := context.Background()
|
||||
token := uniqueDomainsTestToken()
|
||||
holder := newRollbackWorkspace(t, env.database)
|
||||
seedLiveClaims(t, env.database, holder, token+"e", 12, "expired")
|
||||
seedLiveClaims(t, env.database, holder, token+"c", 8, "canceled")
|
||||
seedLiveClaims(t, env.database, holder, token+"live", 1, "active")
|
||||
|
||||
var claimID, orgID string
|
||||
if err := env.database.QueryRowContext(ctx,
|
||||
`SELECT c.claim_id, w.org_id FROM domains.claims c
|
||||
JOIN core.workspaces w ON w.workspace_id = c.workspace_id
|
||||
WHERE c.root_fqdn = $1`, token+"live-000.example").Scan(&claimID, &orgID); err != nil {
|
||||
t.Fatalf("read the live claim: %v", err)
|
||||
}
|
||||
if _, err := env.database.ExecContext(ctx,
|
||||
`INSERT INTO core.providers (provider, provider_kind, display_name)
|
||||
VALUES ('testprovider', 'provisioning', 'Test Provider')
|
||||
ON CONFLICT (provider) DO NOTHING`); err != nil {
|
||||
t.Fatalf("fixture provider: %v", err)
|
||||
}
|
||||
for i := range 25 {
|
||||
name := fmt.Sprintf("%s-%02d.example", token, i)
|
||||
if _, err := env.database.ExecContext(ctx,
|
||||
`INSERT INTO domains.placements (claim_id, fqdn, reversed_labels, provider, resource_ref, servable)
|
||||
VALUES ($1, $2, $2, 'testprovider', $3, $4)`,
|
||||
claimID, name, fmt.Sprintf("res-%s-%02d", token, i), i >= 3); err != nil {
|
||||
t.Fatalf("seed placement %s: %v", name, err)
|
||||
}
|
||||
}
|
||||
return listsFixture{token: token, orgID: orgID, orgName: env.orgNameOf(holder)}
|
||||
}
|
||||
|
||||
// panelOf is the slice of the page from the element with the given id to the
|
||||
// next panel opening after it, or to the end of the page.
|
||||
func panelOf(t *testing.T, body, id string) string {
|
||||
t.Helper()
|
||||
start := strings.Index(body, `id="`+id+`"`)
|
||||
if start < 0 {
|
||||
t.Fatalf("the page has no #%s", id)
|
||||
}
|
||||
rest := body[start+1:]
|
||||
end := len(rest)
|
||||
for _, other := range []string{"domain-claims-panel", "domain-placements-panel", "domain-history-panel"} {
|
||||
if other == id {
|
||||
continue
|
||||
}
|
||||
if i := strings.Index(rest, `id="`+other+`"`); i >= 0 && i < end {
|
||||
end = i
|
||||
}
|
||||
}
|
||||
return rest[:end]
|
||||
}
|
||||
|
||||
var (
|
||||
hrefRe = regexp.MustCompile(`href="([^"]*)"`)
|
||||
idAttrRe = regexp.MustCompile(`\sid="([^"]+)"`)
|
||||
navLinkRe = regexp.MustCompile(`<a class="nav-link[^>]*>`)
|
||||
pageLinkRe = regexp.MustCompile(`<a class="page-link" href="([^"]*)"`)
|
||||
)
|
||||
|
||||
// queryOf parses the query of an href the page rendered.
|
||||
func queryOf(t *testing.T, href string) url.Values {
|
||||
t.Helper()
|
||||
u, err := url.Parse(html.UnescapeString(href))
|
||||
if err != nil {
|
||||
t.Fatalf("parse %q: %v", href, err)
|
||||
}
|
||||
return u.Query()
|
||||
}
|
||||
|
||||
// assertNoRepeatedIDs fails when two elements of the page carry the same id.
|
||||
func assertNoRepeatedIDs(t *testing.T, body string) {
|
||||
t.Helper()
|
||||
seen := map[string]bool{}
|
||||
for _, m := range idAttrRe.FindAllStringSubmatch(body, -1) {
|
||||
if seen[m[1]] {
|
||||
t.Errorf("element id %q is repeated on the page", m[1])
|
||||
}
|
||||
seen[m[1]] = true
|
||||
}
|
||||
}
|
||||
|
||||
func (e *domainsModerationEnv) page(target string) string {
|
||||
e.t.Helper()
|
||||
code, body := e.do(e.operator, http.MethodGet, target)
|
||||
if code != http.StatusOK {
|
||||
e.t.Fatalf("GET %s = %d, want %d", target, code, http.StatusOK)
|
||||
}
|
||||
return body
|
||||
}
|
||||
|
||||
// TestOperatorDomainsPlacementsAndHistoryArePaged: both lists show ten rows
|
||||
// of the twenty or twenty-five they hold, with the true total in the pager
|
||||
// and the section header, the size picker, and the placements' Organization
|
||||
// column linking to the holder.
|
||||
func TestOperatorDomainsPlacementsAndHistoryArePaged(t *testing.T) {
|
||||
env := newDomainsModerationEnv(t)
|
||||
fx := seedDomainsLists(t, env)
|
||||
body := env.page("/operator/domains?p_q=" + fx.token + "&h_q=" + fx.token)
|
||||
|
||||
placements := panelOf(t, body, "domain-placements-panel")
|
||||
if n := strings.Count(placements, `<th scope="row" class="text-nowrap"><code class="text-break">`); n != 10 {
|
||||
t.Errorf("placements render %d rows, want 10 of 25", n)
|
||||
}
|
||||
for _, want := range []string{"25 served names", "Showing 1–10 of 25", "Per page:", "Page 1 of 3"} {
|
||||
if !strings.Contains(placements, want) {
|
||||
t.Errorf("placements panel does not state %q", want)
|
||||
}
|
||||
}
|
||||
if want := `<a href="/operator/organizations/` + fx.orgID + `">` + fx.orgName + `</a>`; !strings.Contains(placements, want) {
|
||||
t.Errorf("placements rows do not link the holder: want %s", want)
|
||||
}
|
||||
|
||||
history := panelOf(t, body, "domain-history-panel")
|
||||
if n := strings.Count(history, `<th scope="row"><code class="text-break">`); n != 10 {
|
||||
t.Errorf("history renders %d rows, want 10 of 20", n)
|
||||
}
|
||||
for _, want := range []string{"20 terminal claims", "Showing 1–10 of 20", "Per page:", "Page 1 of 2"} {
|
||||
if !strings.Contains(history, want) {
|
||||
t.Errorf("history panel does not state %q", want)
|
||||
}
|
||||
}
|
||||
assertNoRepeatedIDs(t, body)
|
||||
}
|
||||
|
||||
// TestOperatorDomainsListFiltersNarrowTheirOwnList: p_state and h_status
|
||||
// narrow only their own list, and a value outside the vocabulary is ignored,
|
||||
// so the list renders unfiltered.
|
||||
func TestOperatorDomainsListFiltersNarrowTheirOwnList(t *testing.T) {
|
||||
env := newDomainsModerationEnv(t)
|
||||
fx := seedDomainsLists(t, env)
|
||||
scope := "p_q=" + fx.token + "&h_q=" + fx.token
|
||||
|
||||
body := env.page("/operator/domains?" + scope + "&p_state=unservable&h_status=canceled")
|
||||
if !strings.Contains(panelOf(t, body, "domain-placements-panel"), "3 served names") {
|
||||
t.Error("p_state=unservable does not narrow placements to the three unservable names")
|
||||
}
|
||||
if !strings.Contains(panelOf(t, body, "domain-history-panel"), "8 terminal claims") {
|
||||
t.Error("h_status=canceled does not narrow the history to the eight canceled claims")
|
||||
}
|
||||
|
||||
body = env.page("/operator/domains?" + scope + "&p_state=active&h_status=active")
|
||||
if !strings.Contains(panelOf(t, body, "domain-placements-panel"), "25 served names") {
|
||||
t.Error("an unknown p_state must be ignored, rendering all 25 placements")
|
||||
}
|
||||
if !strings.Contains(panelOf(t, body, "domain-history-panel"), "20 terminal claims") {
|
||||
t.Error("an unknown h_status must be ignored, rendering all 20 history rows")
|
||||
}
|
||||
|
||||
body = env.page("/operator/domains?p_q=" + fx.token + "-0&h_q=" + fx.token)
|
||||
if !strings.Contains(panelOf(t, body, "domain-placements-panel"), "10 served names") {
|
||||
t.Error("p_q narrows placements to the ten names containing -0")
|
||||
}
|
||||
}
|
||||
|
||||
// TestOperatorDomainsSearchesMatchTheHolder: the placements search matches
|
||||
// the holding organization's name, and the history search the organization
|
||||
// as well as the domain.
|
||||
func TestOperatorDomainsSearchesMatchTheHolder(t *testing.T) {
|
||||
env := newDomainsModerationEnv(t)
|
||||
fx := seedDomainsLists(t, env)
|
||||
orgTerm := strings.ToUpper(strings.TrimPrefix(fx.orgName, "Org "))
|
||||
body := env.page("/operator/domains?p_q=" + orgTerm + "&h_q=" + orgTerm)
|
||||
if !strings.Contains(panelOf(t, body, "domain-placements-panel"), "25 served names") {
|
||||
t.Error("a mixed-case part of the organization's name does not find its placements")
|
||||
}
|
||||
if !strings.Contains(panelOf(t, body, "domain-history-panel"), "20 terminal claims") {
|
||||
t.Error("a mixed-case part of the organization's name does not find its history")
|
||||
}
|
||||
}
|
||||
|
||||
// TestOperatorDomainsNoMatchClearKeepsTheOtherLists: a search matching
|
||||
// nothing renders the no-match line, and its clear link drops only that
|
||||
// list's own parameters, keeping the other two lists' (the live claims'
|
||||
// included).
|
||||
func TestOperatorDomainsNoMatchClearKeepsTheOtherLists(t *testing.T) {
|
||||
env := newDomainsModerationEnv(t)
|
||||
fx := seedDomainsLists(t, env)
|
||||
clearHref := func(body, panel string) string {
|
||||
t.Helper()
|
||||
section := panelOf(t, body, panel)
|
||||
if !strings.Contains(section, "No rows match") {
|
||||
t.Fatalf("%s: a search matching nothing does not render the no-match line", panel)
|
||||
}
|
||||
i := strings.Index(section, "Clear search and filters")
|
||||
hrefs := hrefRe.FindAllStringSubmatch(section[:i], -1)
|
||||
return hrefs[len(hrefs)-1][1]
|
||||
}
|
||||
|
||||
body := env.page("/operator/domains?q=" + fx.token + "&p_q=" + fx.token + "&h_q=nomatch-" + fx.token)
|
||||
got := queryOf(t, clearHref(body, "domain-history-panel"))
|
||||
if got.Get("q") != fx.token || got.Get("p_q") != fx.token || got.Has("h_q") {
|
||||
t.Errorf("the history's clear link keeps %v, want q and p_q kept and h_q dropped", got)
|
||||
}
|
||||
|
||||
body = env.page("/operator/domains?q=" + fx.token + "&h_q=" + fx.token + "&p_q=nomatch-" + fx.token + "&p_state=servable")
|
||||
got = queryOf(t, clearHref(body, "domain-placements-panel"))
|
||||
if got.Get("q") != fx.token || got.Get("h_q") != fx.token || got.Has("p_q") || got.Has("p_state") {
|
||||
t.Errorf("the placements' clear link keeps %v, want q and h_q kept, p_q and p_state dropped", got)
|
||||
}
|
||||
|
||||
body = env.page("/operator/domains?q=nomatch-" + fx.token + "&p_q=" + fx.token + "&h_q=" + fx.token)
|
||||
got = queryOf(t, clearHref(body, "domain-claims-panel"))
|
||||
if got.Get("p_q") != fx.token || got.Get("h_q") != fx.token || got.Has("q") {
|
||||
t.Errorf("the live claims' clear link keeps %v, want p_q and h_q kept and q dropped", got)
|
||||
}
|
||||
}
|
||||
|
||||
// TestOperatorDomainsLinksCarryTheOtherListsState: each list's next-page link
|
||||
// and search form carry the other two lists' parameters as the request set
|
||||
// them, so a link or a search never resets a sibling.
|
||||
func TestOperatorDomainsLinksCarryTheOtherListsState(t *testing.T) {
|
||||
env := newDomainsModerationEnv(t)
|
||||
fx := seedDomainsLists(t, env)
|
||||
body := env.page("/operator/domains?status=active&p_q=" + fx.token + "&h_q=" + fx.token + "&h_status=expired")
|
||||
|
||||
nextOf := func(panel string) url.Values {
|
||||
t.Helper()
|
||||
for _, m := range pageLinkRe.FindAllStringSubmatch(panelOf(t, body, panel), -1) {
|
||||
if q := queryOf(t, m[1]); q.Has("p_page") || q.Has("h_page") || q.Has("page") {
|
||||
return q
|
||||
}
|
||||
}
|
||||
t.Fatalf("%s has no next-page link", panel)
|
||||
return nil
|
||||
}
|
||||
next := nextOf("domain-placements-panel")
|
||||
if next.Get("p_page") != "2" || next.Get("p_q") != fx.token || next.Get("h_q") != fx.token ||
|
||||
next.Get("h_status") != "expired" || next.Get("status") != "active" {
|
||||
t.Errorf("the placements' next link = %v, want its own page and search with the other two lists' state", next)
|
||||
}
|
||||
next = nextOf("domain-history-panel")
|
||||
if next.Get("h_page") != "2" || next.Get("h_q") != fx.token || next.Get("h_status") != "expired" ||
|
||||
next.Get("p_q") != fx.token || next.Get("status") != "active" {
|
||||
t.Errorf("the history's next link = %v, want its own page and filter with the other two lists' state", next)
|
||||
}
|
||||
|
||||
// A search form carries the siblings' state as hidden inputs.
|
||||
for panel, want := range map[string][]string{
|
||||
"domain-placements-panel": {`name="h_q" value="` + fx.token + `"`, `name="h_status" value="expired"`, `name="status" value="active"`},
|
||||
"domain-history-panel": {`name="p_q" value="` + fx.token + `"`, `name="status" value="active"`},
|
||||
"domain-claims-panel": {`name="p_q" value="` + fx.token + `"`, `name="h_q" value="` + fx.token + `"`, `name="h_status" value="expired"`},
|
||||
} {
|
||||
section := panelOf(t, body, panel)
|
||||
for _, input := range want {
|
||||
if !strings.Contains(section, input) {
|
||||
t.Errorf("%s: the search form does not carry %s", panel, input)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestOperatorDomainsScopedControls: the live claims navigate the page (no
|
||||
// htmx selection on their search or pager), while every control of the other
|
||||
// two lists, the filter pills and the All pill included, is a scoped request
|
||||
// that refreshes its siblings; the three searches are labelled apart.
|
||||
func TestOperatorDomainsScopedControls(t *testing.T) {
|
||||
env := newDomainsModerationEnv(t)
|
||||
fx := seedDomainsLists(t, env)
|
||||
seedLiveClaims(t, env.database, newRollbackWorkspace(t, env.database), fx.token+"more", 60, "active")
|
||||
body := env.page("/operator/domains?q=" + fx.token + "more")
|
||||
|
||||
if live := panelOf(t, body, "domain-claims-panel"); strings.Contains(live, "hx-select") {
|
||||
t.Errorf("the live claims' search and pager must navigate the page, found hx-select in:\n%s", live)
|
||||
} else if !strings.Contains(live, "Page 1 of 2") {
|
||||
t.Error("the live claims keep their 50-row page, so 60 claims need two pages")
|
||||
}
|
||||
|
||||
for panel, pills := range map[string]int{"domain-placements-panel": 3, "domain-history-panel": 4} {
|
||||
section := panelOf(t, body, panel)
|
||||
links := navLinkRe.FindAllString(section, -1)
|
||||
if len(links) != pills {
|
||||
t.Fatalf("%s has %d filter pills, want %d with the All pill", panel, len(links), pills)
|
||||
}
|
||||
for _, link := range links {
|
||||
for _, attr := range []string{"hx-get=", `hx-target="#` + panel + `"`, `hx-select="#` + panel + `"`, `hx-select-oob="#domain-page-header,`} {
|
||||
if !strings.Contains(link, attr) {
|
||||
t.Errorf("%s: pill %s lacks %s", panel, link, attr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, panel := range []string{"domain-placements-panel", "domain-history-panel"} {
|
||||
section := panelOf(t, body, panel)
|
||||
if !strings.Contains(section, `<form`) || !strings.Contains(section, `hx-select-oob="#domain-page-header,`) {
|
||||
t.Errorf("%s: the search and its Clear do not refresh #domain-page-header", panel)
|
||||
}
|
||||
}
|
||||
|
||||
for _, want := range []string{
|
||||
`placeholder="Served name or organization"`,
|
||||
"Search live claims", "Search placements", "Search claim history",
|
||||
} {
|
||||
if !strings.Contains(body, want) {
|
||||
t.Errorf("the page does not carry %q", want)
|
||||
}
|
||||
}
|
||||
if strings.Contains(body, "Search this list") {
|
||||
t.Error("every search on the page is labelled by its list")
|
||||
}
|
||||
assertNoRepeatedIDs(t, body)
|
||||
}
|
||||
@@ -15,10 +15,12 @@ package server
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.coopcloud.tech/wiki-cafe/member-console/internal/domains"
|
||||
"git.coopcloud.tech/wiki-cafe/member-console/internal/notice"
|
||||
)
|
||||
|
||||
// TestOperatorDomainsForceReleaseOnlyWhereAdmissible pins the affordance to
|
||||
@@ -129,13 +131,15 @@ func TestOperatorDomainsScopeCopyPresent(t *testing.T) {
|
||||
func TestOperatorDomainsPlacementsSectionRenders(t *testing.T) {
|
||||
body := Render(t, OperatorSet(t), "operator_domains.html", OperatorDomainsData{
|
||||
Placements: []OperatorPlacementRow{
|
||||
{Name: "wiki.example.org", Provider: "fedwiki", ResourceRef: "site-abc123", Servable: true},
|
||||
{Name: "archived.example.org", Provider: "fedwiki", ResourceRef: "site-def456", Servable: false},
|
||||
{Name: "wiki.example.org", OrgID: "org-1", OrgName: "Acme Co", Provider: "fedwiki", ResourceRef: "site-abc123", Servable: true},
|
||||
{Name: "archived.example.org", OrgID: "org-1", OrgName: "Acme Co", Provider: "fedwiki", ResourceRef: "site-def456", Servable: false},
|
||||
},
|
||||
PlacementsNav: ListNav{BasePath: "/operator/domains", Total: 2, ParamPrefix: "p_"},
|
||||
})
|
||||
|
||||
for _, want := range []string{
|
||||
"Placements",
|
||||
"Placements", "2 served names",
|
||||
`<th>Organization</th>`, `<a href="/operator/organizations/org-1">Acme Co</a>`,
|
||||
"wiki.example.org", "fedwiki", "site-abc123",
|
||||
"archived.example.org", "site-def456",
|
||||
} {
|
||||
@@ -180,6 +184,7 @@ func TestOperatorDomainsTerminalClaimsSectionRenders(t *testing.T) {
|
||||
Status: "released", OrgName: "Acme Co",
|
||||
Evidence: false, Outcome: ""},
|
||||
},
|
||||
HistoryNav: ListNav{BasePath: "/operator/domains", Total: 4, ParamPrefix: "h_"},
|
||||
})
|
||||
|
||||
// task 10, round 2: the History section is an ordinary sectionHeader
|
||||
@@ -217,6 +222,105 @@ func TestOperatorDomainsTerminalClaimsSectionRenders(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestOperatorDomainsFailedReadShowsItsNoticeInItsPanel: a list whose read
|
||||
// failed renders its notice inside its own panel and nothing else of the
|
||||
// list, so a scoped swap of that panel never reads as an empty list, while
|
||||
// the other panels still render their rows. The loader's three reads are
|
||||
// independent by construction (loadLiveClaims, loadPlacements and
|
||||
// loadTerminalClaims each set their own notice and return), and the
|
||||
// handler's Registry is the concrete *domains.Registry with no seam for a
|
||||
// failing querier, so the independence is read from the code and the
|
||||
// rendering is tested here.
|
||||
func TestOperatorDomainsFailedReadShowsItsNoticeInItsPanel(t *testing.T) {
|
||||
body := Render(t, OperatorSet(t), "operator_domains.html", OperatorDomainsData{
|
||||
Claims: []OperatorDomainClaimRow{
|
||||
{ClaimID: "claim-1", Root: "live.example.org", Kind: "external", Status: "active", OrgID: "org-1", OrgName: "Acme Co"},
|
||||
},
|
||||
Nav: ListNav{BasePath: "/operator/domains", Total: 1},
|
||||
Placements: []OperatorPlacementRow{{Name: "served.example.org", OrgID: "org-1", OrgName: "Acme Co", Provider: "fedwiki", ResourceRef: "site-1", Servable: true}},
|
||||
PlacementsNav: ListNav{BasePath: "/operator/domains", Total: 1, ParamPrefix: "p_"},
|
||||
TerminalClaims: []OperatorTerminalClaimRow{
|
||||
{ClaimID: "claim-9", Root: "gone.example.org", Kind: "external", Status: "expired", OrgID: "org-1", OrgName: "Acme Co"},
|
||||
},
|
||||
HistoryError: notice.Problem("Failed to load domain claims."),
|
||||
HistoryNav: ListNav{BasePath: "/operator/domains", ParamPrefix: "h_", SearchLabel: "Search claim history"},
|
||||
})
|
||||
|
||||
start := strings.Index(body, `id="domain-history-panel"`)
|
||||
if start < 0 {
|
||||
t.Fatal("the page has no #domain-history-panel")
|
||||
}
|
||||
panel := body[start:]
|
||||
if !strings.Contains(panel, "Failed to load domain claims.") {
|
||||
t.Errorf("the failed history read shows no notice inside its panel:\n%s", panel)
|
||||
}
|
||||
if strings.Contains(panel, "No expired, canceled, or released claims yet") {
|
||||
t.Error("a failed history read must not read as an empty list")
|
||||
}
|
||||
if strings.Contains(panel, "<table") || strings.Contains(panel, "Search claim history") {
|
||||
t.Error("a failed history read renders no controls and no table")
|
||||
}
|
||||
if !strings.Contains(body, "live.example.org") || !strings.Contains(body, "served.example.org") {
|
||||
t.Error("a failed history read must leave the other panels rendering their rows")
|
||||
}
|
||||
if strings.Contains(body[:start], "Failed to load domain claims.") {
|
||||
t.Error("the notice belongs to the history panel alone")
|
||||
}
|
||||
}
|
||||
|
||||
// TestOperatorDomainsFailedReadStatesNoCount: a list whose read failed
|
||||
// produced no total, so its header states no count, where a zero would read
|
||||
// as an empty list. Each header is rendered with a nonzero total and its
|
||||
// list's notice set.
|
||||
func TestOperatorDomainsFailedReadStatesNoCount(t *testing.T) {
|
||||
body := Render(t, OperatorSet(t), "operator_domains.html", OperatorDomainsData{
|
||||
Nav: ListNav{BasePath: "/operator/domains", Total: 7},
|
||||
ClaimsError: notice.Problem("Failed to load domain claims."),
|
||||
PlacementsNav: ListNav{BasePath: "/operator/domains", ParamPrefix: "p_", Total: 8},
|
||||
PlacementsError: notice.Problem("Failed to load domain placements."),
|
||||
HistoryNav: ListNav{BasePath: "/operator/domains", ParamPrefix: "h_", Total: 9},
|
||||
HistoryError: notice.Problem("Failed to load domain claims."),
|
||||
})
|
||||
|
||||
claims := strings.Index(body, `id="domain-claims-panel"`)
|
||||
placements := strings.Index(body, `id="domain-placements-panel"`)
|
||||
history := strings.Index(body, `id="domain-history-panel"`)
|
||||
if claims < 0 || placements < claims || history < placements {
|
||||
t.Fatalf("the page's panels are missing or out of order (%d, %d, %d)", claims, placements, history)
|
||||
}
|
||||
for _, c := range []struct{ name, text, count string }{
|
||||
{"page header", body[:claims], `\d+ live claims?`},
|
||||
{"placements header", body[placements:history], `\d+ served names?`},
|
||||
{"history header", body[history:], `\d+ terminal claims?`},
|
||||
} {
|
||||
if regexp.MustCompile(c.count).MatchString(c.text) {
|
||||
t.Errorf("the %s states a count beside a failed read:\n%s", c.name, c.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestOperatorDomainsEmbeddedListsRefreshThePageHeader: the page header's
|
||||
// count is outside every panel, so a scoped control of the placements or the
|
||||
// history names it among the regions it refreshes out of band.
|
||||
func TestOperatorDomainsEmbeddedListsRefreshThePageHeader(t *testing.T) {
|
||||
body := Render(t, OperatorSet(t), "operator_domains.html", OperatorDomainsData{
|
||||
Nav: ListNav{BasePath: "/operator/domains", Total: 1},
|
||||
Placements: []OperatorPlacementRow{{Name: "served.example.org", OrgID: "org-1", OrgName: "Acme Co", Provider: "fedwiki", ResourceRef: "site-1", Servable: true}},
|
||||
PlacementsNav: ListNav{BasePath: "/operator/domains", Total: 1, ParamPrefix: "p_", Target: "#domain-placements-panel", SyncSelect: "#domain-page-header,#domain-claims-panel,#domain-history-panel"},
|
||||
TerminalClaims: []OperatorTerminalClaimRow{{ClaimID: "claim-9", Root: "gone.example.org", Kind: "external", Status: "expired", OrgID: "org-1", OrgName: "Acme Co"}},
|
||||
HistoryNav: ListNav{BasePath: "/operator/domains", Total: 1, ParamPrefix: "h_", Target: "#domain-history-panel", SyncSelect: "#domain-page-header,#domain-claims-panel,#domain-placements-panel"},
|
||||
})
|
||||
if !strings.Contains(body, `id="domain-page-header"`) {
|
||||
t.Fatal("the page header has no #domain-page-header wrapper")
|
||||
}
|
||||
for _, panel := range []string{"domain-placements-panel", "domain-history-panel"} {
|
||||
section := body[strings.Index(body, `id="`+panel+`"`):]
|
||||
if !strings.Contains(section, `hx-select-oob="#domain-page-header,`) {
|
||||
t.Errorf("%s: its controls do not refresh #domain-page-header", panel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestDomainTerminalOutcome unit-tests the derivation directly (task 9.2):
|
||||
// blame is read from the ledger columns in a fixed priority
|
||||
// (system_canceled_at, then abandoned_at, then evidence_at), never from
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"slices"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -34,28 +33,6 @@ import (
|
||||
// per-org addon/usage/one-time quantity.
|
||||
const maxGrantQuantity = 1_000_000
|
||||
|
||||
// enrollmentListCap bounds the composite's Members list to its most
|
||||
// recent rows (maintainer 2026-08-23; the grants ledger and Tier changes
|
||||
// graduated from this cap to the governed-list pager in the 2026-08-24
|
||||
// design round). The composite is a summary, not a report, so the list
|
||||
// only needs enough rows to answer "who is in this org right now".
|
||||
const enrollmentListCap = 16
|
||||
|
||||
// capEnrollmentList truncates items to the most recent enrollmentListCap
|
||||
// entries, returning the (possibly unchanged) slice, the pre-truncation
|
||||
// count, and whether truncation happened. The template renders the honest
|
||||
// "Showing the latest 16 of N" line only when wasCapped is true, so a
|
||||
// caller must pass items already ordered most-recent-first (see the
|
||||
// ordering note on each call site below -- callers whose backing query
|
||||
// sorts oldest-first must reverse or re-sort before calling this).
|
||||
func capEnrollmentList[T any](items []T) (capped []T, total int, wasCapped bool) {
|
||||
total = len(items)
|
||||
if total <= enrollmentListCap {
|
||||
return items, total, false
|
||||
}
|
||||
return items[:enrollmentListCap], total, true
|
||||
}
|
||||
|
||||
// pageSliceClamped windows an already-loaded, already-ordered slice to
|
||||
// the params' page (operatorListPageSize rows), clamping a past-the-end
|
||||
// page back to 1 like FetchPage does for SQL loaders. The composite's
|
||||
@@ -804,13 +781,12 @@ type OrgEnrollmentData struct {
|
||||
// refused Save rebinds it with that grant's row editing.
|
||||
ManageForm forms.FormView
|
||||
BillingSummary BillingSummaryViewModel
|
||||
// Members is capped to the enrollmentListCap most recently joined rows
|
||||
// (the backing query sorts alphabetically, so loadOrgEnrollmentData
|
||||
// re-sorts by JoinedAt before capping); MembersTotal / MembersCapped
|
||||
// follow the same contract as above.
|
||||
Members []MemberRowViewModel
|
||||
MembersTotal int
|
||||
MembersCapped bool
|
||||
// Members is one page of the organization's members, most recently
|
||||
// joined first (the backing query's order, kept through the search and the
|
||||
// window); MembersTotal is the count after the search. MembersNav is the m_ list's search and pager.
|
||||
Members []MemberRowViewModel
|
||||
MembersTotal int
|
||||
MembersNav ListNav
|
||||
// Error is a load failure (the organization or its pools could not be
|
||||
// read); the template renders it instead of the page, because there is
|
||||
// no page. ActionError is the outcome of an action the operator just
|
||||
@@ -1826,7 +1802,7 @@ func (h *OperatorPartialsHandler) loadOrgTierChanges(r *http.Request, data *OrgE
|
||||
DefaultPerPage: embeddedListDefaultPerPage,
|
||||
PerPageOptions: perPageOptions,
|
||||
Target: "#tier-changes-panel",
|
||||
SyncSelect: "#plan-grants-panel,#entitlement-changes-panel",
|
||||
SyncSelect: "#members-panel,#plan-grants-panel,#entitlement-changes-panel",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2078,27 +2054,37 @@ func displacementTitleFor(subs []billing.Subscription, items []billing.ListCurre
|
||||
return displacementTitle(len(subs), displaced)
|
||||
}
|
||||
|
||||
// loadOrgMembers fills the members section. Each row links to
|
||||
// loadOrgMembers fills the members section: the m_ list's search, page and
|
||||
// size, over the active members most recently joined first. Each row links to
|
||||
// /operator/persons/{personID} (closes the deferred 3.7 task from
|
||||
// operator-mpa-conversion).
|
||||
// operator-mpa-conversion). The search is a case-insensitive substring of the
|
||||
// display name or the primary email, applied Go-side: the members come from
|
||||
// one org-scoped read, like the grants ledger's.
|
||||
func (h *OperatorPartialsHandler) loadOrgMembers(r *http.Request, data *OrgEnrollmentData, orgID string) {
|
||||
params := ParseListParamsNS(r, "m_", "")
|
||||
params.PerPage = ParsePerPage(r, "m_", embeddedListDefaultPerPage)
|
||||
members, err := h.OrgQ.ListActiveMembersByOrgID(r.Context(), orgID)
|
||||
if err != nil {
|
||||
h.Logger.Error("failed to list active members", slog.Any("error", err), slog.String("org_id", orgID))
|
||||
data.MembersError = notice.Problem("Failed to load members.")
|
||||
} else {
|
||||
// ListActiveMembersByOrgID sorts alphabetically by display name, not
|
||||
// by recency, so the "most recent" cap below needs its own sort by
|
||||
// JoinedAt (most recently joined first) rather than relying on
|
||||
// query order the way the grants and transitions lists do.
|
||||
sort.Slice(members, func(i, j int) bool {
|
||||
return members[i].JoinedAt.After(members[j].JoinedAt)
|
||||
})
|
||||
capped, total, wasCapped := capEnrollmentList(members)
|
||||
// ListActiveMembersByOrgID returns the members most recently joined
|
||||
// first, the person id breaking a tie, so the order is total and each
|
||||
// member lists on exactly one page; the filter and the window below
|
||||
// keep that order.
|
||||
if q := strings.ToLower(params.Q); q != "" {
|
||||
matched := members[:0:0]
|
||||
for _, m := range members {
|
||||
if strings.Contains(strings.ToLower(m.DisplayName), q) || strings.Contains(strings.ToLower(m.PrimaryEmail), q) {
|
||||
matched = append(matched, m)
|
||||
}
|
||||
}
|
||||
members = matched
|
||||
}
|
||||
window, total := pageSliceClamped(members, ¶ms)
|
||||
data.MembersTotal = total
|
||||
data.MembersCapped = wasCapped
|
||||
data.Members = make([]MemberRowViewModel, len(capped))
|
||||
for i, m := range capped {
|
||||
data.Members = make([]MemberRowViewModel, len(window))
|
||||
for i, m := range window {
|
||||
data.Members[i] = MemberRowViewModel{
|
||||
PersonID: m.PersonID,
|
||||
DisplayName: m.DisplayName,
|
||||
@@ -2108,6 +2094,21 @@ func (h *OperatorPartialsHandler) loadOrgMembers(r *http.Request, data *OrgEnrol
|
||||
}
|
||||
}
|
||||
}
|
||||
data.MembersNav = ListNav{
|
||||
BasePath: "/operator/organizations/" + orgID,
|
||||
SearchPlaceholder: "Name or email",
|
||||
SearchLabel: "Search members",
|
||||
Q: params.Q,
|
||||
Page: params.Page,
|
||||
Total: int64(data.MembersTotal),
|
||||
ParamPrefix: "m_",
|
||||
Extra: siblingListState(r, "m_"),
|
||||
PerPage: params.PerPage,
|
||||
DefaultPerPage: embeddedListDefaultPerPage,
|
||||
PerPageOptions: perPageOptions,
|
||||
Target: "#members-panel",
|
||||
SyncSelect: "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel",
|
||||
}
|
||||
}
|
||||
|
||||
// loadOrgGrants loads the composite's grants ledger: the current tab, search
|
||||
@@ -2165,7 +2166,8 @@ func (h *OperatorPartialsHandler) loadOrgGrants(r *http.Request, data *OrgEnroll
|
||||
DefaultPerPage: embeddedListDefaultPerPage,
|
||||
PerPageOptions: perPageOptions,
|
||||
Target: "#plan-grants-panel",
|
||||
SyncSelect: "#tier-changes-panel,#entitlement-changes-panel",
|
||||
SyncSelect: "#members-panel,#tier-changes-panel,#entitlement-changes-panel",
|
||||
SearchLabel: "Search grants",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2438,7 +2440,7 @@ func (h *OperatorPartialsHandler) loadOrgEntitlementChanges(r *http.Request, dat
|
||||
DefaultPerPage: embeddedListDefaultPerPage,
|
||||
PerPageOptions: perPageOptions,
|
||||
Target: "#entitlement-changes-panel",
|
||||
SyncSelect: "#plan-grants-panel,#tier-changes-panel",
|
||||
SyncSelect: "#members-panel,#plan-grants-panel,#tier-changes-panel",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
package server
|
||||
|
||||
// The organization page characterized, state by state: for each of ten
|
||||
// states, the data loadOrgEnrollmentData returns and the
|
||||
// operator_enrollment.html render of it, compared byte for byte with the files
|
||||
// under testdata/org_enrollment. The data leaves out the Issue grant form and
|
||||
// the grants ledger's form and rows, which the render holds (the form views do
|
||||
// The organization page characterized, state by state: for each state, the
|
||||
// data loadOrgEnrollmentData returns and the operator_enrollment.html render
|
||||
// of it, compared byte for byte with the files under testdata/org_enrollment.
|
||||
// The data leaves out the Issue grant form and the grants ledger's form and
|
||||
// rows, which the render holds (the form views do
|
||||
// not marshal, and the grants view model is the grants goldens' own). The
|
||||
// Issue grant catalog is every published product in the database, so the data
|
||||
// keeps the fixture's products and the form is built again from them. The
|
||||
@@ -17,6 +17,7 @@ package server
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"reflect"
|
||||
@@ -153,11 +154,26 @@ func buildEnrollmentRich(b *enrollmentBuilder) world.Org {
|
||||
return o
|
||||
}
|
||||
|
||||
// buildEnrollmentMembers makes an organization of 24 members, Member-01 to
|
||||
// Member-24, joined in that order, so the most recently joined list begins
|
||||
// at Member-24.
|
||||
func buildEnrollmentMembers(b *enrollmentBuilder, orgType string) world.Org {
|
||||
b.t.Helper()
|
||||
o := b.org("members-paged", orgType)
|
||||
for i := 1; i <= 24; i++ {
|
||||
name := fmt.Sprintf("Member-%02d", i)
|
||||
p := b.w.Person(name)
|
||||
b.norm.Name("person", name, p.ID)
|
||||
b.w.Member(o, p)
|
||||
}
|
||||
return o
|
||||
}
|
||||
|
||||
// enrollmentState is one organization of the golden and the query its
|
||||
// request carries.
|
||||
type enrollmentState struct{ name, orgID, query string }
|
||||
|
||||
// enrollmentFixture is the ten states, built once.
|
||||
// enrollmentFixture is the states, built once.
|
||||
type enrollmentFixture struct {
|
||||
*enrollmentBuilder
|
||||
states []enrollmentState
|
||||
@@ -238,6 +254,11 @@ func newEnrollmentFixture(t *testing.T) *enrollmentFixture {
|
||||
add("many-changes", o.ID, "?tc_page=2")
|
||||
|
||||
add("rich-history-search", rich.ID, "?tc_per=25&tab=history&q=Plus")
|
||||
|
||||
members := buildEnrollmentMembers(f.enrollmentBuilder, plain)
|
||||
add("members-paged", members.ID, "")
|
||||
add("members-per-25", members.ID, "?m_per=25")
|
||||
add("members-search", members.ID, "?m_q=MEMBER-2")
|
||||
return f
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
||||
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
|
||||
|
||||
package server
|
||||
|
||||
// The organization page's Members list is governed (operator-list-scale "The
|
||||
// organization composite's Members is a governed list"): ten rows by default
|
||||
// under the prefix m_, searched by display name or email, with no row cap.
|
||||
// These tests drive loadOrgEnrollmentData from a request over an
|
||||
// organization of 24 members, Member-01 to Member-24 in the order they
|
||||
// joined; the goldens pin the rendered states beside them.
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.coopcloud.tech/wiki-cafe/member-console/internal/testkit/dbtest"
|
||||
"git.coopcloud.tech/wiki-cafe/member-console/internal/testkit/world"
|
||||
)
|
||||
|
||||
type membersPage struct {
|
||||
data OrgEnrollmentData
|
||||
html string
|
||||
}
|
||||
|
||||
// membersFixture is the 24-member organization and a way to load its page
|
||||
// for a query string.
|
||||
type membersFixture struct {
|
||||
t *testing.T
|
||||
b *enrollmentBuilder
|
||||
o world.Org
|
||||
h *OperatorPartialsHandler
|
||||
}
|
||||
|
||||
func newMembersFixture(t *testing.T) *membersFixture {
|
||||
t.Helper()
|
||||
b := newEnrollmentBuilder(t, world.New(t, dbtest.Open(t)))
|
||||
o := buildEnrollmentMembers(b, b.orgType("plain", nil))
|
||||
return &membersFixture{t: t, b: b, o: o, h: catalogReadsHandler(t, catalogReadsConfig(b.w))}
|
||||
}
|
||||
|
||||
func (f *membersFixture) load(query string) membersPage {
|
||||
f.t.Helper()
|
||||
req := httptest.NewRequest(http.MethodGet, "/operator/organizations/"+f.o.ID+query, nil)
|
||||
data := f.h.loadOrgEnrollmentData(req, f.o.ID, "")
|
||||
return membersPage{data: data, html: Render(f.t, OperatorSet(f.t), "operator_enrollment.html", data)}
|
||||
}
|
||||
|
||||
func (p membersPage) names() []string {
|
||||
names := make([]string, len(p.data.Members))
|
||||
for i, m := range p.data.Members {
|
||||
names[i] = m.DisplayName
|
||||
}
|
||||
return names
|
||||
}
|
||||
|
||||
// panel is the rendered Members panel: from its wrapper to the Entitlement
|
||||
// changes panel that follows it.
|
||||
func (p membersPage) panel(t *testing.T) string {
|
||||
t.Helper()
|
||||
start := strings.Index(p.html, `id="members-panel"`)
|
||||
end := strings.Index(p.html, `id="entitlement-changes-panel"`)
|
||||
if start < 0 || end < start {
|
||||
t.Fatalf("the page has no #members-panel before #entitlement-changes-panel")
|
||||
}
|
||||
return p.html[start:end]
|
||||
}
|
||||
|
||||
func (p membersPage) rows(t *testing.T) int {
|
||||
t.Helper()
|
||||
return strings.Count(p.panel(t), `<th scope="row"><a href="/operator/persons/`)
|
||||
}
|
||||
|
||||
func TestOrgEnrollmentMembersPageByRecentJoin(t *testing.T) {
|
||||
f := newMembersFixture(t)
|
||||
page := f.load("")
|
||||
|
||||
if got := page.names(); !slices.Equal(got, []string{
|
||||
"Member-24", "Member-23", "Member-22", "Member-21", "Member-20",
|
||||
"Member-19", "Member-18", "Member-17", "Member-16", "Member-15",
|
||||
}) {
|
||||
t.Errorf("first page = %v, want the ten most recently joined", got)
|
||||
}
|
||||
panel := page.panel(t)
|
||||
for _, want := range []string{"24 members", "Showing 1–10 of 24", "Per page:", "Page 1 of 3", "Search members"} {
|
||||
if !strings.Contains(panel, want) {
|
||||
t.Errorf("the Members panel does not state %q", want)
|
||||
}
|
||||
}
|
||||
if strings.Contains(page.html, "Showing the latest") {
|
||||
t.Error("the capped-list line must be gone")
|
||||
}
|
||||
if !strings.Contains(page.html, "Search grants") {
|
||||
t.Error("the grants ledger's search must be labelled Search grants")
|
||||
}
|
||||
assertNoRepeatedIDs(t, page.html)
|
||||
}
|
||||
|
||||
// TestOrgEnrollmentMembersTiesBreakByPersonID ties fourteen members at one
|
||||
// join moment, more than a page of ten, and writes their joined_at in
|
||||
// descending person-id order, so the heap holds the tied rows in the reverse
|
||||
// of the order the list must show. The query's order is the only thing that
|
||||
// can put them in ascending person-id order, each on exactly one page.
|
||||
func TestOrgEnrollmentMembersTiesBreakByPersonID(t *testing.T) {
|
||||
f := newMembersFixture(t)
|
||||
ctx := context.Background()
|
||||
rows, err := f.b.w.DB.QueryContext(ctx,
|
||||
`SELECT p.person_id FROM core.org_members om JOIN core.persons p ON p.person_id = om.person_id
|
||||
WHERE om.org_id = $1 AND p.display_name <= 'Member-14' ORDER BY p.person_id DESC`, f.o.ID)
|
||||
if err != nil {
|
||||
t.Fatalf("read the tied members: %v", err)
|
||||
}
|
||||
defer rows.Close()
|
||||
var tied []string
|
||||
for rows.Next() {
|
||||
var id string
|
||||
if err := rows.Scan(&id); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
tied = append(tied, id)
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(tied) != 14 {
|
||||
t.Fatalf("tied %d members, want 14", len(tied))
|
||||
}
|
||||
joined := time.Now().Add(time.Hour)
|
||||
for _, id := range tied {
|
||||
if _, err := f.b.w.DB.ExecContext(ctx,
|
||||
`UPDATE core.org_members SET joined_at = $1 WHERE org_id = $2 AND person_id = $3`, joined, f.o.ID, id); err != nil {
|
||||
t.Fatalf("join member %s at the shared moment: %v", id, err)
|
||||
}
|
||||
}
|
||||
|
||||
var got []string
|
||||
for _, query := range []string{"", "?m_page=2"} {
|
||||
for _, m := range f.load(query).data.Members {
|
||||
got = append(got, m.PersonID)
|
||||
}
|
||||
}
|
||||
want := slices.Clone(tied)
|
||||
slices.Reverse(want)
|
||||
if len(got) < len(want) || !slices.Equal(got[:len(want)], want) {
|
||||
t.Errorf("the tied members list as %v, want each once in ascending person id %v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOrgEnrollmentMembersLargePageHasNoCap(t *testing.T) {
|
||||
f := newMembersFixture(t)
|
||||
page := f.load("?m_per=25")
|
||||
if n := page.rows(t); n != 24 {
|
||||
t.Errorf("m_per=25 renders %d members, want all 24", n)
|
||||
}
|
||||
if strings.Contains(page.panel(t), "Page 1 of") {
|
||||
t.Error("24 members on a page of 25 need no page links")
|
||||
}
|
||||
if !strings.Contains(page.panel(t), "Showing 1–24 of 24") {
|
||||
t.Error("the pager does not state the 24 shown")
|
||||
}
|
||||
}
|
||||
|
||||
func TestOrgEnrollmentMembersSearch(t *testing.T) {
|
||||
f := newMembersFixture(t)
|
||||
suffix := f.b.w.Sfx
|
||||
for _, c := range []struct {
|
||||
name, query string
|
||||
want []string
|
||||
total string
|
||||
}{
|
||||
{"a name", "Member-07", []string{"Member-07"}, "1 member"},
|
||||
{"a mixed-case name", "mEmBeR-2", []string{"Member-24", "Member-23", "Member-22", "Member-21", "Member-20"}, "5 members"},
|
||||
{"an email only", suffix, nil, "24 members"},
|
||||
{"one email", "member-12-" + suffix, []string{"Member-12"}, "1 member"},
|
||||
} {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
page := f.load("?m_q=" + url.QueryEscape(c.query))
|
||||
if c.want != nil && !slices.Equal(page.names(), c.want) {
|
||||
t.Errorf("m_q=%q lists %v, want %v", c.query, page.names(), c.want)
|
||||
}
|
||||
if c.want == nil && len(page.names()) != 10 {
|
||||
t.Errorf("m_q=%q lists %d members on the first page, want 10 of 24", c.query, len(page.names()))
|
||||
}
|
||||
if !strings.Contains(page.panel(t), c.total) {
|
||||
t.Errorf("m_q=%q: the Members header does not read %q", c.query, c.total)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
none := f.load("?m_q=nobody-by-that-name")
|
||||
panel := none.panel(t)
|
||||
if !strings.Contains(panel, "No rows match") || strings.Contains(panel, "<table") {
|
||||
t.Errorf("a search matching nothing renders the no-match line and no table:\n%s", panel)
|
||||
}
|
||||
if strings.Contains(panel, "24 members") || strings.Contains(panel, "0 members") {
|
||||
t.Error("a search matching none shows no count")
|
||||
}
|
||||
}
|
||||
|
||||
// TestOrgEnrollmentMembersNavsCarryEachOther: the Members pager carries the
|
||||
// ledger's, Tier changes' and Entitlement changes' parameters, theirs carry
|
||||
// m_q, and each of the three names #members-panel among the panels it
|
||||
// refreshes.
|
||||
func TestOrgEnrollmentMembersNavsCarryEachOther(t *testing.T) {
|
||||
f := newMembersFixture(t)
|
||||
page := f.load("?q=plan&tab=history&tc_per=25&ec_per=50&m_q=Member-")
|
||||
d := page.data
|
||||
|
||||
next := queryOf(t, d.MembersNav.NextURL())
|
||||
if next.Get("m_page") != "2" || next.Get("m_q") != "Member-" ||
|
||||
next.Get("q") != "plan" || next.Get("tab") != "history" || next.Get("tc_per") != "25" || next.Get("ec_per") != "50" {
|
||||
t.Errorf("the Members pager = %v, want its own page and search with the other three lists' state", next)
|
||||
}
|
||||
for name, nav := range map[string]ListNav{
|
||||
"the grants ledger": d.GrantsNav,
|
||||
"Tier changes": d.TierChangesNav,
|
||||
"Entitlement changes": d.EntitlementChangesNav,
|
||||
} {
|
||||
if got := queryOf(t, nav.PerPageURL(25)); got.Get("m_q") != "Member-" {
|
||||
t.Errorf("%s's links = %v, want m_q carried", name, got)
|
||||
}
|
||||
if !slices.Contains(strings.Split(nav.SyncSelect, ","), "#members-panel") {
|
||||
t.Errorf("%s refreshes %q, want #members-panel among them", name, nav.SyncSelect)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{`name="q" value="plan"`, `name="tab" value="history"`, `name="tc_per" value="25"`} {
|
||||
if !strings.Contains(page.panel(t), want) {
|
||||
t.Errorf("the Members search form does not carry %s", want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestOrgEnrollmentLedgerSearchClearIsScoped: with a search set, the grants
|
||||
// ledger's Clear selects the ledger's panel, refreshes the sibling panels out
|
||||
// of band and pushes the URL, as the search itself does; it used to fetch the
|
||||
// whole page into the panel.
|
||||
func TestOrgEnrollmentLedgerSearchClearIsScoped(t *testing.T) {
|
||||
f := newMembersFixture(t)
|
||||
page := f.load("?q=plan&m_q=Member-")
|
||||
i := strings.Index(page.html, `>Clear</a>`)
|
||||
if i < 0 {
|
||||
t.Fatal("a ledger search with a term renders no Clear link")
|
||||
}
|
||||
button := page.html[strings.LastIndex(page.html[:i], "<a "):i]
|
||||
if !strings.Contains(button, `<a href="/operator/organizations/`) {
|
||||
t.Errorf("the ledger's Clear carries no href, so it does nothing without scripts:\n%s", button)
|
||||
}
|
||||
for _, want := range []string{
|
||||
`hx-target="#plan-grants-panel"`, `hx-select="#plan-grants-panel"`,
|
||||
`hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel"`,
|
||||
`hx-swap="outerHTML"`, `hx-push-url="true"`,
|
||||
} {
|
||||
if !strings.Contains(button, want) {
|
||||
t.Errorf("the ledger's Clear lacks %s:\n%s", want, button)
|
||||
}
|
||||
}
|
||||
href := button[strings.Index(button, `hx-get="`)+len(`hx-get="`):]
|
||||
if got := queryOf(t, href[:strings.Index(href, `"`)]); got.Has("q") || got.Get("m_q") != "Member-" {
|
||||
t.Errorf("the ledger's Clear goes to %v, want q dropped and the Members search kept", got)
|
||||
}
|
||||
}
|
||||
@@ -1037,6 +1037,9 @@ func TestOrgEnrollmentTierChangesTable_ReasonCell(t *testing.T) {
|
||||
// as an inline alert rather than rendering an indistinguishable empty state.
|
||||
func TestOrgEnrollmentSectionErrors(t *testing.T) {
|
||||
data := onePoolFixture()
|
||||
data.Members = []MemberRowViewModel{{PersonID: "p-1", DisplayName: "Member-01", RoleName: "owner", JoinedAt: "Jan 2, 2026"}}
|
||||
data.MembersTotal = 1
|
||||
data.MembersNav = ListNav{BasePath: "/operator/organizations/org-1", ParamPrefix: "m_", Total: 1, Target: "#members-panel"}
|
||||
data.MembersError = notice.Problem("Failed to load members.")
|
||||
data.GrantsError = notice.Problem("Failed to load grants.")
|
||||
data.TransitionsError = notice.Problem("Failed to load transition history for one or more pools.")
|
||||
@@ -1051,34 +1054,29 @@ func TestOrgEnrollmentSectionErrors(t *testing.T) {
|
||||
t.Errorf("expected %q in output, got:\n%s", want, out)
|
||||
}
|
||||
}
|
||||
|
||||
// A failed members read renders its notice and nothing else of the list.
|
||||
start := strings.Index(out, `id="members-panel"`)
|
||||
end := strings.Index(out, `id="entitlement-changes-panel"`)
|
||||
if start < 0 || end < start {
|
||||
t.Fatal("the page has no #members-panel before #entitlement-changes-panel")
|
||||
}
|
||||
panel := out[start:end]
|
||||
if !strings.Contains(panel, "Failed to load members.") {
|
||||
t.Errorf("the failed members read shows no notice inside its panel:\n%s", panel)
|
||||
}
|
||||
if strings.Contains(panel, "No members.") || strings.Contains(panel, "<table") || strings.Contains(panel, "Member-01") {
|
||||
t.Errorf("a failed members read renders neither its empty state nor its table:\n%s", panel)
|
||||
}
|
||||
}
|
||||
|
||||
// TestOrgEnrollmentEmbeddedLists_CapAndPager: Members keeps the honest
|
||||
// 16-cap; the grants ledger and Tier changes graduated to the shared
|
||||
// pager (maintainer design round 2026-08-24), windowing through the
|
||||
// production pageSliceClamped and rendering listPager's true totals.
|
||||
func TestOrgEnrollmentEmbeddedLists_CapAndPager(t *testing.T) {
|
||||
t.Run("members over cap: 16 rows and the honest line once", checkMembersOverCap)
|
||||
t.Run("grants and tier changes paginate with true totals", checkEmbeddedPagers)
|
||||
}
|
||||
|
||||
// checkMembersOverCap renders 20 members and checks that the composite lists
|
||||
// 16 and shows the capped line once.
|
||||
func checkMembersOverCap(t *testing.T) {
|
||||
data := onePoolFixture()
|
||||
rawMembers := make([]MemberRowViewModel, 20)
|
||||
for i := range rawMembers {
|
||||
rawMembers[i] = MemberRowViewModel{PersonID: fmt.Sprintf("person-%02d", i), DisplayName: fmt.Sprintf("Member-Fixture-%02d", i), RoleName: "member"}
|
||||
}
|
||||
data.Members, data.MembersTotal, data.MembersCapped = capEnrollmentList(rawMembers)
|
||||
|
||||
out := renderOrgEnrollment(t, data)
|
||||
if n := strings.Count(out, `href="/operator/persons/person-`); n != 16 {
|
||||
t.Errorf("expected exactly 16 rendered member rows, got %d in:\n%s", n, out)
|
||||
}
|
||||
if n := strings.Count(out, "Showing the latest 16 of 20."); n != 1 {
|
||||
t.Errorf("expected the honest capped-list line once (members only), got %d in:\n%s", n, out)
|
||||
}
|
||||
// TestOrgEnrollmentEmbeddedLists_Pager: the grants ledger and Tier changes
|
||||
// paginate through the shared pager (maintainer design round 2026-08-24),
|
||||
// windowing through the production pageSliceClamped and rendering listPager's
|
||||
// true totals. Members pages the same way; its states are pinned through the
|
||||
// real loader in TestOrgEnrollmentMembers.
|
||||
func TestOrgEnrollmentEmbeddedLists_Pager(t *testing.T) {
|
||||
checkEmbeddedPagers(t)
|
||||
}
|
||||
|
||||
// pagedListsFixture is the one-pool composite with 60 grants and 60 tier
|
||||
@@ -1145,9 +1143,6 @@ func checkEmbeddedPagers(t *testing.T) {
|
||||
if !strings.Contains(out, "per=25") || !strings.Contains(out, "tc_per=25") {
|
||||
t.Errorf("expected per-page links with namespaced params, got:\n%s", out)
|
||||
}
|
||||
if strings.Contains(out, "Showing the latest 16 of 60") {
|
||||
t.Errorf("the flat 16-cap line must not render for paginated lists, got:\n%s", out)
|
||||
}
|
||||
// The tier-changes pager namespaces its page param so it cannot
|
||||
// clobber the grants tab/search state on the shared URL.
|
||||
if !strings.Contains(out, "tc_page=2") {
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/orgs/x" role="search" hx-get="/operator/orgs/x" hx-target="#tc" hx-swap="outerHTML" hx-push-url="true" hx-select="#tc">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
<form id="form-operator.list.controls-tc" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/orgs/x" role="search" hx-get="/operator/orgs/x" hx-target="#tc" hx-swap="outerHTML" hx-push-url="true" hx-select="#tc">
|
||||
<div id="form-operator.list.controls-tc-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-tc_q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-tc-tc_q-control">Search this list</label>
|
||||
<input type="hidden" name="tab" value="grants" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-tc_q-control" name="tc_q" value="abc" autocomplete="off">
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-tc-tc_q-control" name="tc_q" value="abc" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary" hx-get="/operator/orgs/x?tab=grants" hx-target="#tc" hx-swap="innerHTML">Clear</button>
|
||||
<a href="/operator/orgs/x?tab=grants" class="btn btn-outline-secondary" hx-get="/operator/orgs/x?tab=grants" hx-target="#tc" hx-select="#tc" hx-swap="outerHTML" hx-push-url="true">Clear</a>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/orgs/x" role="search" hx-get="/operator/orgs/x" hx-target="#tc" hx-swap="outerHTML" hx-push-url="true" hx-select="#tc">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
<form id="form-operator.list.controls-tc" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/orgs/x" role="search" hx-get="/operator/orgs/x" hx-target="#tc" hx-swap="outerHTML" hx-push-url="true" hx-select="#tc">
|
||||
<div id="form-operator.list.controls-tc-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-tc_q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-tc-tc_q-control">Search this list</label>
|
||||
<input type="hidden" name="ec_page" value="2" ><input type="hidden" name="ec_q" value="one" ><input type="hidden" name="tab" value="grants" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-tc_q-control" name="tc_q" value="abc" autocomplete="off">
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-tc-tc_q-control" name="tc_q" value="abc" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary" hx-get="/operator/orgs/x?ec_page=2&ec_q=one&tab=grants" hx-target="#tc" hx-swap="innerHTML">Clear</button>
|
||||
<a href="/operator/orgs/x?ec_page=2&ec_q=one&tab=grants" class="btn btn-outline-secondary" hx-get="/operator/orgs/x?ec_page=2&ec_q=one&tab=grants" hx-target="#tc" hx-select="#tc" hx-swap="outerHTML" hx-push-url="true">Clear</a>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
@@ -137,6 +137,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
}
|
||||
|
||||
+14
-10
@@ -100,9 +100,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:default-only>" hx-get="/operator/organizations/<org:default-only>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:default-only>" hx-get="/operator/organizations/<org:default-only>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:default-only>?tab=history" hx-get="/operator/organizations/<org:default-only>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:default-only>?tab=history" hx-get="/operator/organizations/<org:default-only>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:default-only>" role="search" hx-get="/operator/organizations/<org:default-only>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:default-only>" role="search" hx-get="/operator/organizations/<org:default-only>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -352,9 +352,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:default-only>?per=25" hx-get="/operator/organizations/<org:default-only>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:default-only>?per=25" hx-get="/operator/organizations/<org:default-only>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:default-only>?per=50" hx-get="/operator/organizations/<org:default-only>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:default-only>?per=50" hx-get="/operator/organizations/<org:default-only>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -368,6 +368,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -376,8 +378,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -386,9 +388,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -469,9 +473,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:default-only>?tc_per=25" hx-get="/operator/organizations/<org:default-only>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:default-only>?tc_per=25" hx-get="/operator/organizations/<org:default-only>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:default-only>?tc_per=50" hx-get="/operator/organizations/<org:default-only>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:default-only>?tc_per=50" hx-get="/operator/organizations/<org:default-only>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
+28
-4
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 1,
|
||||
"IssuanceProducts": [
|
||||
@@ -191,8 +193,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:default-only>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:default-only>",
|
||||
"OrgKey": "",
|
||||
@@ -244,8 +267,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
+14
-10
@@ -120,9 +120,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:grant-over-subscription-paused>" hx-get="/operator/organizations/<org:grant-over-subscription-paused>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:grant-over-subscription-paused>" hx-get="/operator/organizations/<org:grant-over-subscription-paused>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:grant-over-subscription-paused>?tab=history" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:grant-over-subscription-paused>?tab=history" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:grant-over-subscription-paused>" role="search" hx-get="/operator/organizations/<org:grant-over-subscription-paused>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:grant-over-subscription-paused>" role="search" hx-get="/operator/organizations/<org:grant-over-subscription-paused>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -374,9 +374,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?per=25" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?per=25" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?per=50" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?per=50" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -390,6 +390,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -398,8 +400,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -408,9 +410,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -503,9 +507,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=25" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=25" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=50" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=50" hx-get="/operator/organizations/<org:grant-over-subscription-paused>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
+28
-4
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 1,
|
||||
"IssuanceProducts": [
|
||||
@@ -191,8 +193,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:grant-over-subscription-paused>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:grant-over-subscription-paused>",
|
||||
"OrgKey": "",
|
||||
@@ -244,8 +267,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
@@ -120,9 +120,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:grant-over-subscription>" hx-get="/operator/organizations/<org:grant-over-subscription>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:grant-over-subscription>" hx-get="/operator/organizations/<org:grant-over-subscription>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:grant-over-subscription>?tab=history" hx-get="/operator/organizations/<org:grant-over-subscription>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:grant-over-subscription>?tab=history" hx-get="/operator/organizations/<org:grant-over-subscription>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:grant-over-subscription>" role="search" hx-get="/operator/organizations/<org:grant-over-subscription>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:grant-over-subscription>" role="search" hx-get="/operator/organizations/<org:grant-over-subscription>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -374,9 +374,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?per=25" hx-get="/operator/organizations/<org:grant-over-subscription>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?per=25" hx-get="/operator/organizations/<org:grant-over-subscription>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?per=50" hx-get="/operator/organizations/<org:grant-over-subscription>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?per=50" hx-get="/operator/organizations/<org:grant-over-subscription>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -390,6 +390,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -398,8 +400,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -408,9 +410,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -503,9 +507,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?tc_per=25" hx-get="/operator/organizations/<org:grant-over-subscription>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?tc_per=25" hx-get="/operator/organizations/<org:grant-over-subscription>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?tc_per=50" hx-get="/operator/organizations/<org:grant-over-subscription>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:grant-over-subscription>?tc_per=50" hx-get="/operator/organizations/<org:grant-over-subscription>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 1,
|
||||
"IssuanceProducts": [
|
||||
@@ -191,8 +193,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:grant-over-subscription>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:grant-over-subscription>",
|
||||
"OrgKey": "",
|
||||
@@ -244,8 +267,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
+14
-10
@@ -120,9 +120,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tab=history" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tab=history" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" role="search" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" role="search" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -362,9 +362,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=25" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=25" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=50" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=50" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -378,6 +378,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -386,8 +388,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -396,9 +398,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -503,9 +507,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=25" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=25" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=50" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=50" hx-get="/operator/organizations/<org:grant-over-two-ladder-subscription-paused>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
+28
-4
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 1,
|
||||
"IssuanceProducts": [
|
||||
@@ -95,8 +97,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:grant-over-two-ladder-subscription-paused>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:grant-over-two-ladder-subscription-paused>",
|
||||
"OrgKey": "",
|
||||
@@ -148,8 +171,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
+13
-9
@@ -95,9 +95,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:many-changes>?tc_page=2" hx-get="/operator/organizations/<org:many-changes>?tc_page=2" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:many-changes>?tc_page=2" hx-get="/operator/organizations/<org:many-changes>?tc_page=2" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:many-changes>?tab=history&tc_page=2" hx-get="/operator/organizations/<org:many-changes>?tab=history&tc_page=2" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:many-changes>?tab=history&tc_page=2" hx-get="/operator/organizations/<org:many-changes>?tab=history&tc_page=2" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:many-changes>" role="search" hx-get="/operator/organizations/<org:many-changes>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:many-changes>" role="search" hx-get="/operator/organizations/<org:many-changes>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
<input type="hidden" name="tc_page" value="2" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -291,6 +291,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -299,8 +301,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -309,9 +311,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -404,16 +408,16 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:many-changes>?tc_per=25" hx-get="/operator/organizations/<org:many-changes>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:many-changes>?tc_per=25" hx-get="/operator/organizations/<org:many-changes>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:many-changes>?tc_per=50" hx-get="/operator/organizations/<org:many-changes>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:many-changes>?tc_per=50" hx-get="/operator/organizations/<org:many-changes>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<nav aria-label="List pages">
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
<li class="page-item "><a class="page-link" href="/operator/organizations/<org:many-changes>" hx-get="/operator/organizations/<org:many-changes>" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Previous</a></li>
|
||||
<li class="page-item "><a class="page-link" href="/operator/organizations/<org:many-changes>" hx-get="/operator/organizations/<org:many-changes>" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Previous</a></li>
|
||||
<li class="page-item disabled"><span class="page-link">Page 2 of 2</span></li>
|
||||
<li class="page-item disabled"><a class="page-link" href="/operator/organizations/<org:many-changes>?tc_page=3" aria-disabled="true" tabindex="-1">Next</a></li>
|
||||
</ul>
|
||||
|
||||
+32
-4
@@ -42,8 +42,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -80,8 +81,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
@@ -199,8 +201,33 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:many-changes>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {
|
||||
"tc_page": [
|
||||
"2"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:many-changes>",
|
||||
"OrgKey": "",
|
||||
@@ -238,8 +265,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
@@ -0,0 +1,513 @@
|
||||
|
||||
|
||||
<div class="d-flex align-items-start justify-content-between gap-3 mb-3 app-page-header">
|
||||
<div class="app-page-header-text">
|
||||
<nav aria-label="breadcrumb"><ol class="breadcrumb small mb-1">
|
||||
<li class="breadcrumb-item"><a href="/operator">Operator</a></li><li class="breadcrumb-item"><a href="/operator/organizations">Organizations</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">members-paged</li>
|
||||
</ol></nav>
|
||||
<h1 class="h2 mb-0">members-paged</h1>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-3">Owner</dt>
|
||||
<dd class="col-sm-9">
|
||||
|
||||
<a href="/operator/persons/<person:Ann>">Ann</a>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Billing</h2>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No billing account exists for this organization yet.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Pools <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Pools" data-bs-content="A pool holds what an organization's plan and grants deliver; its sites and services draw from it." aria-label="Help: Pools"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button></h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<h3 class="h6 mb-1">
|
||||
Default <span class="badge text-bg-success">Active</span>
|
||||
</h3>
|
||||
|
||||
|
||||
<p class="text-muted mb-0">No plan is delivering into this pool</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Grants</h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="plan-grants-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header d-flex justify-content-between align-items-center gap-2">
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:members-paged>" hx-get="/operator/organizations/<org:members-paged>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:members-paged>?tab=history" hx-get="/operator/organizations/<org:members-paged>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="flex-shrink-0">
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" data-bs-toggle="collapse" data-bs-target="#issueGrantPanel" aria-expanded="false" aria-controls="issueGrantPanel"><svg class="app-opener-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>Issue grant</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="collapse" id="issueGrantPanel">
|
||||
|
||||
|
||||
<div class="card app-form-box mb-3"><div class="card-body">
|
||||
<form id="form-operator.enrollment.grant.issue" data-form="operator.enrollment.grant.issue" data-form-kind="create" class="app-form" novalidate hx-post="/partials/operator/organizations/<org:members-paged>/grant/create" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
||||
<div id="form-operator.enrollment.grant.issue-error" class="app-form-error"></div>
|
||||
|
||||
<div class="app-form-message mb-2">A tier product moves the pool to that tier, up or down.</div>
|
||||
|
||||
|
||||
|
||||
<div class="app-form-fields">
|
||||
<div id="form-operator.enrollment.grant.issue-product_id" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-product_id-control">Product</label>
|
||||
|
||||
<select class="form-select" id="form-operator.enrollment.grant.issue-product_id-control" name="product_id" required aria-describedby="form-operator.enrollment.grant.issue-product_id-warning" hx-get="/partials/operator/products/rule-check" hx-swap="innerHTML" hx-target="#form-operator\.enrollment\.grant\.issue-product_id-warning" hx-trigger="change">
|
||||
<option value="" disabled selected>Choose a product</option>
|
||||
<option value="<product:Basic>">Basic</option>
|
||||
<option value="<product:Forum>">Forum</option>
|
||||
<option value="<product:Forum2>">Forum2</option>
|
||||
<option value="<product:Large>">Large</option>
|
||||
<option value="<product:Lite>">Lite</option>
|
||||
<option value="<product:Lite2>">Lite2</option>
|
||||
<option value="<product:Mid>">Mid</option>
|
||||
<option value="<product:Plus>">Plus</option>
|
||||
<option value="<product:Pro>">Pro</option>
|
||||
<option value="<product:Small>">Small</option>
|
||||
<option value="<product:Small2>">Small2</option>
|
||||
<option value="<product:Starter>">Starter</option>
|
||||
<option value="<product:Starter2>">Starter2</option>
|
||||
<option value="<product:Top>">Top</option>
|
||||
|
||||
</select>
|
||||
|
||||
<div id="form-operator.enrollment.grant.issue-product_id-warning"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-quantity" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-quantity-control">Quantity <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Quantity" data-bs-content="Seats, for per-seat products." aria-label="Help: Quantity"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="number" class="form-control" id="form-operator.enrollment.grant.issue-quantity-control" name="quantity" value="" placeholder="1" min="1" max="1000000">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-valid_until" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-valid_until-control">Valid until <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Valid until" data-bs-content="Leave blank for a grant with no end date." aria-label="Help: Valid until"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="datetime-local" class="form-control" id="form-operator.enrollment.grant.issue-valid_until-control" name="valid_until" value="" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-reason" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-reason-control">Reason</label>
|
||||
|
||||
<select class="form-select" id="form-operator.enrollment.grant.issue-reason-control" name="reason" required>
|
||||
<option value="" disabled selected>Choose a reason</option>
|
||||
<option value="manual">manual</option>
|
||||
<option value="evaluation">evaluation</option>
|
||||
<option value="promotional">promotional</option>
|
||||
<option value="complimentary">complimentary</option>
|
||||
<option value="sponsored">sponsored</option>
|
||||
<option value="board_decision">board_decision</option>
|
||||
<option value="legacy">legacy</option>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-description" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-description-control">Note <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Note" data-bs-content="Why this grant is issued. Shown with the grant in its history." aria-label="Help: Note"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="text" class="form-control" id="form-operator.enrollment.grant.issue-description-control" name="description" value="" maxlength="500" autocomplete="off">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-resumes_after_supersession" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-resumes_after_supersession-control">Resumes</label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Resumes" data-bs-content="If a plan replaces this grant, the grant delivers again when that plan ends." aria-label="Help: Resumes"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<div class="app-form-check-control"><input class="form-check-input" type="checkbox" id="form-operator.enrollment.grant.issue-resumes_after_supersession-control" name="resumes_after_supersession" value="true" ></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
||||
|
||||
<button type="submit" class="btn btn-primary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Issue grant</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-toggle="collapse" data-bs-target="#issueGrantPanel">Cancel</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-2">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:members-paged>" role="search" hx-get="/operator/organizations/<org:members-paged>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-q-control" name="q" value="" placeholder="Product or reason" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No grants are delivering right now.</p>
|
||||
<p class="text-muted small mb-2">The History tab lists every grant ever issued.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
<span class="text-body-secondary small">24 members</span>
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-3">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls-m" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:members-paged>" role="search" hx-get="/operator/organizations/<org:members-paged>" hx-target="#members-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-m-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-m-m_q-control">Search members</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-m-m_q-control" name="m_q" value="" placeholder="Name or email" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm table-record">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
<th>Joined</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-24>">Member-24</a></th>
|
||||
<td><small class="text-muted">member-24-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-23>">Member-23</a></th>
|
||||
<td><small class="text-muted">member-23-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-22>">Member-22</a></th>
|
||||
<td><small class="text-muted">member-22-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-21>">Member-21</a></th>
|
||||
<td><small class="text-muted">member-21-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-20>">Member-20</a></th>
|
||||
<td><small class="text-muted">member-20-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-19>">Member-19</a></th>
|
||||
<td><small class="text-muted">member-19-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-18>">Member-18</a></th>
|
||||
<td><small class="text-muted">member-18-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-17>">Member-17</a></th>
|
||||
<td><small class="text-muted">member-17-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-16>">Member-16</a></th>
|
||||
<td><small class="text-muted">member-16-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-15>">Member-15</a></th>
|
||||
<td><small class="text-muted">member-15-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mt-2">
|
||||
<p class="small text-body-secondary mb-0">Showing 1–10 of 24</p>
|
||||
|
||||
<p class="small text-body-secondary mb-0">Per page:
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:members-paged>?m_per=25" hx-get="/operator/organizations/<org:members-paged>?m_per=25" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:members-paged>?m_per=50" hx-get="/operator/organizations/<org:members-paged>?m_per=50" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<nav aria-label="List pages">
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
<li class="page-item disabled"><a class="page-link" href="/operator/organizations/<org:members-paged>" aria-disabled="true" tabindex="-1">Previous</a></li>
|
||||
<li class="page-item disabled"><span class="page-link">Page 1 of 3</span></li>
|
||||
<li class="page-item "><a class="page-link" href="/operator/organizations/<org:members-paged>?m_page=2" hx-get="/operator/organizations/<org:members-paged>?m_page=2" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Next</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Entitlement changes</h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="entitlement-changes-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No entitlement changes recorded yet.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Tier changes <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Tier changes" data-bs-content="Every tier change on this organization's plan ladders, newest first. Tier names reflect the ladder's current shape." aria-label="Help: Tier changes"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button></h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="tier-changes-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No tier changes recorded.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
{
|
||||
"ActionError": "",
|
||||
"BillingSummary": {
|
||||
"HasAccount": false,
|
||||
"BillingAccountID": "",
|
||||
"AccountStatus": "",
|
||||
"SubscriptionCount": 0,
|
||||
"SubscriptionState": "",
|
||||
"SubscriptionNote": "",
|
||||
"DisplacementTitle": "",
|
||||
"DisplacementError": "",
|
||||
"HasInvoice": false,
|
||||
"LatestInvoiceID": "",
|
||||
"LatestInvoiceNumber": "",
|
||||
"LatestInvoiceDate": "",
|
||||
"InvoiceState": "",
|
||||
"OutstandingBalance": 0,
|
||||
"OutstandingBalanceFormatted": "",
|
||||
"Currency": ""
|
||||
},
|
||||
"EntitlementChanges": [],
|
||||
"EntitlementChangesError": "",
|
||||
"EntitlementChangesNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "ec_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
"GrantsError": "",
|
||||
"GrantsListQuery": "",
|
||||
"GrantsNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "Product or reason",
|
||||
"FacetParam": "tab",
|
||||
"FacetOptions": [
|
||||
{
|
||||
"Value": "",
|
||||
"Label": "Active"
|
||||
},
|
||||
{
|
||||
"Value": "history",
|
||||
"Label": "History"
|
||||
}
|
||||
],
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
{
|
||||
"ProductID": "<product:Basic>",
|
||||
"Name": "Basic",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Forum>",
|
||||
"Name": "Forum",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Forum2>",
|
||||
"Name": "Forum2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Large>",
|
||||
"Name": "Large",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Lite>",
|
||||
"Name": "Lite",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Lite2>",
|
||||
"Name": "Lite2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Mid>",
|
||||
"Name": "Mid",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Plus>",
|
||||
"Name": "Plus",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Pro>",
|
||||
"Name": "Pro",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Small>",
|
||||
"Name": "Small",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Small2>",
|
||||
"Name": "Small2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Starter>",
|
||||
"Name": "Starter",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Starter2>",
|
||||
"Name": "Starter2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Top>",
|
||||
"Name": "Top",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
}
|
||||
],
|
||||
"Members": [
|
||||
{
|
||||
"PersonID": "<person:Member-24>",
|
||||
"DisplayName": "Member-24",
|
||||
"Email": "member-24-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-23>",
|
||||
"DisplayName": "Member-23",
|
||||
"Email": "member-23-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-22>",
|
||||
"DisplayName": "Member-22",
|
||||
"Email": "member-22-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-21>",
|
||||
"DisplayName": "Member-21",
|
||||
"Email": "member-21-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-20>",
|
||||
"DisplayName": "Member-20",
|
||||
"Email": "member-20-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-19>",
|
||||
"DisplayName": "Member-19",
|
||||
"Email": "member-19-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-18>",
|
||||
"DisplayName": "Member-18",
|
||||
"Email": "member-18-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-17>",
|
||||
"DisplayName": "Member-17",
|
||||
"Email": "member-17-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-16>",
|
||||
"DisplayName": "Member-16",
|
||||
"Email": "member-16-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-15>",
|
||||
"DisplayName": "Member-15",
|
||||
"Email": "member-15-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
}
|
||||
],
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 24,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 24,
|
||||
"OrgID": "<org:members-paged>",
|
||||
"OrgKey": "",
|
||||
"OrgName": "members-paged",
|
||||
"OrgOwnerName": "Ann",
|
||||
"OrgOwnerPersonID": "<person:Ann>",
|
||||
"PoolMissing": false,
|
||||
"Pools": [
|
||||
{
|
||||
"PoolID": "<pool:members-paged>",
|
||||
"PoolName": "Default",
|
||||
"PoolType": "default",
|
||||
"Status": "active",
|
||||
"Deliveries": null,
|
||||
"Usage": null,
|
||||
"HasAttachment": false
|
||||
}
|
||||
],
|
||||
"ProductsError": "",
|
||||
"TierChangesNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "tc_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": null,
|
||||
"TransitionsError": "",
|
||||
"TransitionsTotal": 0
|
||||
}
|
||||
@@ -0,0 +1,603 @@
|
||||
|
||||
|
||||
<div class="d-flex align-items-start justify-content-between gap-3 mb-3 app-page-header">
|
||||
<div class="app-page-header-text">
|
||||
<nav aria-label="breadcrumb"><ol class="breadcrumb small mb-1">
|
||||
<li class="breadcrumb-item"><a href="/operator">Operator</a></li><li class="breadcrumb-item"><a href="/operator/organizations">Organizations</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">members-paged</li>
|
||||
</ol></nav>
|
||||
<h1 class="h2 mb-0">members-paged</h1>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-3">Owner</dt>
|
||||
<dd class="col-sm-9">
|
||||
|
||||
<a href="/operator/persons/<person:Ann>">Ann</a>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Billing</h2>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No billing account exists for this organization yet.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Pools <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Pools" data-bs-content="A pool holds what an organization's plan and grants deliver; its sites and services draw from it." aria-label="Help: Pools"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button></h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<h3 class="h6 mb-1">
|
||||
Default <span class="badge text-bg-success">Active</span>
|
||||
</h3>
|
||||
|
||||
|
||||
<p class="text-muted mb-0">No plan is delivering into this pool</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Grants</h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="plan-grants-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header d-flex justify-content-between align-items-center gap-2">
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:members-paged>?m_per=25" hx-get="/operator/organizations/<org:members-paged>?m_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:members-paged>?m_per=25&tab=history" hx-get="/operator/organizations/<org:members-paged>?m_per=25&tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="flex-shrink-0">
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" data-bs-toggle="collapse" data-bs-target="#issueGrantPanel" aria-expanded="false" aria-controls="issueGrantPanel"><svg class="app-opener-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>Issue grant</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="collapse" id="issueGrantPanel">
|
||||
|
||||
|
||||
<div class="card app-form-box mb-3"><div class="card-body">
|
||||
<form id="form-operator.enrollment.grant.issue" data-form="operator.enrollment.grant.issue" data-form-kind="create" class="app-form" novalidate hx-post="/partials/operator/organizations/<org:members-paged>/grant/create" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
||||
<div id="form-operator.enrollment.grant.issue-error" class="app-form-error"></div>
|
||||
|
||||
<div class="app-form-message mb-2">A tier product moves the pool to that tier, up or down.</div>
|
||||
|
||||
|
||||
|
||||
<div class="app-form-fields">
|
||||
<div id="form-operator.enrollment.grant.issue-product_id" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-product_id-control">Product</label>
|
||||
|
||||
<select class="form-select" id="form-operator.enrollment.grant.issue-product_id-control" name="product_id" required aria-describedby="form-operator.enrollment.grant.issue-product_id-warning" hx-get="/partials/operator/products/rule-check" hx-swap="innerHTML" hx-target="#form-operator\.enrollment\.grant\.issue-product_id-warning" hx-trigger="change">
|
||||
<option value="" disabled selected>Choose a product</option>
|
||||
<option value="<product:Basic>">Basic</option>
|
||||
<option value="<product:Forum>">Forum</option>
|
||||
<option value="<product:Forum2>">Forum2</option>
|
||||
<option value="<product:Large>">Large</option>
|
||||
<option value="<product:Lite>">Lite</option>
|
||||
<option value="<product:Lite2>">Lite2</option>
|
||||
<option value="<product:Mid>">Mid</option>
|
||||
<option value="<product:Plus>">Plus</option>
|
||||
<option value="<product:Pro>">Pro</option>
|
||||
<option value="<product:Small>">Small</option>
|
||||
<option value="<product:Small2>">Small2</option>
|
||||
<option value="<product:Starter>">Starter</option>
|
||||
<option value="<product:Starter2>">Starter2</option>
|
||||
<option value="<product:Top>">Top</option>
|
||||
|
||||
</select>
|
||||
|
||||
<div id="form-operator.enrollment.grant.issue-product_id-warning"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-quantity" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-quantity-control">Quantity <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Quantity" data-bs-content="Seats, for per-seat products." aria-label="Help: Quantity"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="number" class="form-control" id="form-operator.enrollment.grant.issue-quantity-control" name="quantity" value="" placeholder="1" min="1" max="1000000">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-valid_until" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-valid_until-control">Valid until <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Valid until" data-bs-content="Leave blank for a grant with no end date." aria-label="Help: Valid until"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="datetime-local" class="form-control" id="form-operator.enrollment.grant.issue-valid_until-control" name="valid_until" value="" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-reason" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-reason-control">Reason</label>
|
||||
|
||||
<select class="form-select" id="form-operator.enrollment.grant.issue-reason-control" name="reason" required>
|
||||
<option value="" disabled selected>Choose a reason</option>
|
||||
<option value="manual">manual</option>
|
||||
<option value="evaluation">evaluation</option>
|
||||
<option value="promotional">promotional</option>
|
||||
<option value="complimentary">complimentary</option>
|
||||
<option value="sponsored">sponsored</option>
|
||||
<option value="board_decision">board_decision</option>
|
||||
<option value="legacy">legacy</option>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-description" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-description-control">Note <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Note" data-bs-content="Why this grant is issued. Shown with the grant in its history." aria-label="Help: Note"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="text" class="form-control" id="form-operator.enrollment.grant.issue-description-control" name="description" value="" maxlength="500" autocomplete="off">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-resumes_after_supersession" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-resumes_after_supersession-control">Resumes</label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Resumes" data-bs-content="If a plan replaces this grant, the grant delivers again when that plan ends." aria-label="Help: Resumes"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<div class="app-form-check-control"><input class="form-check-input" type="checkbox" id="form-operator.enrollment.grant.issue-resumes_after_supersession-control" name="resumes_after_supersession" value="true" ></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
||||
|
||||
<button type="submit" class="btn btn-primary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Issue grant</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-toggle="collapse" data-bs-target="#issueGrantPanel">Cancel</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-2">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:members-paged>" role="search" hx-get="/operator/organizations/<org:members-paged>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
<input type="hidden" name="m_per" value="25" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-q-control" name="q" value="" placeholder="Product or reason" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No grants are delivering right now.</p>
|
||||
<p class="text-muted small mb-2">The History tab lists every grant ever issued.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
<span class="text-body-secondary small">24 members</span>
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-3">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls-m" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:members-paged>" role="search" hx-get="/operator/organizations/<org:members-paged>" hx-target="#members-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-m-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-m-m_q-control">Search members</label>
|
||||
<input type="hidden" name="m_per" value="25" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-m-m_q-control" name="m_q" value="" placeholder="Name or email" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm table-record">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
<th>Joined</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-24>">Member-24</a></th>
|
||||
<td><small class="text-muted">member-24-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-23>">Member-23</a></th>
|
||||
<td><small class="text-muted">member-23-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-22>">Member-22</a></th>
|
||||
<td><small class="text-muted">member-22-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-21>">Member-21</a></th>
|
||||
<td><small class="text-muted">member-21-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-20>">Member-20</a></th>
|
||||
<td><small class="text-muted">member-20-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-19>">Member-19</a></th>
|
||||
<td><small class="text-muted">member-19-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-18>">Member-18</a></th>
|
||||
<td><small class="text-muted">member-18-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-17>">Member-17</a></th>
|
||||
<td><small class="text-muted">member-17-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-16>">Member-16</a></th>
|
||||
<td><small class="text-muted">member-16-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-15>">Member-15</a></th>
|
||||
<td><small class="text-muted">member-15-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-14>">Member-14</a></th>
|
||||
<td><small class="text-muted">member-14-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-13>">Member-13</a></th>
|
||||
<td><small class="text-muted">member-13-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-12>">Member-12</a></th>
|
||||
<td><small class="text-muted">member-12-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-11>">Member-11</a></th>
|
||||
<td><small class="text-muted">member-11-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-10>">Member-10</a></th>
|
||||
<td><small class="text-muted">member-10-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-09>">Member-09</a></th>
|
||||
<td><small class="text-muted">member-09-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-08>">Member-08</a></th>
|
||||
<td><small class="text-muted">member-08-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-07>">Member-07</a></th>
|
||||
<td><small class="text-muted">member-07-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-06>">Member-06</a></th>
|
||||
<td><small class="text-muted">member-06-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-05>">Member-05</a></th>
|
||||
<td><small class="text-muted">member-05-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-04>">Member-04</a></th>
|
||||
<td><small class="text-muted">member-04-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-03>">Member-03</a></th>
|
||||
<td><small class="text-muted">member-03-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-02>">Member-02</a></th>
|
||||
<td><small class="text-muted">member-02-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-01>">Member-01</a></th>
|
||||
<td><small class="text-muted">member-01-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mt-2">
|
||||
<p class="small text-body-secondary mb-0">Showing 1–24 of 24</p>
|
||||
|
||||
<p class="small text-body-secondary mb-0">Per page:
|
||||
|
||||
<a href="/operator/organizations/<org:members-paged>" hx-get="/operator/organizations/<org:members-paged>" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">10</a>
|
||||
|
||||
<strong>25</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:members-paged>?m_per=50" hx-get="/operator/organizations/<org:members-paged>?m_per=50" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Entitlement changes</h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="entitlement-changes-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No entitlement changes recorded yet.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Tier changes <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Tier changes" data-bs-content="Every tier change on this organization's plan ladders, newest first. Tier names reflect the ladder's current shape." aria-label="Help: Tier changes"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button></h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="tier-changes-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No tier changes recorded.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,444 @@
|
||||
{
|
||||
"ActionError": "",
|
||||
"BillingSummary": {
|
||||
"HasAccount": false,
|
||||
"BillingAccountID": "",
|
||||
"AccountStatus": "",
|
||||
"SubscriptionCount": 0,
|
||||
"SubscriptionState": "",
|
||||
"SubscriptionNote": "",
|
||||
"DisplacementTitle": "",
|
||||
"DisplacementError": "",
|
||||
"HasInvoice": false,
|
||||
"LatestInvoiceID": "",
|
||||
"LatestInvoiceNumber": "",
|
||||
"LatestInvoiceDate": "",
|
||||
"InvoiceState": "",
|
||||
"OutstandingBalance": 0,
|
||||
"OutstandingBalanceFormatted": "",
|
||||
"Currency": ""
|
||||
},
|
||||
"EntitlementChanges": [],
|
||||
"EntitlementChangesError": "",
|
||||
"EntitlementChangesNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "ec_",
|
||||
"Extra": {
|
||||
"m_per": [
|
||||
"25"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
"GrantsError": "",
|
||||
"GrantsListQuery": "",
|
||||
"GrantsNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "Product or reason",
|
||||
"FacetParam": "tab",
|
||||
"FacetOptions": [
|
||||
{
|
||||
"Value": "",
|
||||
"Label": "Active"
|
||||
},
|
||||
{
|
||||
"Value": "history",
|
||||
"Label": "History"
|
||||
}
|
||||
],
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "",
|
||||
"Extra": {
|
||||
"m_per": [
|
||||
"25"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
{
|
||||
"ProductID": "<product:Basic>",
|
||||
"Name": "Basic",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Forum>",
|
||||
"Name": "Forum",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Forum2>",
|
||||
"Name": "Forum2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Large>",
|
||||
"Name": "Large",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Lite>",
|
||||
"Name": "Lite",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Lite2>",
|
||||
"Name": "Lite2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Mid>",
|
||||
"Name": "Mid",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Plus>",
|
||||
"Name": "Plus",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Pro>",
|
||||
"Name": "Pro",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Small>",
|
||||
"Name": "Small",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Small2>",
|
||||
"Name": "Small2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Starter>",
|
||||
"Name": "Starter",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Starter2>",
|
||||
"Name": "Starter2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Top>",
|
||||
"Name": "Top",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
}
|
||||
],
|
||||
"Members": [
|
||||
{
|
||||
"PersonID": "<person:Member-24>",
|
||||
"DisplayName": "Member-24",
|
||||
"Email": "member-24-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-23>",
|
||||
"DisplayName": "Member-23",
|
||||
"Email": "member-23-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-22>",
|
||||
"DisplayName": "Member-22",
|
||||
"Email": "member-22-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-21>",
|
||||
"DisplayName": "Member-21",
|
||||
"Email": "member-21-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-20>",
|
||||
"DisplayName": "Member-20",
|
||||
"Email": "member-20-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-19>",
|
||||
"DisplayName": "Member-19",
|
||||
"Email": "member-19-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-18>",
|
||||
"DisplayName": "Member-18",
|
||||
"Email": "member-18-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-17>",
|
||||
"DisplayName": "Member-17",
|
||||
"Email": "member-17-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-16>",
|
||||
"DisplayName": "Member-16",
|
||||
"Email": "member-16-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-15>",
|
||||
"DisplayName": "Member-15",
|
||||
"Email": "member-15-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-14>",
|
||||
"DisplayName": "Member-14",
|
||||
"Email": "member-14-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-13>",
|
||||
"DisplayName": "Member-13",
|
||||
"Email": "member-13-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-12>",
|
||||
"DisplayName": "Member-12",
|
||||
"Email": "member-12-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-11>",
|
||||
"DisplayName": "Member-11",
|
||||
"Email": "member-11-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-10>",
|
||||
"DisplayName": "Member-10",
|
||||
"Email": "member-10-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-09>",
|
||||
"DisplayName": "Member-09",
|
||||
"Email": "member-09-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-08>",
|
||||
"DisplayName": "Member-08",
|
||||
"Email": "member-08-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-07>",
|
||||
"DisplayName": "Member-07",
|
||||
"Email": "member-07-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-06>",
|
||||
"DisplayName": "Member-06",
|
||||
"Email": "member-06-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-05>",
|
||||
"DisplayName": "Member-05",
|
||||
"Email": "member-05-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-04>",
|
||||
"DisplayName": "Member-04",
|
||||
"Email": "member-04-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-03>",
|
||||
"DisplayName": "Member-03",
|
||||
"Email": "member-03-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-02>",
|
||||
"DisplayName": "Member-02",
|
||||
"Email": "member-02-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-01>",
|
||||
"DisplayName": "Member-01",
|
||||
"Email": "member-01-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
}
|
||||
],
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 24,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 25,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 24,
|
||||
"OrgID": "<org:members-paged>",
|
||||
"OrgKey": "",
|
||||
"OrgName": "members-paged",
|
||||
"OrgOwnerName": "Ann",
|
||||
"OrgOwnerPersonID": "<person:Ann>",
|
||||
"PoolMissing": false,
|
||||
"Pools": [
|
||||
{
|
||||
"PoolID": "<pool:members-paged>",
|
||||
"PoolName": "Default",
|
||||
"PoolType": "default",
|
||||
"Status": "active",
|
||||
"Deliveries": null,
|
||||
"Usage": null,
|
||||
"HasAttachment": false
|
||||
}
|
||||
],
|
||||
"ProductsError": "",
|
||||
"TierChangesNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "tc_",
|
||||
"Extra": {
|
||||
"m_per": [
|
||||
"25"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": null,
|
||||
"TransitionsError": "",
|
||||
"TransitionsTotal": 0
|
||||
}
|
||||
@@ -0,0 +1,473 @@
|
||||
|
||||
|
||||
<div class="d-flex align-items-start justify-content-between gap-3 mb-3 app-page-header">
|
||||
<div class="app-page-header-text">
|
||||
<nav aria-label="breadcrumb"><ol class="breadcrumb small mb-1">
|
||||
<li class="breadcrumb-item"><a href="/operator">Operator</a></li><li class="breadcrumb-item"><a href="/operator/organizations">Organizations</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">members-paged</li>
|
||||
</ol></nav>
|
||||
<h1 class="h2 mb-0">members-paged</h1>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-3">Owner</dt>
|
||||
<dd class="col-sm-9">
|
||||
|
||||
<a href="/operator/persons/<person:Ann>">Ann</a>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Billing</h2>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No billing account exists for this organization yet.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Pools <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Pools" data-bs-content="A pool holds what an organization's plan and grants deliver; its sites and services draw from it." aria-label="Help: Pools"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button></h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<h3 class="h6 mb-1">
|
||||
Default <span class="badge text-bg-success">Active</span>
|
||||
</h3>
|
||||
|
||||
|
||||
<p class="text-muted mb-0">No plan is delivering into this pool</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Grants</h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="plan-grants-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header d-flex justify-content-between align-items-center gap-2">
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:members-paged>?m_q=MEMBER-2" hx-get="/operator/organizations/<org:members-paged>?m_q=MEMBER-2" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:members-paged>?m_q=MEMBER-2&tab=history" hx-get="/operator/organizations/<org:members-paged>?m_q=MEMBER-2&tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="flex-shrink-0">
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" data-bs-toggle="collapse" data-bs-target="#issueGrantPanel" aria-expanded="false" aria-controls="issueGrantPanel"><svg class="app-opener-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>Issue grant</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="collapse" id="issueGrantPanel">
|
||||
|
||||
|
||||
<div class="card app-form-box mb-3"><div class="card-body">
|
||||
<form id="form-operator.enrollment.grant.issue" data-form="operator.enrollment.grant.issue" data-form-kind="create" class="app-form" novalidate hx-post="/partials/operator/organizations/<org:members-paged>/grant/create" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
||||
<div id="form-operator.enrollment.grant.issue-error" class="app-form-error"></div>
|
||||
|
||||
<div class="app-form-message mb-2">A tier product moves the pool to that tier, up or down.</div>
|
||||
|
||||
|
||||
|
||||
<div class="app-form-fields">
|
||||
<div id="form-operator.enrollment.grant.issue-product_id" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-product_id-control">Product</label>
|
||||
|
||||
<select class="form-select" id="form-operator.enrollment.grant.issue-product_id-control" name="product_id" required aria-describedby="form-operator.enrollment.grant.issue-product_id-warning" hx-get="/partials/operator/products/rule-check" hx-swap="innerHTML" hx-target="#form-operator\.enrollment\.grant\.issue-product_id-warning" hx-trigger="change">
|
||||
<option value="" disabled selected>Choose a product</option>
|
||||
<option value="<product:Basic>">Basic</option>
|
||||
<option value="<product:Forum>">Forum</option>
|
||||
<option value="<product:Forum2>">Forum2</option>
|
||||
<option value="<product:Large>">Large</option>
|
||||
<option value="<product:Lite>">Lite</option>
|
||||
<option value="<product:Lite2>">Lite2</option>
|
||||
<option value="<product:Mid>">Mid</option>
|
||||
<option value="<product:Plus>">Plus</option>
|
||||
<option value="<product:Pro>">Pro</option>
|
||||
<option value="<product:Small>">Small</option>
|
||||
<option value="<product:Small2>">Small2</option>
|
||||
<option value="<product:Starter>">Starter</option>
|
||||
<option value="<product:Starter2>">Starter2</option>
|
||||
<option value="<product:Top>">Top</option>
|
||||
|
||||
</select>
|
||||
|
||||
<div id="form-operator.enrollment.grant.issue-product_id-warning"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-quantity" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-quantity-control">Quantity <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Quantity" data-bs-content="Seats, for per-seat products." aria-label="Help: Quantity"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="number" class="form-control" id="form-operator.enrollment.grant.issue-quantity-control" name="quantity" value="" placeholder="1" min="1" max="1000000">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-valid_until" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-valid_until-control">Valid until <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Valid until" data-bs-content="Leave blank for a grant with no end date." aria-label="Help: Valid until"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="datetime-local" class="form-control" id="form-operator.enrollment.grant.issue-valid_until-control" name="valid_until" value="" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-reason" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-reason-control">Reason</label>
|
||||
|
||||
<select class="form-select" id="form-operator.enrollment.grant.issue-reason-control" name="reason" required>
|
||||
<option value="" disabled selected>Choose a reason</option>
|
||||
<option value="manual">manual</option>
|
||||
<option value="evaluation">evaluation</option>
|
||||
<option value="promotional">promotional</option>
|
||||
<option value="complimentary">complimentary</option>
|
||||
<option value="sponsored">sponsored</option>
|
||||
<option value="board_decision">board_decision</option>
|
||||
<option value="legacy">legacy</option>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-description" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-description-control">Note <span class="text-muted">(optional)</span></label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Note" data-bs-content="Why this grant is issued. Shown with the grant in its history." aria-label="Help: Note"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<input type="text" class="form-control" id="form-operator.enrollment.grant.issue-description-control" name="description" value="" maxlength="500" autocomplete="off">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><div id="form-operator.enrollment.grant.issue-resumes_after_supersession" class="mb-3 app-form-field">
|
||||
|
||||
|
||||
|
||||
<label class="form-label" for="form-operator.enrollment.grant.issue-resumes_after_supersession-control">Resumes</label> <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Resumes" data-bs-content="If a plan replaces this grant, the grant delivers again when that plan ends." aria-label="Help: Resumes"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button>
|
||||
|
||||
<div class="app-form-check-control"><input class="form-check-input" type="checkbox" id="form-operator.enrollment.grant.issue-resumes_after_supersession-control" name="resumes_after_supersession" value="true" ></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
||||
|
||||
<button type="submit" class="btn btn-primary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Issue grant</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-toggle="collapse" data-bs-target="#issueGrantPanel">Cancel</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-2">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:members-paged>" role="search" hx-get="/operator/organizations/<org:members-paged>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
<input type="hidden" name="m_q" value="MEMBER-2" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-q-control" name="q" value="" placeholder="Product or reason" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No grants are delivering right now.</p>
|
||||
<p class="text-muted small mb-2">The History tab lists every grant ever issued.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
<span class="text-body-secondary small">5 members</span>
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-3">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls-m" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:members-paged>" role="search" hx-get="/operator/organizations/<org:members-paged>" hx-target="#members-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-m-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-m-m_q-control">Search members</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-m-m_q-control" name="m_q" value="MEMBER-2" placeholder="Name or email" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
<a href="/operator/organizations/<org:members-paged>" class="btn btn-outline-secondary" hx-get="/operator/organizations/<org:members-paged>" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Clear</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm table-record">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
<th>Joined</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-24>">Member-24</a></th>
|
||||
<td><small class="text-muted">member-24-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-23>">Member-23</a></th>
|
||||
<td><small class="text-muted">member-23-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-22>">Member-22</a></th>
|
||||
<td><small class="text-muted">member-22-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-21>">Member-21</a></th>
|
||||
<td><small class="text-muted">member-21-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><a href="/operator/persons/<person:Member-20>">Member-20</a></th>
|
||||
<td><small class="text-muted">member-20-@example.test</small></td>
|
||||
<td>member</td>
|
||||
<td class="text-nowrap"><small><today></small></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mt-2">
|
||||
<p class="small text-body-secondary mb-0">Showing 1–5 of 5</p>
|
||||
|
||||
<p class="small text-body-secondary mb-0">Per page:
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:members-paged>?m_per=25&m_q=MEMBER-2" hx-get="/operator/organizations/<org:members-paged>?m_per=25&m_q=MEMBER-2" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:members-paged>?m_per=50&m_q=MEMBER-2" hx-get="/operator/organizations/<org:members-paged>?m_per=50&m_q=MEMBER-2" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Entitlement changes</h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="entitlement-changes-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No entitlement changes recorded yet.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Tier changes <button type="button" class="btn btn-link p-0 border-0 align-baseline app-help-icon" data-bs-toggle="popover" data-bs-trigger="click" data-bs-title="Tier changes" data-bs-content="Every tier change on this organization's plan ladders, newest first. Tier names reflect the ladder's current shape." aria-label="Help: Tier changes"><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></button></h2>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="tier-changes-panel">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No tier changes recorded.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
{
|
||||
"ActionError": "",
|
||||
"BillingSummary": {
|
||||
"HasAccount": false,
|
||||
"BillingAccountID": "",
|
||||
"AccountStatus": "",
|
||||
"SubscriptionCount": 0,
|
||||
"SubscriptionState": "",
|
||||
"SubscriptionNote": "",
|
||||
"DisplacementTitle": "",
|
||||
"DisplacementError": "",
|
||||
"HasInvoice": false,
|
||||
"LatestInvoiceID": "",
|
||||
"LatestInvoiceNumber": "",
|
||||
"LatestInvoiceDate": "",
|
||||
"InvoiceState": "",
|
||||
"OutstandingBalance": 0,
|
||||
"OutstandingBalanceFormatted": "",
|
||||
"Currency": ""
|
||||
},
|
||||
"EntitlementChanges": [],
|
||||
"EntitlementChangesError": "",
|
||||
"EntitlementChangesNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "ec_",
|
||||
"Extra": {
|
||||
"m_q": [
|
||||
"MEMBER-2"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
"GrantsError": "",
|
||||
"GrantsListQuery": "",
|
||||
"GrantsNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "Product or reason",
|
||||
"FacetParam": "tab",
|
||||
"FacetOptions": [
|
||||
{
|
||||
"Value": "",
|
||||
"Label": "Active"
|
||||
},
|
||||
{
|
||||
"Value": "history",
|
||||
"Label": "History"
|
||||
}
|
||||
],
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "",
|
||||
"Extra": {
|
||||
"m_q": [
|
||||
"MEMBER-2"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
{
|
||||
"ProductID": "<product:Basic>",
|
||||
"Name": "Basic",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Forum>",
|
||||
"Name": "Forum",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Forum2>",
|
||||
"Name": "Forum2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Large>",
|
||||
"Name": "Large",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Lite>",
|
||||
"Name": "Lite",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Lite2>",
|
||||
"Name": "Lite2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Mid>",
|
||||
"Name": "Mid",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Plus>",
|
||||
"Name": "Plus",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Pro>",
|
||||
"Name": "Pro",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Small>",
|
||||
"Name": "Small",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Small2>",
|
||||
"Name": "Small2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Starter>",
|
||||
"Name": "Starter",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Starter2>",
|
||||
"Name": "Starter2",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
},
|
||||
{
|
||||
"ProductID": "<product:Top>",
|
||||
"Name": "Top",
|
||||
"IsInternal": false,
|
||||
"DisplayCategory": "",
|
||||
"SupersedesSubscription": false,
|
||||
"SupersededLadders": null
|
||||
}
|
||||
],
|
||||
"Members": [
|
||||
{
|
||||
"PersonID": "<person:Member-24>",
|
||||
"DisplayName": "Member-24",
|
||||
"Email": "member-24-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-23>",
|
||||
"DisplayName": "Member-23",
|
||||
"Email": "member-23-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-22>",
|
||||
"DisplayName": "Member-22",
|
||||
"Email": "member-22-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-21>",
|
||||
"DisplayName": "Member-21",
|
||||
"Email": "member-21-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
},
|
||||
{
|
||||
"PersonID": "<person:Member-20>",
|
||||
"DisplayName": "Member-20",
|
||||
"Email": "member-20-@example.test",
|
||||
"RoleName": "member",
|
||||
"JoinedAt": "<today>"
|
||||
}
|
||||
],
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "MEMBER-2",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 5,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 5,
|
||||
"OrgID": "<org:members-paged>",
|
||||
"OrgKey": "",
|
||||
"OrgName": "members-paged",
|
||||
"OrgOwnerName": "Ann",
|
||||
"OrgOwnerPersonID": "<person:Ann>",
|
||||
"PoolMissing": false,
|
||||
"Pools": [
|
||||
{
|
||||
"PoolID": "<pool:members-paged>",
|
||||
"PoolName": "Default",
|
||||
"PoolType": "default",
|
||||
"Status": "active",
|
||||
"Deliveries": null,
|
||||
"Usage": null,
|
||||
"HasAttachment": false
|
||||
}
|
||||
],
|
||||
"ProductsError": "",
|
||||
"TierChangesNav": {
|
||||
"BasePath": "/operator/organizations/<org:members-paged>",
|
||||
"SearchPlaceholder": "",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "tc_",
|
||||
"Extra": {
|
||||
"m_q": [
|
||||
"MEMBER-2"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": null,
|
||||
"TransitionsError": "",
|
||||
"TransitionsTotal": 0
|
||||
}
|
||||
+21
-1
@@ -34,6 +34,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
},
|
||||
@@ -55,14 +56,32 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": null,
|
||||
"Members": null,
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "",
|
||||
"SearchPlaceholder": "",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 0,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "",
|
||||
"Extra": null,
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<uuid>",
|
||||
"OrgKey": "",
|
||||
@@ -86,6 +105,7 @@
|
||||
"PerPage": 0,
|
||||
"DefaultPerPage": 0,
|
||||
"PerPageOptions": null,
|
||||
"SearchLabel": "",
|
||||
"Target": "",
|
||||
"SyncSelect": ""
|
||||
},
|
||||
|
||||
+10
-6
@@ -80,9 +80,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:no-pool>" hx-get="/operator/organizations/<org:no-pool>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:no-pool>" hx-get="/operator/organizations/<org:no-pool>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:no-pool>?tab=history" hx-get="/operator/organizations/<org:no-pool>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:no-pool>?tab=history" hx-get="/operator/organizations/<org:no-pool>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:no-pool>" role="search" hx-get="/operator/organizations/<org:no-pool>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:no-pool>" role="search" hx-get="/operator/organizations/<org:no-pool>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -149,6 +149,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -157,8 +159,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -167,9 +169,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
+28
-4
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
@@ -191,8 +193,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:no-pool>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:no-pool>",
|
||||
"OrgKey": "",
|
||||
@@ -220,8 +243,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": null,
|
||||
"TransitionsError": "",
|
||||
|
||||
+12
-8
@@ -95,9 +95,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:removed-tier>" hx-get="/operator/organizations/<org:removed-tier>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:removed-tier>" hx-get="/operator/organizations/<org:removed-tier>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:removed-tier>?tab=history" hx-get="/operator/organizations/<org:removed-tier>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:removed-tier>?tab=history" hx-get="/operator/organizations/<org:removed-tier>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:removed-tier>" role="search" hx-get="/operator/organizations/<org:removed-tier>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:removed-tier>" role="search" hx-get="/operator/organizations/<org:removed-tier>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -291,6 +291,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -299,8 +301,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -309,9 +311,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -404,9 +408,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:removed-tier>?tc_per=25" hx-get="/operator/organizations/<org:removed-tier>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:removed-tier>?tc_per=25" hx-get="/operator/organizations/<org:removed-tier>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:removed-tier>?tc_per=50" hx-get="/operator/organizations/<org:removed-tier>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:removed-tier>?tc_per=50" hx-get="/operator/organizations/<org:removed-tier>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
+28
-4
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
@@ -191,8 +193,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:removed-tier>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:removed-tier>",
|
||||
"OrgKey": "",
|
||||
@@ -230,8 +253,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
|
||||
|
||||
<div class="table-responsive mt-2">
|
||||
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -162,9 +163,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:rich>?q=Plus&tc_per=25" hx-get="/operator/organizations/<org:rich>?q=Plus&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:rich>?q=Plus&tc_per=25" hx-get="/operator/organizations/<org:rich>?q=Plus&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -315,7 +316,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:rich>" role="search" hx-get="/operator/organizations/<org:rich>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:rich>" role="search" hx-get="/operator/organizations/<org:rich>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -323,7 +324,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
<input type="hidden" name="tc_per" value="25" ><input type="hidden" name="tab" value="history" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -333,7 +334,7 @@
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary" hx-get="/operator/organizations/<org:rich>?tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-swap="innerHTML">Clear</button>
|
||||
<a href="/operator/organizations/<org:rich>?tab=history&tc_per=25" class="btn btn-outline-secondary" hx-get="/operator/organizations/<org:rich>?tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Clear</a>
|
||||
|
||||
|
||||
|
||||
@@ -437,9 +438,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?per=25&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?per=25&q=Plus&tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:rich>?per=25&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?per=25&q=Plus&tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?per=50&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?per=50&q=Plus&tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:rich>?per=50&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?per=50&q=Plus&tab=history&tc_per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -453,6 +454,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -462,6 +465,41 @@
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-3">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls-m" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:rich>" role="search" hx-get="/operator/organizations/<org:rich>" hx-target="#members-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-m-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-m-m_q-control">Search members</label>
|
||||
<input type="hidden" name="q" value="Plus" ><input type="hidden" name="tab" value="history" ><input type="hidden" name="tc_per" value="25" >
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-m-m_q-control" name="m_q" value="" placeholder="Name or email" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm table-record">
|
||||
<thead>
|
||||
@@ -500,8 +538,27 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mt-2">
|
||||
<p class="small text-body-secondary mb-0">Showing 1–3 of 3</p>
|
||||
|
||||
<p class="small text-body-secondary mb-0">Per page:
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?m_per=25&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?m_per=25&q=Plus&tab=history&tc_per=25" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?m_per=50&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?m_per=50&q=Plus&tab=history&tc_per=25" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -551,9 +608,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=25&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?ec_per=25&q=Plus&tab=history&tc_per=25" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=25&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?ec_per=25&q=Plus&tab=history&tc_per=25" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=50&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?ec_per=50&q=Plus&tab=history&tc_per=25" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=50&q=Plus&tab=history&tc_per=25" hx-get="/operator/organizations/<org:rich>?ec_per=50&q=Plus&tab=history&tc_per=25" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -688,11 +745,11 @@
|
||||
|
||||
<p class="small text-body-secondary mb-0">Per page:
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?q=Plus&tab=history" hx-get="/operator/organizations/<org:rich>?q=Plus&tab=history" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">10</a>
|
||||
<a href="/operator/organizations/<org:rich>?q=Plus&tab=history" hx-get="/operator/organizations/<org:rich>?q=Plus&tab=history" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">10</a>
|
||||
|
||||
<strong>25</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=50" hx-get="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=50" hx-get="/operator/organizations/<org:rich>?q=Plus&tab=history&tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -64,8 +64,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 1,
|
||||
"Error": "",
|
||||
@@ -102,8 +103,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 2,
|
||||
"IssuanceProducts": [
|
||||
@@ -243,8 +245,39 @@
|
||||
"JoinedAt": "<today>"
|
||||
}
|
||||
],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:rich>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 3,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {
|
||||
"q": [
|
||||
"Plus"
|
||||
],
|
||||
"tab": [
|
||||
"history"
|
||||
],
|
||||
"tc_per": [
|
||||
"25"
|
||||
]
|
||||
},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 3,
|
||||
"OrgID": "<org:rich>",
|
||||
"OrgKey": "",
|
||||
@@ -332,8 +365,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
+67
-10
@@ -116,6 +116,7 @@
|
||||
|
||||
|
||||
<div class="table-responsive mt-2">
|
||||
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -162,9 +163,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:rich>" hx-get="/operator/organizations/<org:rich>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:rich>" hx-get="/operator/organizations/<org:rich>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:rich>?tab=history" hx-get="/operator/organizations/<org:rich>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:rich>?tab=history" hx-get="/operator/organizations/<org:rich>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -315,7 +316,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:rich>" role="search" hx-get="/operator/organizations/<org:rich>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:rich>" role="search" hx-get="/operator/organizations/<org:rich>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -323,7 +324,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -416,9 +417,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?per=25" hx-get="/operator/organizations/<org:rich>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:rich>?per=25" hx-get="/operator/organizations/<org:rich>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?per=50" hx-get="/operator/organizations/<org:rich>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:rich>?per=50" hx-get="/operator/organizations/<org:rich>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -432,6 +433,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -441,6 +444,41 @@
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center gap-2 mb-3">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls-m" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:rich>" role="search" hx-get="/operator/organizations/<org:rich>" hx-target="#members-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-m-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-m-m_q-control">Search members</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
<input type="text" class="form-control" id="form-operator.list.controls-m-m_q-control" name="m_q" value="" placeholder="Name or email" autocomplete="off">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Search</button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm table-record">
|
||||
<thead>
|
||||
@@ -479,8 +517,27 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mt-2">
|
||||
<p class="small text-body-secondary mb-0">Showing 1–3 of 3</p>
|
||||
|
||||
<p class="small text-body-secondary mb-0">Per page:
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?m_per=25" hx-get="/operator/organizations/<org:rich>?m_per=25" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?m_per=50" hx-get="/operator/organizations/<org:rich>?m_per=50" hx-target="#members-panel" hx-select="#members-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -530,9 +587,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=25" hx-get="/operator/organizations/<org:rich>?ec_per=25" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=25" hx-get="/operator/organizations/<org:rich>?ec_per=25" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=50" hx-get="/operator/organizations/<org:rich>?ec_per=50" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:rich>?ec_per=50" hx-get="/operator/organizations/<org:rich>?ec_per=50" hx-target="#entitlement-changes-panel" hx-select="#entitlement-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#tier-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -669,9 +726,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?tc_per=25" hx-get="/operator/organizations/<org:rich>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:rich>?tc_per=25" hx-get="/operator/organizations/<org:rich>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:rich>?tc_per=50" hx-get="/operator/organizations/<org:rich>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:rich>?tc_per=50" hx-get="/operator/organizations/<org:rich>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
+28
-4
@@ -54,8 +54,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 1,
|
||||
"Error": "",
|
||||
@@ -88,8 +89,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 1,
|
||||
"IssuanceProducts": [
|
||||
@@ -229,8 +231,29 @@
|
||||
"JoinedAt": "<today>"
|
||||
}
|
||||
],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:rich>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 3,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 3,
|
||||
"OrgID": "<org:rich>",
|
||||
"OrgKey": "",
|
||||
@@ -311,8 +334,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
+14
-10
@@ -124,9 +124,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:second-pool>" hx-get="/operator/organizations/<org:second-pool>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:second-pool>" hx-get="/operator/organizations/<org:second-pool>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:second-pool>?tab=history" hx-get="/operator/organizations/<org:second-pool>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:second-pool>?tab=history" hx-get="/operator/organizations/<org:second-pool>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:second-pool>" role="search" hx-get="/operator/organizations/<org:second-pool>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:second-pool>" role="search" hx-get="/operator/organizations/<org:second-pool>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -396,9 +396,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:second-pool>?per=25" hx-get="/operator/organizations/<org:second-pool>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:second-pool>?per=25" hx-get="/operator/organizations/<org:second-pool>?per=25" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:second-pool>?per=50" hx-get="/operator/organizations/<org:second-pool>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:second-pool>?per=50" hx-get="/operator/organizations/<org:second-pool>?per=50" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -412,6 +412,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -420,8 +422,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -430,9 +432,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -525,9 +529,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:second-pool>?tc_per=25" hx-get="/operator/organizations/<org:second-pool>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:second-pool>?tc_per=25" hx-get="/operator/organizations/<org:second-pool>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:second-pool>?tc_per=50" hx-get="/operator/organizations/<org:second-pool>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:second-pool>?tc_per=50" hx-get="/operator/organizations/<org:second-pool>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
+28
-4
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 2,
|
||||
"IssuanceProducts": [
|
||||
@@ -191,8 +193,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:second-pool>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:second-pool>",
|
||||
"OrgKey": "",
|
||||
@@ -267,8 +290,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:suspended-subscription>" hx-get="/operator/organizations/<org:suspended-subscription>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:suspended-subscription>" hx-get="/operator/organizations/<org:suspended-subscription>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:suspended-subscription>?tab=history" hx-get="/operator/organizations/<org:suspended-subscription>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:suspended-subscription>?tab=history" hx-get="/operator/organizations/<org:suspended-subscription>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:suspended-subscription>" role="search" hx-get="/operator/organizations/<org:suspended-subscription>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:suspended-subscription>" role="search" hx-get="/operator/organizations/<org:suspended-subscription>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -313,6 +313,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -321,8 +323,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -331,9 +333,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -414,9 +418,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:suspended-subscription>?tc_per=25" hx-get="/operator/organizations/<org:suspended-subscription>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:suspended-subscription>?tc_per=25" hx-get="/operator/organizations/<org:suspended-subscription>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:suspended-subscription>?tc_per=50" hx-get="/operator/organizations/<org:suspended-subscription>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:suspended-subscription>?tc_per=50" hx-get="/operator/organizations/<org:suspended-subscription>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
@@ -191,8 +193,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:suspended-subscription>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:suspended-subscription>",
|
||||
"OrgKey": "",
|
||||
@@ -244,8 +267,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
@@ -119,9 +119,9 @@
|
||||
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:two-ladder-subscription>" hx-get="/operator/organizations/<org:two-ladder-subscription>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="/operator/organizations/<org:two-ladder-subscription>" hx-get="/operator/organizations/<org:two-ladder-subscription>" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">Active</a></li>
|
||||
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:two-ladder-subscription>?tab=history" hx-get="/operator/organizations/<org:two-ladder-subscription>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
<li class="nav-item"><a class="nav-link " href="/operator/organizations/<org:two-ladder-subscription>?tab=history" hx-get="/operator/organizations/<org:two-ladder-subscription>?tab=history" hx-target="#plan-grants-panel" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">History</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
|
||||
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:two-ladder-subscription>" role="search" hx-get="/operator/organizations/<org:two-ladder-subscription>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#tier-changes-panel,#entitlement-changes-panel">
|
||||
<form id="form-operator.list.controls" data-form="operator.list.controls" data-form-kind="search" class="app-form app-form-bar" method="GET" action="/operator/organizations/<org:two-ladder-subscription>" role="search" hx-get="/operator/organizations/<org:two-ladder-subscription>" hx-target="#plan-grants-panel" hx-swap="outerHTML" hx-push-url="true" hx-select="#plan-grants-panel" hx-select-oob="#members-panel,#tier-changes-panel,#entitlement-changes-panel">
|
||||
<div id="form-operator.list.controls-error" class="app-form-error"></div>
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
|
||||
|
||||
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search this list</label>
|
||||
<label class="form-label visually-hidden" for="form-operator.list.controls-q-control">Search grants</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.44.44.98.98l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.98-.98zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/></svg></span>
|
||||
@@ -303,6 +303,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="members-panel">
|
||||
<div class="d-flex align-items-center justify-content-between gap-3 mt-4 mb-2 app-section-header">
|
||||
<h2 class="h5 mb-0">Members</h2>
|
||||
|
||||
@@ -311,8 +313,8 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="text-center py-4">
|
||||
<p class="text-muted mb-2">No members.</p>
|
||||
@@ -321,9 +323,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -416,9 +420,9 @@
|
||||
|
||||
<strong>10</strong>
|
||||
|
||||
<a href="/operator/organizations/<org:two-ladder-subscription>?tc_per=25" hx-get="/operator/organizations/<org:two-ladder-subscription>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
<a href="/operator/organizations/<org:two-ladder-subscription>?tc_per=25" hx-get="/operator/organizations/<org:two-ladder-subscription>?tc_per=25" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">25</a>
|
||||
|
||||
<a href="/operator/organizations/<org:two-ladder-subscription>?tc_per=50" hx-get="/operator/organizations/<org:two-ladder-subscription>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
<a href="/operator/organizations/<org:two-ladder-subscription>?tc_per=50" hx-get="/operator/organizations/<org:two-ladder-subscription>?tc_per=50" hx-target="#tier-changes-panel" hx-select="#tier-changes-panel" hx-select-oob="#members-panel,#plan-grants-panel,#entitlement-changes-panel" hx-swap="outerHTML" hx-push-url="true">50</a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -38,8 +38,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#entitlement-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#tier-changes-panel"
|
||||
},
|
||||
"EntitlementChangesTotal": 0,
|
||||
"Error": "",
|
||||
@@ -72,8 +73,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search grants",
|
||||
"Target": "#plan-grants-panel",
|
||||
"SyncSelect": "#tier-changes-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"GrantsTotal": 0,
|
||||
"IssuanceProducts": [
|
||||
@@ -101,8 +103,29 @@
|
||||
}
|
||||
],
|
||||
"Members": [],
|
||||
"MembersCapped": false,
|
||||
"MembersError": "",
|
||||
"MembersNav": {
|
||||
"BasePath": "/operator/organizations/<org:two-ladder-subscription>",
|
||||
"SearchPlaceholder": "Name or email",
|
||||
"FacetParam": "",
|
||||
"FacetOptions": null,
|
||||
"Q": "",
|
||||
"Facet": "",
|
||||
"Page": 1,
|
||||
"Total": 0,
|
||||
"ParamPrefix": "m_",
|
||||
"Extra": {},
|
||||
"PerPage": 10,
|
||||
"DefaultPerPage": 10,
|
||||
"PerPageOptions": [
|
||||
10,
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "Search members",
|
||||
"Target": "#members-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"MembersTotal": 0,
|
||||
"OrgID": "<org:two-ladder-subscription>",
|
||||
"OrgKey": "",
|
||||
@@ -159,8 +182,9 @@
|
||||
25,
|
||||
50
|
||||
],
|
||||
"SearchLabel": "",
|
||||
"Target": "#tier-changes-panel",
|
||||
"SyncSelect": "#plan-grants-panel,#entitlement-changes-panel"
|
||||
"SyncSelect": "#members-panel,#plan-grants-panel,#entitlement-changes-panel"
|
||||
},
|
||||
"Transitions": [
|
||||
{
|
||||
|
||||
@@ -551,6 +551,62 @@ func TestFormPartLinkCommitLeavesTheConsole(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// A panel way out (forms.PanelLinkOut) is the scoped request a governed
|
||||
// list's own search makes: it selects its panel out of the whole page,
|
||||
// refreshes the sibling panels and pushes the URL. A scoped way out for a
|
||||
// partial route (ScopedLinkOut) renders none of those.
|
||||
func TestFormPartPanelWayOutCarriesTheListsScoping(t *testing.T) {
|
||||
spec := forms.FormSpec{
|
||||
Name: "test.panel-way-out", Kind: forms.KindSearch, Family: forms.Bar,
|
||||
Method: "GET", Path: "/things", Commit: "Search",
|
||||
Fields: []forms.Field{{Name: "q", Label: "Search", Control: forms.Text, Optional: true}},
|
||||
}
|
||||
// The way out alone: the search form's own tag carries its own scoping.
|
||||
render := func(out forms.WayOut) string {
|
||||
t.Helper()
|
||||
spec.WayOut = out
|
||||
form := renderFormPart(t, forms.Render(spec, forms.Binding{Mode: forms.ModeRecord}))
|
||||
open, end := `<button type="button"`, "</button>"
|
||||
if strings.Contains(form, `<a href=`) {
|
||||
open, end = `<a href=`, "</a>"
|
||||
}
|
||||
i := strings.Index(form, open)
|
||||
if i < 0 {
|
||||
t.Fatalf("the form renders no way-out control:\n%s", form)
|
||||
}
|
||||
return form[i : i+strings.Index(form[i:], end)]
|
||||
}
|
||||
|
||||
got := render(forms.PanelLinkOut("Clear", "/things?x=1", "#things-panel", "#a-panel,#b-panel"))
|
||||
for _, want := range []string{
|
||||
`<a href="/things?x=1"`, `class="btn btn-outline-secondary"`,
|
||||
`hx-get="/things?x=1"`, `hx-target="#things-panel"`, `hx-select="#things-panel"`,
|
||||
`hx-select-oob="#a-panel,#b-panel"`, `hx-swap="outerHTML"`, `hx-push-url="true"`,
|
||||
} {
|
||||
if !strings.Contains(got, want) {
|
||||
t.Errorf("a panel way out must carry %s:\n%s", want, got)
|
||||
}
|
||||
}
|
||||
|
||||
got = render(forms.PanelLinkOut("Clear", "/things", "#things-panel", ""))
|
||||
if strings.Contains(got, "hx-select-oob") {
|
||||
t.Errorf("a panel way out with no siblings must not carry hx-select-oob:\n%s", got)
|
||||
}
|
||||
|
||||
got = render(forms.ScopedLinkOut("Back", "/partials/things", "#content"))
|
||||
if strings.Contains(got, "<a href") {
|
||||
t.Errorf("a scoped way out for a partial route stays a button:\n%s", got)
|
||||
}
|
||||
for _, unwanted := range []string{"hx-select", "hx-push-url"} {
|
||||
if strings.Contains(got, unwanted) {
|
||||
t.Errorf("a scoped way out for a partial route must not carry %s:\n%s", unwanted, got)
|
||||
}
|
||||
}
|
||||
if !strings.Contains(got, `hx-swap="innerHTML"`) {
|
||||
t.Errorf("a scoped way out for a partial route swaps innerHTML:\n%s", got)
|
||||
}
|
||||
}
|
||||
|
||||
// FormView.CommitDescribedBy names an element outside the form that states
|
||||
// a fact about what committing does. The enabled submit and a link commit
|
||||
// reference it; a disabled commit keeps only its own reason.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
schema: spec-driven
|
||||
created: 2026-11-02
|
||||
@@ -0,0 +1,95 @@
|
||||
## Context
|
||||
|
||||
`/operator/domains` renders the effective claim policy and three tables from `loadDomainsPageData` (`internal/server/operator_domains.go`): the live claims, governed since the list-scale work (search over the root name and the organization, a status facet, 50-row pages, the true total in the page header); the placements, read whole by `ListAllPlacementsForOperator` and ordered by name; and the claim history, read by `ListTerminalClaimsForOperator`, newest first and capped at 200. The two sections' headers count the rows rendered. A failed read sets the page's Problem notice and returns early, leaving the later lists empty.
|
||||
|
||||
The machinery for several governed lists on one page exists. `ParseListParamsNS` reads a prefixed `q` and `page`, `ParsePerPage` a prefixed `per`; `ListNav.ParamPrefix` names them in every URL the controls build; `ListNav.Extra` (filled by `siblingListState`) carries the other lists' parameters into those URLs and into the search form as hidden inputs; `ListNav.Target` makes the pager, the page-size links, the tabs and the search form scoped requests that swap only the list's panel, and `ListNav.SyncSelect` refreshes the sibling panels out of band from the same response. The organization page's grants ledger, Entitlement changes and Tier changes use all of it. Three controls do not follow `Target` today: the search's Clear button (`forms.ScopedLinkOut` renders `hx-get` and `hx-target` with no `hx-select`, so it nests the whole page in the panel; the organization page's ledger search has this defect now), the facet pills (plain links, a full-page navigation), and the no-match line's "Clear search and filters" (the bare base path, which drops every sibling's state).
|
||||
|
||||
The lint's `table-without-list-controls` rule (`internal/lint/anatomy.go`) fires on a `<table` in a page body unless the template calls `listControls` or `listPager` anywhere, or carries `list-scale exempt:` anywhere.
|
||||
|
||||
## Goals / Non-Goals
|
||||
|
||||
Goals: every table on the Domains page is paged and searchable with its true total and, where its rows carry a status, filterable by it; the three lists keep one another's state; the lint catches an unpaged table beside a paged one.
|
||||
|
||||
Non-goals: any change to the live claims' parameters, order or page size; the member side's domains table.
|
||||
|
||||
## Decisions
|
||||
|
||||
### 1. Prefixes and page sizes
|
||||
|
||||
Pick: the live claims keep `q`, `status` and `page` and their 50-row page; placements take `p_` and history `h_`, each ten rows by default with the shared picker (10, 25, 50) through `ParsePerPage`.
|
||||
|
||||
Why: `operator-list-scale` gives standalone lists the unprefixed names and the standard size and embedded lists a prefix and the smaller default. The live claims are the page's subject (the page header counts them), and keeping their names keeps every existing link to a filtered claims view working. Placements and history sit below them as sections, which is the embedded case.
|
||||
|
||||
Alternatives: prefix all three (breaks every saved `?q=` and `?status=` link to the claims view for no reader's gain); keep placements and history at 50 (a page whose third section starts after two 50-row tables).
|
||||
|
||||
### 2. The live claims navigate the page; the other two swap their panels
|
||||
|
||||
Pick: the live claims keep page navigations (no `Target`), as today: their search, facet pills, pager and Clear load the page, which refreshes the page header's count with them. Their `ListNav` gains `Extra: siblingListState(r, "", "status")`, so every link and the search form carry the placements' and the history's parameters. Placements and history are embedded lists: each sits in its own panel (`#domain-placements-panel`, `#domain-history-panel`) with its section header inside it, sets `Target` to its panel, sets `SyncSelect` to the other embedded panel, to `#domain-claims-panel`, the wrapper around the live claims, and to `#domain-page-header`, the wrapper around the page header, and sets `Extra` to `siblingListState(r, "p_", "p_state")` or `siblingListState(r, "h_", "h_status")`. A scoped request is a GET of the page itself; htmx selects the target panel and the sibling panels from the whole page it receives.
|
||||
|
||||
Why: the live claims sit at the top of the page, so a navigation costs no scroll position, and a navigation refreshes the page header's count with them. The embedded lists sit lower, where a navigation would lose the operator's place, so they swap. Refreshing `#domain-claims-panel` out of band keeps the claims' links carrying the embedded lists' current state; refreshing the page header with it keeps the header's count equal to the "Showing X–Y of N" of the panel it counts, which would otherwise differ whenever a claim was filed, verified, expired or released between the page's load and the swap. The section headers inside the panels keep each count with its list.
|
||||
|
||||
Alternatives: scope the live claims too (every claims control would swap the page header as well, and the claims' facet pills and Clear would need the scoped treatment, for no reader's gain at the top of the page); a partial route per list (three routes, three handlers that each rebuild the others' state, for the same result).
|
||||
|
||||
### 3. The placements read, its Organization column and its state facet
|
||||
|
||||
Pick: `ListPlacementsForOperatorPage` joins each placement to its claim, the claim's workspace and the workspace's organization (`claim_id` is `NOT NULL`, so the joins drop no row), matches `q` as a case-insensitive substring of the served name or the organization's name, filters on the state (`servable` or `unservable`) when the `p_state` facet is set, orders by `fqdn` then `placement_id`, and returns `count(*) OVER()` as the true total, under `LIMIT` and `OFFSET`. The row carries the organization's id and name, and the table shows them as a link to the organization, as the claims tables do. The facet offers Servable and Unservable, the words the State column's badge already shows.
|
||||
|
||||
Why: #36 asks for a search by served name and organization; a search that matches a field the rows do not show reads as matching nothing. `operator-list-scale` asks a governed list whose rows carry a status vocabulary for a filter over it, and an operator looking for what is not being served wants exactly the unservable rows. The window count gives the total from the same filtered set as the page. `fqdn` is unique among placements, and the id tiebreak makes the order total regardless.
|
||||
|
||||
### 4. The history read and its status facet
|
||||
|
||||
Pick: `ListTerminalClaimsForOperatorPage` keeps the terminal filter (`expired`, `canceled`, `released`) and the columns the section renders, narrows to one of them when the `h_status` facet is set (validated against those three, so no value can widen the list), matches `q` against the root name or the organization's name, orders by `created_at DESC, claim_id DESC`, and returns the window total under `LIMIT` and `OFFSET`; the 200-row cap goes. The facet offers Expired, Canceled and Released.
|
||||
|
||||
Why: the cap existed to bound an unpaged read; paging bounds it, and the cap is what made the header count wrong. The claim id breaks ties between claims written in one transaction, as the live claims' order does, so each row lists on exactly one page. The facet is the status-filter requirement's, over the vocabulary the Status column shows.
|
||||
|
||||
### 5. The section headers count the total
|
||||
|
||||
Pick: `PlacementsHeader` and `HistoryHeader` count their nav's `Total`, the true total for the current search and facet, and render inside their panels.
|
||||
|
||||
Why: `operator-list-scale` states the true total, never the page's row count, and a header outside its panel would keep the old count after a scoped request.
|
||||
|
||||
### 6. Empty, filtered and failed states
|
||||
|
||||
Pick: each list keeps its empty state when it holds no rows and no search or facet is set; with a search or facet that matches nothing it renders its controls and `listNoMatch`, as the live claims do. Each list's read is independent: a failure sets that list's own Problem notice (`ClaimsError`, `PlacementsError`, `HistoryError`), rendered inside its panel in place of the list, and the other lists still load. A failed list's header, and for the live claims the page header, states no count, because the read produced no total. The page's `Error` stays for the missing registry and the force-release answers.
|
||||
|
||||
Why: a page-level notice sits outside the panels, so a scoped request would swap in a list that reads as empty ("No placements.") with no word that its read failed. The organization page renders each panel's notice inside the panel for the same reason.
|
||||
|
||||
### 7. The shared controls follow `Target`
|
||||
|
||||
Pick: three changes to the shared controls, for every embedded list:
|
||||
|
||||
- the search's Clear way out becomes a full scoped request: `forms.ScopedLinkOut` gains the select, out-of-band select and push-URL settings the search form itself carries, and `listSearchForm` passes the list's `Target` and `SyncSelect`;
|
||||
- the facet pills carry the same `hx-get`, `hx-target`, `hx-select`, `hx-select-oob`, `hx-swap` and `hx-push-url` attributes the tabs carry when `Target` is set;
|
||||
- the no-match line's clear link goes to a new `ListNav.ClearAllURL()`, the base path with the list's own parameters dropped and `Extra` kept, for every list, and swaps like the other controls when `Target` is set.
|
||||
|
||||
Why: without them the new requirement's promise, that every control of an embedded list re-renders only its own panel and keeps its siblings' state, is false for three controls. The Clear fix also mends the organization page's ledger search, which nests the page in its panel today; the proposal lists that as a ride-along. The live claims navigate the page but carry the other lists' state, so their clear link needs `Extra` too. A list with no `Extra` still clears to the bare base path. The billing views carry `env=all` in `Extra`, the page's environment scope rather than a search or filter of the list, so it now survives "Clear search and filters", as it survives paging.
|
||||
|
||||
### 8. The search boxes are labelled by list
|
||||
|
||||
Pick: `ListNav` gains `SearchLabel`, the search input's visually hidden label, defaulting to "Search this list"; the Domains page sets "Search live claims", "Search placements" and "Search claim history".
|
||||
|
||||
Why: three inputs on one page with one label give a screen reader three identical fields.
|
||||
|
||||
### 9. The lint examines each table, and paging is what it checks
|
||||
|
||||
Pick: in a page body, the rule walks the template's `<table` openings in order. A table is governed when a `listPager` call lies after its opening and before the next table's opening (or the template's end); it is exempt when a `list-scale exempt:` marker lies after the previous table's opening (or the template's start) and before its own. Any other table is reported at its line. The rule finds tables and pager calls in the template with its comments blanked, so a `<table` or a `listPager` named in a comment counts for nothing, and it accepts the marker only as a template comment with a reason after the colon.
|
||||
|
||||
Why: a template's tables are what the rule governs, and a whole-file check lets one paged list cover every table beside it, which is how the Domains page's two tables passed. Paging is what the rule enforces; search and filters stay `operator-list-scale`'s requirements, which the rule's name never claimed to check. A list's pager follows its table in every governed template, so position stands in for a parse of the template's branches.
|
||||
|
||||
The per-table rule finds one more table on the organization page, Members, which this change pages, because a marker is not for a table that grows with the organization. The rule checks position, not ownership: the grants ledger's table renders from another template, so its `listPager` call sits after the usage table's opening and lends that table a pass. The usage table is a detail-page table, one row per resource key the organization's deliveries carry, and takes a marker saying so all the same, so its exemption does not depend on where the ledger's pager happens to sit. The Stripe settings and integrations pages already carry one marker per table; the build confirms each marker precedes its own table.
|
||||
|
||||
Alternatives: require `listControls` before each table as well (the organization page's Entitlement changes and Tier changes, its audit trails, page without a search, which the embedded-list requirement now states); count tables against pager calls (a template whose pagers all sit after its last table would pass).
|
||||
|
||||
## Risks / Trade-offs
|
||||
|
||||
- [The panel swap renders the whole page for one panel] → the organization page does the same. Each read counts its whole filtered set through the window count, so the cost grows with the matching rows, not the page.
|
||||
- [Force-release answers with the page at its defaults] → the action posts without the page's query, so all three lists return to their first page, unfiltered; the live claims behaved that way before this change.
|
||||
- [Existing links to the Domains page with no `p_` or `h_` parameters] → they open each section on its first page, which is what they showed before for any deployment under ten rows.
|
||||
|
||||
## Migration Plan
|
||||
|
||||
None: no schema change. The old placements read has one other caller, a FedWiki store test, which moves to the paged read.
|
||||
|
||||
## Open Questions
|
||||
|
||||
None.
|
||||
@@ -0,0 +1,65 @@
|
||||
## Why
|
||||
|
||||
The operator Domains page holds three tables, and only the live claims are paged and searchable. The placements table renders every served name, which outnumber claims on any deployment that places more than one name per claim. The claim history renders up to 200 rows, newest first, and its header counts the rows rendered, so past 200 terminal claims the count is wrong and the older rows cannot be reached. The lint's table rule passes a template as a whole once it renders the shared list controls anywhere, so the two ungoverned tables beside the governed one never tripped it (#36). Checking each table finds the same gap on the organization page, whose Members list shows the 16 most recent members and no more.
|
||||
|
||||
## What Changes
|
||||
|
||||
- **Placements are a governed list.** They page under the prefix `p_`, ten rows by default with the shared size picker (10, 25, 50), search the served name and the holding organization's name, filter by state (Servable, Unservable), and state their true total in the section header. The table gains an Organization column, the organization that holds the claim the name is placed under, so the search's second field is visible in the rows it matches.
|
||||
- **Claim history is a governed list.** It pages under the prefix `h_`, ten rows by default with the size picker, searches the claimed domain and the organization's name as the live claims do, filters by status (Expired, Canceled, Released), and states its true total. The 200-row cap goes; paging bounds the read.
|
||||
- **Three lists on one page.** The live claims keep their parameters, their status filter, their 50-row page and their page navigations, so the page header's count follows a claims search. Placements and history each re-render only their own panel and refresh the other lists' links out of band, so every link and search carries the state of all three on the shared URL, the way the organization page's embedded lists work. Each list's failed read shows its own notice inside its panel instead of an empty state.
|
||||
- **Members is a governed list.** On the organization page, Members pages under `m_`, ten rows by default with the size picker, searches the display name and email, and drops the 16-row cap and its "Showing the latest 16 of N" line.
|
||||
- **The lint checks each table.** In a page body, a table passes only when its own `listPager` call follows it before the next table, or when an exemption marker sits before it and after the previous table. Before this change it fails the Domains page's placements and history and the organization page's Members. The organization page's usage table, a detail-page table, takes a marker, so its exemption does not rest on the grants ledger's pager happening to follow it.
|
||||
- **The registry reads pages.** `ListAllPlacements` and `ListAllTerminalClaims` give way to paged reads that return the rows and the true total for the search and filter.
|
||||
|
||||
## Ride-alongs
|
||||
|
||||
- **The scoped search's Clear.** On an embedded list, the search's Clear button fetched the whole page into the list's panel, because it carried no selection; the organization page's grants ledger does this today. It now selects its panel, refreshes the sibling panels and pushes the URL, like the search itself.
|
||||
- **The filter pills and the no-match clear link of an embedded list** become scoped requests that keep the sibling lists' state. Every list's "Clear search and filters" keeps the page's other state: on the billing views, `env=all` now survives it, as it survives paging.
|
||||
- **The search boxes' labels.** Each governed list can name its search box's hidden label, so a page with several searches does not announce several identical "Search this list" fields.
|
||||
|
||||
## Strings
|
||||
|
||||
The only user-visible text this change adds or changes:
|
||||
|
||||
- The placements search placeholder reads "Served name or organization".
|
||||
- The history search placeholder reads "Domain or organization", and Members' "Name or email", the placeholders the live claims and the people list use.
|
||||
- The visually hidden search labels read "Search live claims", "Search placements", "Search claim history", "Search grants" and "Search members"; every other list keeps "Search this list".
|
||||
- The new filter pills read Servable and Unservable (placements) and Expired, Canceled and Released (history), the words the State and Status badges already show.
|
||||
- The placements table's new column header reads "Organization", as the claims tables' does.
|
||||
- The section counts keep their labels and state the true total; Members loses its "Showing the latest 16 of N" line.
|
||||
- The shared controls' existing words now also show on placements, history and Members: the "All" filter pill, "Search", "Clear", "Showing X–Y of N", "Per page:", "Previous", "Next", "Page N of M", the no-match line and "Clear search and filters".
|
||||
- A failed read's notice keeps its words: "Failed to load domain claims." for the live claims and the history, "Failed to load domain placements." for placements.
|
||||
|
||||
### Visible changes for the screens review
|
||||
|
||||
- **Placements:** an Organization column, a search and state filter above the table and a pager with the size picker below it.
|
||||
- **Claim history:** a search and status filter above the table and a pager with the size picker below it; the count is the true total.
|
||||
- **Members:** a search above the table and a pager with the size picker below it; the "Showing the latest 16" line goes.
|
||||
- **All three** show ten rows by default where they showed every row or the latest 16.
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
|
||||
None.
|
||||
|
||||
### Modified Capabilities
|
||||
|
||||
- `operator-list-scale`: the Domains page's placements and history and the organization page's Members are governed lists; the embedded-list requirement names them and drops the Members cap's exception, and every control of an embedded list is scoped; the live claims keep their requirement without the sentence that exempts the other two, and carry the siblings' state; the placeholder list names "Served name or organization".
|
||||
- `ui-quality-gate`: the unpaged-table rule examines each table in a page body for its own pager, not the template as a whole.
|
||||
|
||||
## Impact
|
||||
|
||||
- **Code:** `internal/domains/queries/placements.sql` and `claims.sql` and the sqlc output; `internal/domains/registry.go`; `internal/server/operator_domains.go`, `operator_enrollment.go`, `list_scale.go`, `list_scale_forms.go` and `anatomy.go`; `internal/forms` (the scoped way out); `internal/embeds/templates/partials/operator_domains.html`, `operator_enrollment.html`, `operator_list_controls.html` and `ui_form.html`; `internal/lint/anatomy.go`.
|
||||
- **Tests:** the registry's paged reads against the test database; the Domains page and the organization page with more rows than a page, searches, filters, sibling state in each list's links, a failed read's notice and no repeated element id; the form library's scoped Clear; the lint's per-table cases and its verdicts golden; the FedWiki store test that read the whole placements list; the screens' `operator-domains` and `operator-organization-detail`.
|
||||
- **Schema:** none.
|
||||
- **Docs:** `docs/operator-ux-conventions.md`'s paging row.
|
||||
|
||||
## Out of scope
|
||||
|
||||
- **The member side's domains table** in the FedWiki sites card: a member's workspace holds few claims, and the card is the member surface.
|
||||
- **Ordering:** each list keeps its order (live claims pending first and newest first, placements by name, history newest first, Members most recently joined first), with a tiebreak added where rows can tie.
|
||||
|
||||
## Related issues
|
||||
|
||||
- **#36** closes with this change.
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: The organization composite's Members is a governed list
|
||||
|
||||
The Members section on `/operator/organizations/{orgID}` SHALL be a governed list embedded in that page under the parameter prefix `m_`, defaulting to ten rows with the size picker over 10, 25 and 50, with the true total ("Showing X–Y of N") and the total for the current search as the section header's count. It SHALL search, case-insensitively, the member's display name and primary email, SHALL order by the most recent join first with the person id breaking ties, and SHALL carry no row cap. A failed read SHALL render the section's Problem notice and neither its empty state nor its table. Its search input's visually hidden label SHALL read "Search members", and the grants ledger's "Search grants".
|
||||
|
||||
#### Scenario: More members than a page
|
||||
|
||||
- **WHEN** an operator opens an organization with 24 active members
|
||||
- **THEN** Members renders the 10 most recently joined, "Showing 1–10 of 24" and the size picker, and no "Showing the latest 16" line
|
||||
- **AND** the Members header reads "24 members"
|
||||
|
||||
#### Scenario: Members search by email
|
||||
|
||||
- **WHEN** an operator submits `m_q=example.org` on the organization's page
|
||||
- **THEN** only members whose display name or primary email contains "example.org" render, with the total stated for that search, and the ledger's, Tier changes' and Entitlement changes' parameters ride along unchanged
|
||||
|
||||
### Requirement: The operator Domains placements and history are governed lists
|
||||
|
||||
The placements and claim history sections on `/operator/domains` SHALL each be a governed list embedded in that page under the embedded-list contract: placements under the parameter prefix `p_`, history under `h_`, each defaulting to ten rows with the size picker over 10, 25 and 50, server-side pages with the true total ("Showing X–Y of N"), and the true total for the current search and filter as the section header's count. Placements SHALL search, case-insensitively, the served name and the name of the organization that holds the claim the name is placed under, SHALL show that organization in an Organization column linking to its page, SHALL offer a state filter (`p_state`) over Servable and Unservable, and SHALL order by the served name. History SHALL keep the terminal statuses (expired, canceled, released), SHALL offer a status filter (`h_status`) over exactly those three, SHALL search the claimed root name and the organization's name, SHALL order newest first with the claim id breaking ties, and SHALL carry no row cap. A list with no rows and no search or filter SHALL render its empty state; a search or filter that matches nothing SHALL render the list's controls and the shared no-match line. A list whose read fails SHALL render its own Problem notice inside its panel, and neither its empty state nor its table, while the other lists render. Each embedded list sits in its own panel with its section header; every control of an embedded list (its search and the search's Clear, its filter pills, its pager, its page-size links and its no-match clear link) SHALL re-render only its own panel, refresh the other embedded list's panel and the live claims' panel out of band, push the resulting URL, and carry the other two lists' parameters in every URL it builds. Each of the page's three search inputs SHALL carry its own visually hidden label: "Search live claims", "Search placements" and "Search claim history".
|
||||
|
||||
#### Scenario: More placements than a page
|
||||
|
||||
- **WHEN** an operator opens `/operator/domains` on a deployment serving 35 names
|
||||
- **THEN** the placements section renders 10 rows, "Showing 1–10 of 35" and the size picker
|
||||
- **AND** the Placements header reads "35 served names"
|
||||
|
||||
#### Scenario: Placements search by organization
|
||||
|
||||
- **WHEN** an operator submits `p_q=podding` on `/operator/domains`
|
||||
- **THEN** only placements whose served name or holding organization's name contains "podding" render, each row naming its organization, with the total stated for that search
|
||||
|
||||
#### Scenario: History past two hundred
|
||||
|
||||
- **WHEN** an operator opens `/operator/domains` on a deployment with 230 terminal claims and pages the history to its last page
|
||||
- **THEN** the history's last page lists the oldest terminal claims, and the Claim history header reads "230 terminal claims"
|
||||
|
||||
#### Scenario: Paging one list keeps the others
|
||||
|
||||
- **WHEN** an operator has searched the live claims with `q=podding` and the history with `h_q=expired-co`, and pages the placements
|
||||
- **THEN** the placements panel shows its next page, the live claims and the history keep their searches, the scroll position is unchanged, the address bar carries all three lists' parameters, and every link and search form of the live claims and the history carries `q=podding`, `h_q=expired-co` and the placements' new `p_page`
|
||||
|
||||
#### Scenario: A search that matches nothing
|
||||
|
||||
- **WHEN** an operator submits a history search that matches no terminal claim
|
||||
- **THEN** the history section renders its search and the shared no-match line with its clear link, not its empty state
|
||||
- **AND** following the clear link returns the history to its unfiltered first page and keeps the live claims' and the placements' parameters
|
||||
|
||||
#### Scenario: History filtered by status
|
||||
|
||||
- **WHEN** an operator selects the history's Expired filter
|
||||
- **THEN** only expired claims render, the Claim history header counts them, and the URL carries `h_status=expired`
|
||||
|
||||
#### Scenario: A failed history read
|
||||
|
||||
- **WHEN** the history read fails while the live claims and placements load
|
||||
- **THEN** the history panel renders its Problem notice and no empty state, and the other two lists render their rows
|
||||
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Embedded lists can adopt the shared controls
|
||||
|
||||
A governed list embedded in a page that hosts more than one (the organization composite's grants ledger, Tier changes, Entitlement changes and Members; the Domains page's placements and claim history; Tier changes and Entitlement changes, the composite's audit trails, page without a search) SHALL use the same search, facet, and pager mechanics under namespaced parameter names (a per-list prefix on q, page, and per; the facet parameter is always a full name), and every URL such a list builds — pager links, facet links, page-size links, and the search form's submission — SHALL preserve its sibling lists' state on the shared URL. Embedded lists default to a page size of 10 and offer a picker over the shared option set (10, 25, 50); an unknown size is ignored like an unknown facet, and the size parameter is omitted at the list's default so canonical views keep canonical URLs. Standalone pages keep the unprefixed names and the standard size. An embedded list's controls SHALL re-render only their own panel, never scrolling the page (maintainer 2026-08-24): each control (the search and its Clear, the tabs and filter pills, the pager, the page-size links and the no-match clear link) issues a scoped request targeting and selecting the panel's wrapper, pushes the resulting URL so views still deep-link, keeps the plain URL as the no-JS fallback, and refreshes its sibling panels out-of-band from the same response so no panel's links ever carry stale sibling state.
|
||||
|
||||
#### Scenario: Interacting with an embedded list holds the viewport
|
||||
|
||||
- **WHEN** an operator scrolled mid-page switches a tab, searches, resizes, or pages an embedded list
|
||||
- **THEN** only that list's panel (and its siblings' control state) re-renders, the scroll position is unchanged, and the address bar carries the combined state of every embedded list on the page
|
||||
|
||||
#### Scenario: Sibling state survives navigation
|
||||
|
||||
- **WHEN** an operator has searched the grants ledger and then pages the Tier changes list on the same organization page
|
||||
- **THEN** the Tier changes link carries its own namespaced page parameter and the ledger's search and tab state ride along unchanged
|
||||
|
||||
### Requirement: The operator Domains live-claims list is governed
|
||||
|
||||
The live-claims table on `/operator/domains` SHALL be a governed list under this contract: server-side pages of at most 50 rows with the true total ("Showing X–Y of N"), page state in `page`, a scoped server-side search over the claim's root name and the owning organization's name, and a status facet over the live vocabulary (`pending`, `active`). The page ordering (pending first, then newest) SHALL apply across the whole result, not per page, so the first page carries the claims that need attention. The page header's count SHALL be the true total for the current search and filter. The live claims keep the unprefixed parameter names and their controls stay page navigations, because they are the page's subject and the page header counts them; their controls SHALL carry the placements' and the history's parameters in every URL they build and in their search form.
|
||||
|
||||
#### Scenario: More claims than a page
|
||||
|
||||
- **WHEN** an operator opens `/operator/domains` on a deployment with 120 live claims
|
||||
- **THEN** 50 rows render with previous/next controls and "Showing 1–50 of 120"
|
||||
- **AND** the header count reads 120
|
||||
|
||||
#### Scenario: Search narrows by root name or organization
|
||||
|
||||
- **WHEN** an operator submits `q=podding` on `/operator/domains`
|
||||
- **THEN** only claims whose root name or owning organization name contains "podding" render, with the total stated for that search
|
||||
|
||||
#### Scenario: Pending facet
|
||||
|
||||
- **WHEN** an operator selects the `pending` facet
|
||||
- **THEN** only pending claims render, and the URL carries the facet so the view is addressable
|
||||
|
||||
#### Scenario: The claims' pager keeps the other lists' state
|
||||
|
||||
- **WHEN** an operator on `/operator/domains?p_q=wiki&h_page=2` pages the live claims
|
||||
- **THEN** the claims' next-page link carries `p_q=wiki` and `h_page=2` beside its own `page`
|
||||
|
||||
### Requirement: A search placeholder names only what the search matches
|
||||
|
||||
Every governed list's search input SHALL carry a placeholder that names the fields the search matches and nothing else, with no "Search" or "Search by" before them, since the button beside the input says "Search". The placeholders are "Organization or account name" (billing accounts), "Organization or billing account" (subscriptions and payments), "Organization or invoice number" (invoices), "Name or email" (persons), "Domain or organization" (domains, the domain claim history and member sites), "Served name or organization" (domain placements), "Ladder name" (plan ladders), "Name" (products), "Name or owner" (root pages) and "Organization or product" (page claims) (grant-resumption design D24).
|
||||
|
||||
#### Scenario: A placeholder does not restate the button
|
||||
|
||||
- **WHEN** an operator views the invoices list
|
||||
- **THEN** the search input's placeholder reads "Organization or invoice number"
|
||||
|
||||
#### Scenario: The placements placeholder names its two fields
|
||||
|
||||
- **WHEN** an operator views the Domains page's placements
|
||||
- **THEN** the placements search input's placeholder reads "Served name or organization"
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Lint refuses an unpaged body table
|
||||
|
||||
`member-console lint` SHALL fail with `table-without-list-controls` when a page-body template (a template named by a handler's `BodyTemplate`) renders a `<table` that is not governed and not exempt. The check is per table: the rule walks the template's `<table` openings in source order, and a table is governed when a `listPager` call lies after this table's opening and before the next table's opening (or the template's end). Paging is what the rule checks; a governed list's search and filters are `operator-list-scale`'s requirements. A table is exempt when the marker `list-scale exempt:` followed by the reason, placed as a template comment, lies after the previous table's opening (or the template's start) and before this table's opening; the marker covers that one table. A template that governs or exempts one table therefore gives no pass to another table in it. The marker is the only exemption; `internal/lint/anatomy_allowlist.txt` SHALL NOT be used for this rule. A table that grows with the deployment SHALL NOT carry the marker; the marker is for curated configuration lists and detail-page tables, the exemptions `operator-list-scale` names.
|
||||
|
||||
#### Scenario: Unpaged runtime table fails lint
|
||||
|
||||
- **WHEN** a page-body template renders a `<table` with neither its own `listPager` call after it nor a marker before it
|
||||
- **THEN** `member-console lint` reports `table-without-list-controls` with the file and line and exits non-zero
|
||||
|
||||
#### Scenario: Marked curated table passes
|
||||
|
||||
- **WHEN** a page-body template renders a `<table` preceded by `{{/* list-scale exempt: curated configuration list */}}`
|
||||
- **THEN** `member-console lint` reports nothing for that table
|
||||
|
||||
#### Scenario: A second table beside a governed list fails
|
||||
|
||||
- **WHEN** a page-body template renders one table followed by its `listPager` call, and a second table after that call with no pager and no marker of its own
|
||||
- **THEN** `member-console lint` reports `table-without-list-controls` at the second table's line and nothing at the first
|
||||
|
||||
#### Scenario: One marker covers one table
|
||||
|
||||
- **WHEN** a page-body template renders two tables and carries one `list-scale exempt:` marker, placed before the first
|
||||
- **THEN** `member-console lint` reports `table-without-list-controls` at the second table's line
|
||||
|
||||
#### Scenario: Fragments are out of scope
|
||||
|
||||
- **WHEN** a partial that no handler names as a body template renders a `<table`
|
||||
- **THEN** the rule does not fire
|
||||
@@ -0,0 +1,71 @@
|
||||
## 1. The Domains page's paged reads
|
||||
|
||||
- [x] 1.1 `internal/domains/queries/placements.sql`: `ListPlacementsForOperatorPage :many` replaces `ListAllPlacementsForOperator`. It selects `p.placement_id, p.claim_id, p.fqdn, p.provider, p.resource_ref, p.servable, p.created_at, o.org_id, o.name AS org_name, count(*) OVER() AS total_count` from `domains.placements p` joined to `domains.claims c` on `claim_id`, `core.workspaces w` on `c.workspace_id`, and `core.organizations o` on `w.org_id`; filters `(sqlc.narg(q)::text IS NULL OR p.fqdn ILIKE '%' || sqlc.narg(q)::text || '%' OR o.name ILIKE '%' || sqlc.narg(q)::text || '%')` and `(sqlc.narg(servable)::boolean IS NULL OR p.servable = sqlc.narg(servable)::boolean)`; orders by `p.fqdn, p.placement_id`; takes `LIMIT sqlc.arg(page_limit)::int OFFSET sqlc.arg(page_offset)::int`. Its comment says what the section answers (the names actually served), that it joins core because the holder is searched and shown, and that the window count is the true total for the filtered set. The comment on `ListLiveClaimsForOperatorPage` that calls it the one query in the stream that reads core is corrected.
|
||||
- [x] 1.2 `internal/domains/queries/claims.sql`: `ListTerminalClaimsForOperatorPage :many` replaces `ListTerminalClaimsForOperator`: the same columns plus `count(*) OVER() AS total_count`, the same terminal filter, `(sqlc.narg(status)::text IS NULL OR c.status = sqlc.narg(status)::text)` inside it, the `q` filter over `c.root_fqdn` and `o.name` written as 1.1 writes it, `ORDER BY c.created_at DESC, c.claim_id DESC`, the same `LIMIT`/`OFFSET` arguments, and no 200-row cap. Its comment keeps the blame paragraph (status alone says nothing about fault) and replaces the cap's paragraph with the paging that bounds the read.
|
||||
- [x] 1.3 `make sqlc-generate` (it restores the generated files' licence headers); the old queries' generated code goes with them. `internal/integrations/fedwiki/store/placement_servability_db_test.go` (line 330) calls `ListAllPlacementsForOperator`; it moves to `ListPlacementsForOperatorPage` with `Q` set to the site's name and a page limit of 50, keeping its "in the operator list" assertion.
|
||||
- [x] 1.4 `internal/domains/registry.go`: `OperatorPlacementsPage{Q string; Servable *bool; Limit, Offset int32}` and `OperatorTerminalClaimsPage{Q, Status string; Limit, Offset int32}`; `ListPlacementsPage(ctx, OperatorPlacementsPage) ([]ListPlacementsForOperatorPageRow, int64, error)` and `ListTerminalClaimsPage(ctx, OperatorTerminalClaimsPage) ([]ListTerminalClaimsForOperatorPageRow, int64, error)`, shaped like `ListAllLiveClaimsPage` (the total from the first row's `total_count`, zero with no rows; errors wrapped `domains: list placements: %w` and `domains: list terminal claims: %w`). `ListAllPlacements` and `ListAllTerminalClaims` are deleted; `grep -rn "ListAllPlacements\|ListAllTerminalClaims\|ListAllPlacementsForOperator\|ListTerminalClaimsForOperator\b" --include=*.go .` finds no other caller after 1.3.
|
||||
|
||||
## 2. The shared list controls
|
||||
|
||||
- [x] 2.1 `internal/server/list_scale.go`: `ListNav` gains `SearchLabel string`, the search input's visually hidden label; `listSearchForm` (`list_scale_forms.go`) uses it, falling back to "Search this list" when it is empty.
|
||||
- [x] 2.2 `ListNav.ClearAllURL()`: the base path with the list's own `q`, `page`, `per` and facet parameters dropped and `Extra` kept (built with the same encoder `url` uses, so the parameter order is stable). `listNoMatch`'s clear link uses it for every list, and carries the scoped `hx-*` attributes when `Target` is set. A list with no `Extra` gets the bare base path, as today; the billing views keep `env=all` through a clear (design decision 7).
|
||||
- [x] 2.3 Every facet pill in `operator_list_controls.html`, the "All" pill (outside the `range`) included, carries, when `$.Target` is set, the attributes the tabs carry on the same line pattern: `hx-get` (the pill's URL), `hx-target` and `hx-select` (`$.Target`), `hx-select-oob` (`$.SyncSelect`, when set), `hx-swap="outerHTML"` and `hx-push-url="true"`. The template's header comment (which says the pills are links and the no-match line links back to the bare list) and `ListNav.Target`'s doc comment in `list_scale.go` name the pills, the Clear and `ClearAllURL` among the scoped controls.
|
||||
- [x] 2.4 `internal/forms`: the way out a scoped list's search renders as Clear carries the search form's own scoping. `ScopedLinkOut` stays as it is (the workspace form's "Back" uses it with an `innerHTML` swap into a partial route, and must not push that route into the address bar). A sibling constructor sets new `HXSelect`, `HXSelectOOB` and `HXPushURL` fields on `WayOut` and on `WayOutView` (`internal/forms/render.go`, whose conversion from `WayOut` needs the same fields), with `HXSwap` set to `outerHTML`; `ui_form.html` emits each new attribute only when its field is set. `listSearchForm` uses the sibling constructor with the list's `Target` and `SyncSelect`. A form-library test asserts the rendered Clear's attributes; `testdata/forms/member.workspace.create.html` does not change.
|
||||
- [x] 2.5 `listSearchForm` sets the form binding's `Instance` to `strings.TrimSuffix(n.ParamPrefix, "_")`, so each list's search form renders its own element ids (`render.go` documents `Instance` for a form rendered more than once on one page); an unprefixed list's ids, and the goldens that pin them, do not change.
|
||||
- [x] 2.6 A render test on the organization page: the ledger search's Clear, with a search set, selects `#plan-grants-panel`, refreshes the sibling panels out of band and pushes the URL. Before 2.4 it nested the page in the panel; the proposal lists the fix as a ride-along.
|
||||
|
||||
## 3. The Domains page
|
||||
|
||||
- [x] 3.1 `internal/server/operator_domains.go`: `OperatorDomainsData` gains `PlacementsNav ListNav`, `HistoryNav ListNav`, `ClaimsError`, `PlacementsError` and `HistoryError notice.Notice`; the comment on `Nav` that says placements and history stay unpaged is replaced by one naming the three lists, their prefixes and why the live claims navigate (design decisions 1 and 2). `OperatorPlacementRow` gains `OrgID` and `OrgName`.
|
||||
- [x] 3.2 `loadDomainsPageData`: the three reads are independent; a failed read logs, sets its own notice with the words the page uses today ("Failed to load domain claims." for the live claims and the history, "Failed to load domain placements." for placements) and leaves its list empty, and the next read still runs. `.Error` keeps the missing-registry and force-release messages only.
|
||||
- The live claims' `ListNav` keeps its fields and gains `Extra: siblingListState(r, "", "status")` and `SearchLabel: "Search live claims"`; no `Target`.
|
||||
- Placements: `params := ParseListParamsNS(r, "p_", "p_state")`, then `params.PerPage = ParsePerPage(r, "p_", embeddedListDefaultPerPage)` before the read; `params.Facet = ValidFacet(params.Facet, placementStateFacets)` where `placementStateFacets` is `{servable, Servable}, {unservable, Unservable}`; `FetchPage(¶ms, ...)` over `ListPlacementsPage` with `Servable` set from the facet. `PlacementsNav = ListNav{BasePath: "/operator/domains", SearchPlaceholder: "Served name or organization", SearchLabel: "Search placements", FacetParam: "p_state", FacetOptions: placementStateFacets, Q: params.Q, Facet: params.Facet, Page: params.Page, Total: total, ParamPrefix: "p_", Extra: siblingListState(r, "p_", "p_state"), PerPage: params.PerPage, DefaultPerPage: embeddedListDefaultPerPage, PerPageOptions: perPageOptions, Target: "#domain-placements-panel", SyncSelect: "#domain-page-header,#domain-claims-panel,#domain-history-panel"}`.
|
||||
- History: the same with `h_`, facet parameter `h_status` over `historyStatusFacets` (`{expired, Expired}, {canceled, Canceled}, {released, Released}`), `ListTerminalClaimsPage` with `Status` from the facet, `SearchPlaceholder: "Domain or organization"`, `SearchLabel: "Search claim history"`, `Target: "#domain-history-panel"`, `SyncSelect: "#domain-page-header,#domain-claims-panel,#domain-placements-panel"`.
|
||||
- Build note: the three reads live in `loadLiveClaims`, `loadPlacements` and `loadTerminalClaims`, which `loadDomainsPageData` calls in turn; each sets its own notice and returns, so a failed read never stops the next one. Behaviour is as the task states.
|
||||
- [x] 3.3 `PlacementsHeader` and `HistoryHeader` count `int(d.PlacementsNav.Total)` and `int(d.HistoryNav.Total)`. The comment above `loadDomainsPageData` that says the other sections read the request not at all is corrected, and its force-release sentence says all three lists return to their unfiltered first page.
|
||||
- [x] 3.4 `internal/embeds/templates/partials/operator_domains.html`: the live claims' markup, from its `listControls`/`listNoMatch`/empty-state branch through its `listPager`, is wrapped in `<div id="domain-claims-panel">`, and `{{ template "pageHeader" .Header }}` in `<div id="domain-page-header">`, which the placements' and the history's `SyncSelect` name so the header's count follows the claims' panel. Each panel opens with its failed-read branch: when the list's notice is set, the panel renders the notice and nothing else of the list (no controls, no empty state, no table), so a failed read never reads as an empty list. The placements section, its section header included, is wrapped in `<div id="domain-placements-panel">`: its header, then `{{ if not .PlacementsError.Empty }}` the notice, `{{ else }}` the live claims' shape with `.PlacementsNav` (with no rows, `listControls` and `listNoMatch` when `.PlacementsNav.Filtered`, its empty state otherwise; with rows, `listControls`, the table and `listPager`). The table gains an `Organization` column after `Name`: `<td><a href="{{ routeURL "/operator/organizations/{orgID}" .OrgID }}">{{ .OrgName }}</a></td>`. History does the same in `<div id="domain-history-panel">` with `.HistoryNav` and `.HistoryError`, and the live claims with `.ClaimsError`. The HTML comments that say placements and history are unpaged are corrected. `operator_enrollment.html`'s panels are the model.
|
||||
|
||||
## 4. The organization page's Members
|
||||
|
||||
- [x] 4.1 `internal/server/operator_enrollment.go`: `OrgEnrollmentData` gains `MembersNav ListNav`, and the comment above `Members` names the `m_` list and its pager in place of the cap. `loadOrgMembers`: `params := ParseListParamsNS(r, "m_", "")`, `params.PerPage = ParsePerPage(r, "m_", embeddedListDefaultPerPage)`; after the read, the members (in the query's order, `joined_at DESC, person_id ASC`) are filtered by `params.Q`, a case-insensitive substring of the display name or the primary email, then windowed with `pageSliceClamped`. The query's `ORDER BY om.joined_at DESC, om.person_id ASC` makes the order total, and the Go sort is gone. `MembersNav = ListNav{BasePath: "/operator/organizations/" + orgID, SearchPlaceholder: "Name or email", SearchLabel: "Search members", Q: params.Q, Page: params.Page, Total: int64(total), ParamPrefix: "m_", Extra: siblingListState(r, "m_"), PerPage: params.PerPage, DefaultPerPage: embeddedListDefaultPerPage, PerPageOptions: perPageOptions, Target: "#members-panel", SyncSelect: "#plan-grants-panel,#tier-changes-panel,#entitlement-changes-panel"}`. `MembersTotal` becomes the filtered total; `MembersCapped`, `enrollmentListCap` and `capEnrollmentList` are deleted with their comments.
|
||||
- Build note: `ListActiveMembersByOrgID` carried `LIMIT 200` in its query, so the Members total would have stopped at 200 and the spec's "no row cap" would have been false past it. The limit is removed from `internal/organization/queries/members.sql` and the query's comment now says why it is unbounded; `make sqlc-generate` regenerated `members.sql.go` and `querier.go`. The Members list pages the whole set Go-side, as the grants ledger does.
|
||||
- [x] 4.2 The three existing org-page navs add `#members-panel` to their `SyncSelect`, and the ledger's nav gains `SearchLabel: "Search grants"`.
|
||||
- [x] 4.3 `operator_enrollment.html`: the Members section, its header and notice included, is wrapped in `<div id="members-panel">`; when `.MembersError` is set the panel renders the notice and nothing else of the list, as on the Domains page; otherwise the table follows the governed shape with `.MembersNav` (empty state with no rows and no search, `listControls` and `listNoMatch` for a search matching nothing, `listControls`, the table and `listPager` otherwise). The "Showing the latest 16 of N" line goes. `MembersHeader` (`anatomy.go`) counts the filtered total, its comment drops "capped", and its `> 0` guard stays, so an organization with no members, or a search matching none, shows no count. `go test ./internal/server -run 'TestOrgEnrollment.*Golden' -update` (test stack up) regenerates `internal/server/testdata/org_enrollment/`; the diff holds only the Members panel, search and pager, the ledger's label and Clear, `#members-panel` in each `hx-select-oob`, and the JSON's Members and nav fields.
|
||||
- [x] 4.4 The usage table in the deliveries section takes `{{/* list-scale exempt: detail-page table, one row per resource key this organization's deliveries carry */}}` before its `<table`.
|
||||
|
||||
## 5. The lint
|
||||
|
||||
- [x] 5.1 `internal/lint/anatomy.go`: `table-without-list-controls` becomes a per-table check (design decision 9). Remove `hasListControls` and `hasListScaleExempt` from `templateFacts` and the rule's entry from `lineRules`; add `tablesWithoutListControls(src string, add func(line int, rule, msg string))`, called for page bodies beside `disabledOutsidePart` and `actionsColumn`. It finds every `<table[\s>]` opening in order; for each, it looks for a `list-scale exempt:` marker between the previous opening (or 0) and this one, and for a `listPager` call between this opening and the next (or the end), in a copy of the source whose template comments and HTML comments are blanked with spaces of the same length (newlines kept). A marker counts only as a template comment with a reason after the colon. A table with neither is reported at its line with the message `renders a <table> without its own pager; follow it with {{ template "listPager" }} (spec operator-list-scale), or put {{/* list-scale exempt: <reason> */}} before it if it is a curated configuration list or a detail-page table; the marker covers the one table it precedes (spec ui-quality-gate, design D5)`. The comment above it states the rule and why position stands in for a parse.
|
||||
- [x] 5.2 Read each page body carrying `list-scale exempt:` (`operator_integration_stripe.html` and `operator_integrations.html` hold two each) and confirm each marker precedes its own table; move any that does not, without rewording its reason. After 3.4, 4.3 and 4.4, `make lint` passes on the real templates.
|
||||
- [x] 5.3 `internal/lint`: the per-table cases as `verdicts_test.go`'s fixtures or `anatomy_test.go`'s cases, whichever the file's neighbours use: a lone paged table (passes); a paged table and a second table after its pager (second reported at its line, first not); one marker before the first of two tables (second reported); a marker before each of two tables (passes); a pager before the first table only, with the second table after it (first reported); a partial that is no page body (not examined). `verdicts_test.go`'s fixtures `operator_page_listed.html` (`listControls`, no pager) and `operator_page_paged.html` (pager, no `listControls`) change expectation: the first now fails, the second passes. `go test ./internal/lint -run TestLintVerdicts -update` regenerates `testdata/verdicts.golden`; the diff is read and holds only those fixtures' lines, the amended message and the report order.
|
||||
|
||||
## 6. Tests
|
||||
|
||||
- [x] 6.1 `internal/domains`: DB tests for `ListPlacementsPage` (a search by part of a served name, a search by part of an organization's name, case-insensitive, the servable filter, the true total under a page smaller than the result, the order by name) and `ListTerminalClaimsPage` (the terminal filter, the status filter, the search over root and organization, newest first with ties in claim-id order, the total, and more than 200 rows reachable by paging). Fixtures are brand-neutral.
|
||||
- [x] 6.2 `internal/server`, the Domains page (`operator_domains_render_test.go`, `operator_domains_db_test.go`): with more placements and terminal claims than a page, ten rows each, "Showing 1–10 of N", the size picker, the headers' true totals, the Organization column's link; `p_q`, `p_state`, `h_q` and `h_status` narrowing their lists, and an unknown `p_state` or `h_status` (say `active`) ignored, rendering the unfiltered list; a search matching nothing rendering the no-match line, whose clear link keeps the other lists' parameters (the live claims' included); each list's next-page link and search form carrying the other two lists' parameters as set in the request; the live claims' search form and pager carrying no `hx-select` (they navigate the page); the filter pills of placements and history, the All pill included, carrying `hx-get`, `hx-target`, `hx-select` and `hx-select-oob`; the placements placeholder "Served name or organization" and the three search inputs' labels; no element id repeated on the rendered page. A failed history read is a render test (data with `HistoryError` set renders the notice inside `#domain-history-panel`, no empty state and no table, while the other panels render rows); the loader's independent reads are checked by reading the code, because the handler's `Registry` is the concrete `*domains.Registry` with no seam for a failing querier. `TestOperatorDomainsPlacementsSectionListsWhatActuallyServes` requests `?p_q=<its token>`, with its unplaced claim sharing the token so its "must not appear" check keeps its meaning, and `TestOperatorDomainsTerminalClaimsReachableWithLedgerColumns` requests `?h_q=<its token>`, so neither depends on how many rows the shared database holds. Fixtures that set the old section counts set the new totals.
|
||||
- [x] 6.3 `internal/server`, the organization page, through the real loader (new states in `TestOrgEnrollmentGolden`, whose fixture drives `loadOrgEnrollmentData` from a request, or a test calling `loadOrgMembers` with an `organization.Querier` fake in the style of `failingEnrollmentOrgQ`): 24 members render the 10 most recently joined, "Showing 1–10 of 24", the picker, the header's "24 members", and two members joined at the same moment in person-id order; `m_per=25` renders all 24, so no cap remains; `m_q` matches a name, an email, and a mixed-case query; the members' pager carries the ledger's, Tier changes' and Entitlement changes' parameters, theirs carry `m_q`, and each of the three other navs' `hx-select-oob` names `#members-panel`; the labels "Search grants" and "Search members"; no element id repeated on the page. The cap's old assertions go.
|
||||
- [x] 6.4 Breaks, one per behaviour, each reverted after its test fails: the placements read's organization-name clause removed; the history's tiebreak removed; `PlacementsHeader` counting the page's rows; the placements nav's `Extra` dropped; the history's status facet validation removed; `ClearAllURL` keeping no `Extra`; the scoped Clear's `hx-select` dropped; the facet pills' `hx-select-oob` dropped; `#members-panel` dropped from the ledger's `SyncSelect`; the Members filter's email clause removed; the Members sort's person-id tiebreak removed; the search form's `Instance` left unset; the lint's stretch widened back to the whole file; the page header's count shown on a failed claims read; the `href` dropped from the scoped Clear; the lint's comment blanking removed; the marker accepted outside a template comment. Record each as CAUGHT or MISSED in this task.
|
||||
- the placements read's organization-name clause removed: CAUGHT by TestListPlacementsPageSearchesFiltersAndCounts
|
||||
- the history's tiebreak removed: CAUGHT by TestListTerminalClaimsPageTiesPageByClaimID
|
||||
- `PlacementsHeader` counting the page's rows: CAUGHT by TestOperatorDomainsPlacementsAndHistoryArePaged
|
||||
- the placements nav's `Extra` dropped: CAUGHT by TestOperatorDomainsLinksCarryTheOtherListsState
|
||||
- the history's status facet validation removed: CAUGHT by TestOperatorDomainsListFiltersNarrowTheirOwnList
|
||||
- `ClearAllURL` keeping no `Extra`: CAUGHT by TestListNavMathAndURLs
|
||||
- the scoped Clear's `hx-select` dropped: CAUGHT by TestFormPartPanelWayOutCarriesTheListsScoping
|
||||
- the facet pills' `hx-select-oob` dropped: CAUGHT by TestOperatorDomainsScopedControls
|
||||
- `#members-panel` dropped from the ledger's `SyncSelect`: CAUGHT by TestOrgEnrollmentMembersNavsCarryEachOther
|
||||
- the Members filter's email clause removed: CAUGHT by TestOrgEnrollmentMembersSearch
|
||||
- the Members sort's person-id tiebreak removed: CAUGHT by TestOrgEnrollmentMembersTiesBreakByPersonID
|
||||
- the search form's `Instance` left unset: CAUGHT by TestOperatorDomainsScopedControls
|
||||
- the lint's stretch widened back to the whole file: CAUGHT by TestTableWithoutListControlsChecksEachTable
|
||||
- the page header's count shown on a failed claims read: CAUGHT by TestOperatorDomainsFailedReadStatesNoCount
|
||||
- the `href` dropped from the scoped Clear: CAUGHT by TestFormPartPanelWayOutCarriesTheListsScoping
|
||||
- the comment blanking removed: CAUGHT by TestTableWithoutListControlsChecksEachTable
|
||||
- the marker accepted outside a template comment: CAUGHT by TestTableWithoutListControlsChecksEachTable
|
||||
|
||||
## 7. Docs and checks
|
||||
|
||||
- [x] 7.1 `docs/operator-ux-conventions.md`, the paging row: the exemption comment sits before the table it exempts and covers that one table, and each table on a page body needs its own pager.
|
||||
- [x] 7.2 `openspec validate domains-page-lists-governed --strict` passes; `make lint` passes; with the test stack up, the full suite passes on reset databases.
|
||||
- [x] 7.3 `make screens` is expected to change `operator-domains` (the placements' Organization column, the new searches, filters and pagers) and `operator-organization-detail` and its variants (Members' search and pager, and the cap line gone); every other change is read and named.
|
||||
- [x] 7.4 Hand captures at 1280 and 390 into `test/screens/domains-page-lists-governed/` with a sheet: the placements and history each with more rows than a page; a placements search by organization; the history filtered by status; a history search matching nothing; one Domains list paged with the others searched, showing the address bar; Members with more rows than a page and a search; the ledger's search cleared.
|
||||
@@ -71,7 +71,7 @@ A governed list whose rows carry a status vocabulary SHALL offer a filter over e
|
||||
|
||||
### Requirement: Embedded lists can adopt the shared controls
|
||||
|
||||
A governed list embedded in a page that hosts more than one (the organization composite's grants ledger and Tier changes) SHALL use the same search, facet, and pager mechanics under namespaced parameter names (a per-list prefix on q, page, and per; the facet parameter is always a full name), and every URL such a list builds — pager links, facet links, page-size links, and the search form's submission — SHALL preserve its sibling lists' state on the shared URL. Embedded lists default to a page size of 10 and offer a picker over the shared option set (10, 25, 50); an unknown size is ignored like an unknown facet, and the size parameter is omitted at the list's default so canonical views keep canonical URLs. Standalone pages keep the unprefixed names and the standard size. The flat "latest 16" cap remains only for embedded lists that have not adopted the controls (Members). An embedded list's controls SHALL re-render only their own panel, never scrolling the page (maintainer 2026-08-24): each control issues a scoped request targeting and selecting the panel's wrapper, pushes the resulting URL so views still deep-link, keeps the plain URL as the no-JS fallback, and refreshes its sibling panels out-of-band from the same response so no panel's links ever carry stale sibling state.
|
||||
A governed list embedded in a page that hosts more than one (the organization composite's grants ledger, Tier changes, Entitlement changes and Members; the Domains page's placements and claim history; Tier changes and Entitlement changes, the composite's audit trails, page without a search) SHALL use the same search, facet, and pager mechanics under namespaced parameter names (a per-list prefix on q, page, and per; the facet parameter is always a full name), and every URL such a list builds — pager links, facet links, page-size links, and the search form's submission — SHALL preserve its sibling lists' state on the shared URL. Embedded lists default to a page size of 10 and offer a picker over the shared option set (10, 25, 50); an unknown size is ignored like an unknown facet, and the size parameter is omitted at the list's default so canonical views keep canonical URLs. Standalone pages keep the unprefixed names and the standard size. An embedded list's controls SHALL re-render only their own panel, never scrolling the page (maintainer 2026-08-24): each control (the search and its Clear, the tabs and filter pills, the pager, the page-size links and the no-match clear link) issues a scoped request targeting and selecting the panel's wrapper, pushes the resulting URL so views still deep-link, keeps the plain URL as the no-JS fallback, and refreshes its sibling panels out-of-band from the same response so no panel's links ever carry stale sibling state.
|
||||
|
||||
#### Scenario: Interacting with an embedded list holds the viewport
|
||||
|
||||
@@ -85,7 +85,7 @@ A governed list embedded in a page that hosts more than one (the organization co
|
||||
|
||||
### Requirement: The operator Domains live-claims list is governed
|
||||
|
||||
The live-claims table on `/operator/domains` SHALL be a governed list under this contract: server-side pages of at most 50 rows with the true total ("Showing X–Y of N"), page state in `page`, a scoped server-side search over the claim's root name and the owning organization's name, and a status facet over the live vocabulary (`pending`, `active`). The page ordering (pending first, then newest) SHALL apply across the whole result, not per page, so the first page carries the claims that need attention. The page header's count SHALL be the true total for the current search and filter. The placements and history sections on the same page are not governed by this requirement.
|
||||
The live-claims table on `/operator/domains` SHALL be a governed list under this contract: server-side pages of at most 50 rows with the true total ("Showing X–Y of N"), page state in `page`, a scoped server-side search over the claim's root name and the owning organization's name, and a status facet over the live vocabulary (`pending`, `active`). The page ordering (pending first, then newest) SHALL apply across the whole result, not per page, so the first page carries the claims that need attention. The page header's count SHALL be the true total for the current search and filter. The live claims keep the unprefixed parameter names and their controls stay page navigations, because they are the page's subject and the page header counts them; their controls SHALL carry the placements' and the history's parameters in every URL they build and in their search form.
|
||||
|
||||
#### Scenario: More claims than a page
|
||||
|
||||
@@ -103,6 +103,11 @@ The live-claims table on `/operator/domains` SHALL be a governed list under this
|
||||
- **WHEN** an operator selects the `pending` facet
|
||||
- **THEN** only pending claims render, and the URL carries the facet so the view is addressable
|
||||
|
||||
#### Scenario: The claims' pager keeps the other lists' state
|
||||
|
||||
- **WHEN** an operator on `/operator/domains?p_q=wiki&h_page=2` pages the live claims
|
||||
- **THEN** the claims' next-page link carries `p_q=wiki` and `h_page=2` beside its own `page`
|
||||
|
||||
### Requirement: The operator FedWiki sites list is governed
|
||||
|
||||
The operator FedWiki sites list SHALL be a governed list under this contract: server-side pages of at most 50 rows with the true total, page state in `page`, a scoped server-side search over the site's domain, the owning workspace's name and the owning organization's name, and a status facet over the site status vocabulary. It grows one row per site created anywhere in the deployment, which is the property that makes a list governed.
|
||||
@@ -119,10 +124,71 @@ The operator FedWiki sites list SHALL be a governed list under this contract: se
|
||||
|
||||
### Requirement: A search placeholder names only what the search matches
|
||||
|
||||
Every governed list's search input SHALL carry a placeholder that names the fields the search matches and nothing else, with no "Search" or "Search by" before them, since the button beside the input says "Search". The placeholders are "Organization or account name" (billing accounts), "Organization or billing account" (subscriptions and payments), "Organization or invoice number" (invoices), "Name or email" (persons), "Domain or organization" (domains and member sites), "Ladder name" (plan ladders), "Name" (products), "Name or owner" (root pages) and "Organization or product" (page claims) (grant-resumption design D24).
|
||||
Every governed list's search input SHALL carry a placeholder that names the fields the search matches and nothing else, with no "Search" or "Search by" before them, since the button beside the input says "Search". The placeholders are "Organization or account name" (billing accounts), "Organization or billing account" (subscriptions and payments), "Organization or invoice number" (invoices), "Name or email" (persons), "Domain or organization" (domains, the domain claim history and member sites), "Served name or organization" (domain placements), "Ladder name" (plan ladders), "Name" (products), "Name or owner" (root pages) and "Organization or product" (page claims) (grant-resumption design D24).
|
||||
|
||||
#### Scenario: A placeholder does not restate the button
|
||||
|
||||
- **WHEN** an operator views the invoices list
|
||||
- **THEN** the search input's placeholder reads "Organization or invoice number"
|
||||
|
||||
#### Scenario: The placements placeholder names its two fields
|
||||
|
||||
- **WHEN** an operator views the Domains page's placements
|
||||
- **THEN** the placements search input's placeholder reads "Served name or organization"
|
||||
|
||||
### Requirement: The organization composite's Members is a governed list
|
||||
|
||||
The Members section on `/operator/organizations/{orgID}` SHALL be a governed list embedded in that page under the parameter prefix `m_`, defaulting to ten rows with the size picker over 10, 25 and 50, with the true total ("Showing X–Y of N") and the total for the current search as the section header's count. It SHALL search, case-insensitively, the member's display name and primary email, SHALL order by the most recent join first with the person id breaking ties, and SHALL carry no row cap. A failed read SHALL render the section's Problem notice and neither its empty state nor its table. Its search input's visually hidden label SHALL read "Search members", and the grants ledger's "Search grants".
|
||||
|
||||
#### Scenario: More members than a page
|
||||
|
||||
- **WHEN** an operator opens an organization with 24 active members
|
||||
- **THEN** Members renders the 10 most recently joined, "Showing 1–10 of 24" and the size picker, and no "Showing the latest 16" line
|
||||
- **AND** the Members header reads "24 members"
|
||||
|
||||
#### Scenario: Members search by email
|
||||
|
||||
- **WHEN** an operator submits `m_q=example.org` on the organization's page
|
||||
- **THEN** only members whose display name or primary email contains "example.org" render, with the total stated for that search, and the ledger's, Tier changes' and Entitlement changes' parameters ride along unchanged
|
||||
|
||||
### Requirement: The operator Domains placements and history are governed lists
|
||||
|
||||
The placements and claim history sections on `/operator/domains` SHALL each be a governed list embedded in that page under the embedded-list contract: placements under the parameter prefix `p_`, history under `h_`, each defaulting to ten rows with the size picker over 10, 25 and 50, server-side pages with the true total ("Showing X–Y of N"), and the true total for the current search and filter as the section header's count. Placements SHALL search, case-insensitively, the served name and the name of the organization that holds the claim the name is placed under, SHALL show that organization in an Organization column linking to its page, SHALL offer a state filter (`p_state`) over Servable and Unservable, and SHALL order by the served name. History SHALL keep the terminal statuses (expired, canceled, released), SHALL offer a status filter (`h_status`) over exactly those three, SHALL search the claimed root name and the organization's name, SHALL order newest first with the claim id breaking ties, and SHALL carry no row cap. A list with no rows and no search or filter SHALL render its empty state; a search or filter that matches nothing SHALL render the list's controls and the shared no-match line. A list whose read fails SHALL render its own Problem notice inside its panel, and neither its empty state nor its table, while the other lists render. Each embedded list sits in its own panel with its section header; every control of an embedded list (its search and the search's Clear, its filter pills, its pager, its page-size links and its no-match clear link) SHALL re-render only its own panel, refresh the other embedded list's panel and the live claims' panel out of band, push the resulting URL, and carry the other two lists' parameters in every URL it builds. Each of the page's three search inputs SHALL carry its own visually hidden label: "Search live claims", "Search placements" and "Search claim history".
|
||||
|
||||
#### Scenario: More placements than a page
|
||||
|
||||
- **WHEN** an operator opens `/operator/domains` on a deployment serving 35 names
|
||||
- **THEN** the placements section renders 10 rows, "Showing 1–10 of 35" and the size picker
|
||||
- **AND** the Placements header reads "35 served names"
|
||||
|
||||
#### Scenario: Placements search by organization
|
||||
|
||||
- **WHEN** an operator submits `p_q=podding` on `/operator/domains`
|
||||
- **THEN** only placements whose served name or holding organization's name contains "podding" render, each row naming its organization, with the total stated for that search
|
||||
|
||||
#### Scenario: History past two hundred
|
||||
|
||||
- **WHEN** an operator opens `/operator/domains` on a deployment with 230 terminal claims and pages the history to its last page
|
||||
- **THEN** the history's last page lists the oldest terminal claims, and the Claim history header reads "230 terminal claims"
|
||||
|
||||
#### Scenario: Paging one list keeps the others
|
||||
|
||||
- **WHEN** an operator has searched the live claims with `q=podding` and the history with `h_q=expired-co`, and pages the placements
|
||||
- **THEN** the placements panel shows its next page, the live claims and the history keep their searches, the scroll position is unchanged, the address bar carries all three lists' parameters, and every link and search form of the live claims and the history carries `q=podding`, `h_q=expired-co` and the placements' new `p_page`
|
||||
|
||||
#### Scenario: A search that matches nothing
|
||||
|
||||
- **WHEN** an operator submits a history search that matches no terminal claim
|
||||
- **THEN** the history section renders its search and the shared no-match line with its clear link, not its empty state
|
||||
- **AND** following the clear link returns the history to its unfiltered first page and keeps the live claims' and the placements' parameters
|
||||
|
||||
#### Scenario: History filtered by status
|
||||
|
||||
- **WHEN** an operator selects the history's Expired filter
|
||||
- **THEN** only expired claims render, the Claim history header counts them, and the URL carries `h_status=expired`
|
||||
|
||||
#### Scenario: A failed history read
|
||||
|
||||
- **WHEN** the history read fails while the live claims and placements load
|
||||
- **THEN** the history panel renders its Problem notice and no empty state, and the other two lists render their rows
|
||||
|
||||
|
||||
@@ -59,18 +59,28 @@ Defines the checks that keep the interface consistent: the lint rules that enfor
|
||||
|
||||
### Requirement: Lint refuses an unpaged body table
|
||||
|
||||
`member-console lint` SHALL fail with `table-without-list-controls` when a page-body template (a template named by a handler's `BodyTemplate`) renders a `<table` without the shared list controls (`listControls` or `listPager`), unless the template carries the exemption marker `list-scale exempt:` followed by the reason, placed as a template comment beside the table. The check is per template: a template that renders the shared list controls anywhere, or carries the marker anywhere, passes as a whole, so a second table beside a governed list is not examined by this rule. The marker is the only exemption; `internal/lint/anatomy_allowlist.txt` SHALL NOT be used for this rule. A table that grows with the deployment SHALL NOT carry the marker; the marker is for curated configuration lists and detail-page tables, the exemptions `operator-list-scale` names.
|
||||
`member-console lint` SHALL fail with `table-without-list-controls` when a page-body template (a template named by a handler's `BodyTemplate`) renders a `<table` that is not governed and not exempt. The check is per table: the rule walks the template's `<table` openings in source order, and a table is governed when a `listPager` call lies after this table's opening and before the next table's opening (or the template's end). Paging is what the rule checks; a governed list's search and filters are `operator-list-scale`'s requirements. A table is exempt when the marker `list-scale exempt:` followed by the reason, placed as a template comment, lies after the previous table's opening (or the template's start) and before this table's opening; the marker covers that one table. A template that governs or exempts one table therefore gives no pass to another table in it. The marker is the only exemption; `internal/lint/anatomy_allowlist.txt` SHALL NOT be used for this rule. A table that grows with the deployment SHALL NOT carry the marker; the marker is for curated configuration lists and detail-page tables, the exemptions `operator-list-scale` names.
|
||||
|
||||
#### Scenario: Unpaged runtime table fails lint
|
||||
|
||||
- **WHEN** a page-body template renders a `<table` with neither list-controls template call nor the marker
|
||||
- **WHEN** a page-body template renders a `<table` with neither its own `listPager` call after it nor a marker before it
|
||||
- **THEN** `member-console lint` reports `table-without-list-controls` with the file and line and exits non-zero
|
||||
|
||||
#### Scenario: Marked curated table passes
|
||||
|
||||
- **WHEN** a page-body template renders a `<table` and contains `{{/* list-scale exempt: curated configuration list */}}`
|
||||
- **WHEN** a page-body template renders a `<table` preceded by `{{/* list-scale exempt: curated configuration list */}}`
|
||||
- **THEN** `member-console lint` reports nothing for that table
|
||||
|
||||
#### Scenario: A second table beside a governed list fails
|
||||
|
||||
- **WHEN** a page-body template renders one table followed by its `listPager` call, and a second table after that call with no pager and no marker of its own
|
||||
- **THEN** `member-console lint` reports `table-without-list-controls` at the second table's line and nothing at the first
|
||||
|
||||
#### Scenario: One marker covers one table
|
||||
|
||||
- **WHEN** a page-body template renders two tables and carries one `list-scale exempt:` marker, placed before the first
|
||||
- **THEN** `member-console lint` reports `table-without-list-controls` at the second table's line
|
||||
|
||||
#### Scenario: Fragments are out of scope
|
||||
|
||||
- **WHEN** a partial that no handler names as a body template renders a `<table`
|
||||
|
||||
Reference in New Issue
Block a user