view

package
v0.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 10 Imported by: 0

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

Index

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 AdminJobsPage(rows []JobRow, allTags []*entity.Tag, user *entity.User) templ.Component

func AdminLayout

func AdminLayout(title string, activeTab string, user *entity.User) templ.Component

func ConfigsHubPage

func ConfigsHubPage(user *entity.User) templ.Component

ConfigsHubPage is the landing page for /admin/configs. 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 ConnectorsAdminPage(rows []ConnectorAdminRow, allTags []*entity.Tag, user *entity.User) templ.Component

func DashboardPage

func DashboardPage(stats DashboardStats, missing []MissingEntry, user *entity.User) templ.Component

func SSOPage

func SSOPage(rows []entity.SSOProvider, callbackURL string, user *entity.User) templ.Component

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 TagRowFragment

func TagRowFragment(t *entity.Tag, editing bool) templ.Component

func TagsPage

func TagsPage(tags []*entity.Tag, user *entity.User, editID string) templ.Component

func ToolRowFragment

func ToolRowFragment(row ToolRow, tagsJSON string) templ.Component

func ToolsPage

func ToolsPage(rows []ToolRow, allTags []*entity.Tag, user *entity.User) templ.Component

func UserRowFragment

func UserRowFragment(row UserRow, tagsJSON string, adminCount int) templ.Component

func UsersPage

func UsersPage(rows []UserRow, allTags []*entity.Tag, user *entity.User, adminCount int) templ.Component

func VariablesPage

func VariablesPage(rows []entity.Config, editKey string, user *entity.User) templ.Component

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

type AccessTokensStats struct {
	ActiveTokens int
	UsersWithPAT int
	NeverUsed    int
}

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

type ConnectionsAdminStats struct {
	ActiveGrants  int
	UniqueClients int
	UniqueUsers   int
}

ConnectionsAdminStats summarises OAuth grant activity for the admin connections landing.

type ConnectorAdminRow added in v0.4.0

type ConnectorAdminRow struct {
	Connector     entity.Connector
	ModuleName    string
	ModuleIcon    string
	ModuleMissing bool
	TagIDs        []string
}

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 DashboardStats struct {
	TotalJobs          int
	EnabledJobs        int
	RunningJobs        int
	TotalTools         int
	TotalConfigs       int
	MissingConfigs     int
	TotalConnectors    int
	DisabledConnectors int
	ActiveTokens       int
	ConnectedApps      int
}

type JobRow

type JobRow struct {
	Job         entity.Job
	Disabled    bool
	IsSystem    bool
	TagIDs      []string
	ConfigCount int
}

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 MissingEntry

type MissingEntry struct {
	Scope   string
	Key     string
	Name    string
	Icon    string
	URL     string
	Missing []string
}

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 UserRow

type UserRow struct {
	User   *entity.User
	TagIDs []string
}

UserRow is the view model for a single user row in the admin table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL