Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- func AccessTokensPage(rows []AccessTokenRow, stats AccessTokensStats, user *entity.User) templ.Component
- func AdminJobsPage(rows []JobRow, allTags []*entity.Tag, user *entity.User) templ.Component
- func AdminLayout(title string, activeTab string, user *entity.User) templ.Component
- func ConfigsHubPage(user *entity.User) templ.Component
- func ConnectionsAdminPage(rows []ConnectionRow, stats ConnectionsAdminStats, user *entity.User) templ.Component
- func ConnectorsAdminPage(rows []ConnectorAdminRow, allTags []*entity.Tag, user *entity.User) templ.Component
- func DashboardPage(stats DashboardStats, missing []MissingEntry, user *entity.User) templ.Component
- func JustCreatedUserBanner(email, password string) templ.Component
- func ProvidersAdminPage(rows []ProviderAdminRow, allTags []*entity.Tag, user *entity.User) templ.Component
- func ResourcesAdminPage(title string, baseURL string, rows []ResourceAdminRow, allTags []*entity.Tag, ...) templ.Component
- func SSOPage(rows []entity.SSOProvider, callbackURL string, user *entity.User) templ.Component
- func SchedulesAdminPage(vm ScheduleAdminVM, user *entity.User) templ.Component
- func SystemPage(d SystemPageData, user *entity.User) templ.Component
- func TagRowFragment(t *entity.Tag, editing bool) templ.Component
- func TagsPage(tags []*entity.Tag, user *entity.User, editID string) templ.Component
- func ToolRowFragment(row ToolRow, tagsJSON string) templ.Component
- func ToolsPage(rows []ToolRow, allTags []*entity.Tag, user *entity.User) templ.Component
- func UserRowFragment(row UserRow, tagsJSON string, adminCount int) templ.Component
- func UsersPage(rows []UserRow, allTags []*entity.Tag, user *entity.User, adminCount int, ...) templ.Component
- func VariablesPage(rows []entity.Config, editKey string, user *entity.User) templ.Component
- type AccessTokenRow
- type AccessTokensStats
- type ConnectionRow
- type ConnectionsAdminStats
- type ConnectorAccountAdminRow
- type ConnectorAdminRow
- type DashboardStats
- type JobRow
- type MergeTarget
- type MissingEntry
- type ProviderAdminRow
- type ResourceAdminRow
- type ScheduleAdminRow
- type ScheduleAdminVM
- type ScheduleUserOption
- type SystemPageData
- type ToolRow
- type UserCreateResult
- type UserRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessTokensPage ¶ added in v0.4.0
func AccessTokensPage(rows []AccessTokenRow, stats AccessTokensStats, user *entity.User) templ.Component
func AdminJobsPage ¶
func AdminLayout ¶
func ConfigsHubPage ¶
ConfigsHubPage is the landing page for /admin/advanced. It's a card grid that points to each subsection (Variables, SSO, …). Add a new card when adding a new config category.
func ConnectionsAdminPage ¶ added in v0.4.0
func ConnectionsAdminPage(rows []ConnectionRow, stats ConnectionsAdminStats, user *entity.User) templ.Component
func ConnectorsAdminPage ¶ added in v0.4.0
func DashboardPage ¶
func DashboardPage(stats DashboardStats, missing []MissingEntry, user *entity.User) templ.Component
func JustCreatedUserBanner ¶ added in v0.16.0
JustCreatedUserBanner is the green callout shown once after a user is created. The plaintext password is unrecoverable from this point on.
func ProvidersAdminPage ¶ added in v1.10.0
func ProvidersAdminPage(rows []ProviderAdminRow, allTags []*entity.Tag, user *entity.User) templ.Component
ProvidersAdminPage lists every provider instance with its two tag sets.
The two columns are two different jobs, not two strengths of the same one. Access decides who may PICK this provider for a project, session, channel or workflow; Manage decides who may look after its ACCOUNT in the Providers menu. Most people need the first and should never see the second, which is why the menu itself is manage-only.
Their empty states also fall opposite ways — blank Access means everyone, blank Manage means nobody but admins — so each picker says which, rather than leaving an operator to infer it once and wrongly.
func ResourcesAdminPage ¶ added in v0.17.0
func SSOPage ¶
SSOPage lists every SSO provider. Each provider is a card with an inline edit form — there's only Google for now, but the UI scales to any providers Bootstrap registers.
func SchedulesAdminPage ¶ added in v1.10.0
func SchedulesAdminPage(vm ScheduleAdminVM, user *entity.User) templ.Component
SchedulesAdminPage lists every scheduled message with the identity its fires run as, and lets an admin re-point that identity.
The "runs as nobody" case is called out rather than left blank: such a schedule falls back to wick's internal principal, which carries no access tags, so it silently reaches less than the person who created it. That is the failure this page is meant to make obvious at a glance.
func SystemPage ¶ added in v0.23.3
func SystemPage(d SystemPageData, user *entity.User) templ.Component
SystemPage renders version info, the update controls (Check → progress → Apply & restart), and the auto-update toggle. The inline script opens an SSE stream for live progress and, on Apply, swaps to a "Restarting…" panel that polls /health until the new build answers, then reloads.
func UserRowFragment ¶
Types ¶
type AccessTokenRow ¶ added in v0.4.0
type AccessTokenRow struct {
Token entity.PersonalAccessToken
OwnerName string
OwnerEmail string
}
AccessTokenRow is the view model for one Personal Access Token in the admin access-tokens table. OwnerName / OwnerEmail are joined from the user table so the row can show who owns the token without an N+1 lookup. PATs are general-purpose bearers — MCP is just one caller — so the surface lives at /admin/access-tokens.
type AccessTokensStats ¶ added in v0.4.0
AccessTokensStats summarises the PAT footprint for the admin landing banner. Counts are computed by the handler so the template stays pure-rendering.
type ConnectionRow ¶ added in v0.4.0
type ConnectionRow struct {
UserID string
OwnerName string
OwnerEmail string
ClientID string
ClientName string
GrantedAt time.Time
LastUsedAt *time.Time
TokenCount int
}
ConnectionRow is the view model for one (user, OAuth client) grant in the admin connections table. Owner fields come from the user table; Granted/LastUsed/TokenCount are aggregated across the active access + refresh tokens for that pair.
type ConnectionsAdminStats ¶ added in v0.4.0
ConnectionsAdminStats summarises OAuth grant activity for the admin connections landing.
type ConnectorAccountAdminRow ¶ added in v1.2.9
type ConnectorAccountAdminRow struct {
Account entity.ConnectorAccount
OwnerLabel string
TagIDs []string
}
ConnectorAccountAdminRow is the view model for one connected OAuth account under its connector instance. OwnerLabel is the wick user who connected it ("" when the account predates ownership being recorded).
type ConnectorAdminRow ¶ added in v0.4.0
type ConnectorAdminRow struct {
Connector entity.Connector
ModuleName string
ModuleIcon string
ModuleMissing bool
TagIDs []string
// Accounts are the OAuth identities connected to this instance, listed
// underneath it. Each one is taggable in its own right: an account is
// private to whoever connected it unless the instance shares the whole
// pool, so a tag here is how an admin hands ONE account to a team.
Accounts []ConnectorAccountAdminRow
}
ConnectorAdminRow is the view model for a single connector instance in the admin connectors table. ModuleName/Icon come from the in-memory registry; when the row's Key has no registered module (deleted from code after a deploy) ModuleMissing is true so the UI can mark it.
type DashboardStats ¶
type JobRow ¶
JobRow is the view model for a single job row in the admin jobs table.
IsSystem mirrors the entity.Tag.IsSystem flag for any tag attached to this job's path. When true the row is rendered read-only — no Hide button, tag picker locked, no Save — because a System job is owned by code (see internal/tags/defaults.go and connector-runs-purge for the canonical example). Server-side guards in handler.setJobDisabled and handler.setJobTags backstop the same rule.
type MergeTarget ¶ added in v1.0.0
MergeTarget is one selectable destination account.
type MissingEntry ¶
type ProviderAdminRow ¶ added in v1.10.0
type ProviderAdminRow struct {
Type string
Name string
Binary string
Disabled bool
// AccessTagIDs narrow WHO SEES the instance. Empty = everyone.
AccessTagIDs []string
// ManageTagIDs grant reconnect + usage re-check. Empty = admins only.
ManageTagIDs []string
// Path is the instance key used in the form URLs ("claude/engineer").
Path string
}
ProviderAdminRow is one provider instance on the access page: who may see it, and who may act on it.
type ResourceAdminRow ¶ added in v0.17.0
type ResourceAdminRow struct {
ID string
Name string
Icon string
CreatedBy string
TagIDs []string
Path string
}
ResourceAdminRow is a generic view model used by the Projects, Workflows, and Skills admin pages. Each row shows a name, optional icon, optional created-by audit field, and a tag picker addressed by Path.
type ScheduleAdminRow ¶ added in v1.10.0
type ScheduleAdminRow struct {
ID string
Message string
Kind string
Status string
Cron string
NextRunAt string
// NextRunLabel is the short, human form of NextRunAt ("13 Sep 10:30").
// The full timestamp stays in NextRunAt for the tooltip — a column of
// RFC3339 strings is what pushed this table into a sideways scroll.
NextRunLabel string
SessionID string
SessionMode string
ProjectID string
ProjectName string
CreatedBy string
OwnerUserID string
OwnerLabel string
// RunAsUserID is the explicit admin override, empty when the schedule
// simply runs as its owner.
RunAsUserID string
// RunAs is what the runner will actually use, and RunAsLabel its display
// name. Empty means the fire is attached to nobody.
RunAs string
RunAsLabel string
}
ScheduleAdminRow is one scheduled message on the admin page. Identity is the point of this screen, so OwnerLabel / RunAsLabel are always rendered — including when they are empty, which is the state worth noticing.
type ScheduleAdminVM ¶ added in v1.10.0
type ScheduleAdminVM struct {
Rows []ScheduleAdminRow
Users []ScheduleUserOption
// Status is the active filter — "live" (default), "all", or a concrete
// status like "done". Live is the default because a finished schedule can
// no longer run as the wrong user, so it is never the thing to act on.
Status string
Query string
// Counts is per-filter totals over EVERY schedule, so a tab still says how
// much sits behind it while you are looking at another one.
Counts map[string]int
Page int
Pages int
Total int
PageSize int
Configured bool
}
ScheduleAdminVM is the whole page: the rows for the CURRENT filter and page, plus the state needed to render the controls and keep them sticky across navigation.
type ScheduleUserOption ¶ added in v1.10.0
ScheduleUserOption is one entry in the "Run as" picker.
type SystemPageData ¶ added in v0.23.3
type SystemPageData struct {
// App identity + build (mirrors wick_info).
AppName string // configured app name (e.g. "wick-lab")
CurrentVersion string // running app version
WickVersion string // embedded wick framework version
Commit string // build commit (short)
BuildTime string // build timestamp
AccessType string // "http" (web) or "cli"
DBType string // "sqlite" / "postgres" / "none"
DBStatus string // "connected" / "error: …" / "disabled"
// Update state.
Configured bool // a release source is set; check/apply are usable
IsOfficial bool // release repo is the canonical wick repo (wick-agent)
LatestVersion string // last-known latest tag (may be empty)
HasStaged bool // a downloaded binary is ready to apply
StagedVersion string // version of the staged binary
Phase string // coordinator phase at load time
Percent int // download percent at load time
ReleaseNotes string // latest release body (what changed)
PublishedAt string // latest release date (RFC3339)
WantedAsset string // asset that was missing when no build exists for this OS
ChangelogURL string // link to the full changelog (site or GitHub releases)
Error string // last error, if any
AutoUpdate bool // auto-update toggle state
// Wick framework update state (non-official builds). Sourced from the
// background version cache — the public wick repo is always checkable,
// independent of whether THIS app set a release source. Rendered
// server-side at first paint, so no live fetch on load. On official
// builds these go unused (app == framework; the app fields above carry
// the framework's update state too).
WickUpdateKnown bool // a wick version check has resolved
WickUpdate bool // a newer wick framework release exists
WickLatest string // latest wick release tag
WickNotes string // wick changelog (current→latest), markdown
WickPublishedAt string // latest wick release date (RFC3339)
WickChangelogURL string // full wick changelog link
// Live process state, so the page can tell a completed handover from a
// page it merely reloaded, and can show what a Force swap would cut off.
ServingPID int // pid of the process that rendered this page
Settle string // drain settle window, e.g. "15s"
// A build that is installed or downloaded but not yet running. The card
// only appears while one is waiting — with nothing to swap there is
// nothing to say.
SwapPending bool
SwapFrom string // version running now
SwapTo string // version waiting
SwapSource string // binary path, or "staged update (not applied yet)"
SwapBuilt string // build timestamp of the waiting binary
Graceful bool // this process can hand its socket to a successor
Busy []string // work in flight right now ("agent turns=2 (sess-x)")
}
SystemPageData is everything the System page needs for first paint. The live download progress arrives over SSE after load, but these fields make the no-JS / first-render state correct: version rows, the auto-update toggle, and whether a staged update is ready to apply.
type ToolRow ¶
type ToolRow struct {
Tool tool.Tool
Visibility entity.ToolVisibility
Disabled bool
TagIDs []string
ConfigCount int
}
ToolRow is the view model for a single tool row in the admin table.
type UserCreateResult ¶ added in v0.16.0
UserCreateResult carries the one-time outcome of an admin "Add user" submit. Password is the freshly generated plaintext, surfaced once in a banner on the synchronous POST response and never stored or shown again. ErrMsg holds a creation error (e.g. duplicate email) to render instead. All fields are zero on a normal page load.
type UserRow ¶
type UserRow struct {
User *entity.User
TagIDs []string
// NeedsMerge marks an account created by a channel that reports no email
// (Telegram), which wick therefore could not match to a person. Such a row
// is not meant to be approved on its own — approving it would leave that
// person with two accounts — so the UI offers a merge instead.
NeedsMerge bool
// MergeTargets lists the accounts this one may be folded into. Only
// approved non-channel accounts, since merging into a pending or synthetic
// account just moves the problem.
MergeTargets []MergeTarget
}
UserRow is the view model for a single user row in the admin table.