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
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- func AuditLogPage(runs []entity.ConnectorRun, connectorsByID map[string]entity.Connector, ...) templ.Component
- func ConfigsTable(rows []entity.Config, actionBase string, _ string, _ string) templ.Component
- func ConfigsTableFull(rows []entity.Config, actionBase string) templ.Component
- func ConnectorAccountOpsPage(mod connector.Module, row *entity.Connector, acc *entity.ConnectorAccount, ...) templ.Component
- func ConnectorDetailPage(mod connector.Module, row *entity.Connector, configs []entity.Config, ...) templ.Component
- func ConnectorHistoryPage(mod connector.Module, row *entity.Connector, runs []entity.ConnectorRun, ...) templ.Component
- func ConnectorIcon(icon string) templ.Component
- func ConnectorListPage(mod connector.Module, rows []entity.Connector, tagsByRow map[string][]string, ...) templ.Component
- func ConnectorTestPage(mod connector.Module, row *entity.Connector, activeOp string, ...) templ.Component
- func ConnectorsIndexPage(groups []ConnectorIndexGroup, canCreate bool, user *entity.User) templ.Component
- func CustomBadge(info *CustomDefInfo) templ.Component
- func CustomConnectAccount(instanceID, account string, connected bool) templ.Component
- func CustomDangerRow(info *CustomDefInfo) templ.Component
- func CustomDefActions(info *CustomDefInfo) templ.Component
- func CustomMCPServerFormPage(serverID string, form *customconn.ServerForm, tools []MCPToolRow, ...) templ.Component
- func CustomManualPage(categories []string, user *entity.User) templ.Component
- func CustomPastePage(aiProviders []string, user *entity.User) templ.Component
- func CustomReloadBanner(info *CustomDefInfo) templ.Component
- func CustomResyncTools(info *CustomDefInfo, instanceID string) templ.Component
- func CustomReviewPage(mode string, defID string, draft any, categories []string, info *CustomDefInfo, ...) templ.Component
- func HasHealthCheck(mod connector.Module) bool
- func IconPicker(inputID string) templ.Component
- func JobDetailPage(j *entity.Job, configs []entity.Config, editConfigKey string, ...) templ.Component
- func JobStatusBadge(status entity.JobStatus, enabled bool) templ.Component
- func Layout(title string, user *entity.User) templ.Component
- func OpsSection(mod connector.Module, opStates map[string]connectors.OpState, ...) templ.Component
- func ToolDetailPage(t tool.Tool, configs []entity.Config, editKey string, user *entity.User, ...) templ.Component
- type ConnectorIndexCard
- type ConnectorIndexGroup
- type CustomDefInfo
- type HealthBanner
- type MCPToolRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditLogPage ¶ added in v0.9.0
func AuditLogPage(runs []entity.ConnectorRun, connectorsByID map[string]entity.Connector, usersByID map[string]string, f connectors.AuditFilter, fromStr, toStr string, page, totalPages, total int, user *entity.User) templ.Component
AuditLogPage renders the cross-connector run history for admins. Filters are URL-driven (source, status, from, to); pagination is server-side. fromStr / toStr are pre-formatted "2006-01-02" strings used to pre-fill the date inputs.
func ConfigsTable ¶
ConfigsTable renders all configs as an always-visible block form. editKey and cancelHref are kept for API compatibility but unused.
func ConfigsTableFull ¶ added in v0.10.0
ConfigsTableFull is the picker-aware entry point. Callers that need picker fields render through here; ConfigsTable above stays unchanged for the legacy two-section layout.
func ConnectorAccountOpsPage ¶ added in v0.16.0
func ConnectorDetailPage ¶ added in v0.4.0
func ConnectorDetailPage(mod connector.Module, row *entity.Connector, configs []entity.Config, opStates map[string]connectors.OpState, editKey string, user *entity.User, _ HealthBanner, isAdmin bool, customInfo *CustomDefInfo) templ.Component
ConnectorDetailPage is the per-row admin surface for a connector row. Identity (label + actions), credentials, and the operations table. Test runs and run history live on dedicated sibling pages reached via the per-operation action links — keeps this page focused on settings. ConnectorDetailPage renders the per-row admin surface. oauthURL is non-empty when the connector supports OAuth AND client_id is configured — the handler computes this so the template stays free of config-service access.
func ConnectorHistoryPage ¶ added in v0.4.0
func ConnectorHistoryPage(mod connector.Module, row *entity.Connector, runs []entity.ConnectorRun, usersByID map[string]string, filter connectors.RunFilter, page, totalPages, total int, user *entity.User) templ.Component
ConnectorHistoryPage is the standalone audit log for one connector row. Filter chips (operation, source, status, user) are URL-driven so links stay shareable. Each row expands inline to reveal the request / response JSON without a round trip.
func ConnectorIcon ¶ added in v0.17.0
ConnectorIcon renders a module icon: emoji/text verbatim, inline <svg> and data:image payloads as an <img> sized to its container.
func ConnectorListPage ¶ added in v0.4.0
func ConnectorTestPage ¶ added in v0.4.0
func ConnectorTestPage(mod connector.Module, row *entity.Connector, activeOp string, prefill map[string]string, accounts []entity.ConnectorAccount, user *entity.User) templ.Component
ConnectorTestPage is the standalone Postman-style runner for one connector row. The operation dropdown is URL-synced (?op=) so that switching ops never costs a page back-and-forth, and links from the detail page can preselect a specific op.
func ConnectorsIndexPage ¶ added in v0.14.8
func ConnectorsIndexPage(groups []ConnectorIndexGroup, canCreate bool, user *entity.User) templ.Component
ConnectorsIndexPage lists every connector definition, grouped by category tag into bordered group cards (same chrome as the home page), with a search box and category filter chips. It is the destination of the single "Connectors" launcher on the home page: the connector set is expected to grow large, so this page stays browsable while the home grid stays clean.
func CustomBadge ¶ added in v0.17.0
func CustomBadge(info *CustomDefInfo) templ.Component
CustomBadge marks a custom definition in the list/detail header: source badge + the connection status chip (MCP only — Connected stays until a re-sync/reconnect flips it, Disconnected after a failed probe, Disabled when the def is switched off; cURL/manual defs have no connection to track). Pure display — the definition actions live in CustomDefActions on the list page.
func CustomConnectAccount ¶ added in v0.17.0
CustomConnectAccount is the per-instance OAuth login control on the instance detail page: full-page redirect into the authorization server; the callback attaches the account to this row and re-syncs the def. account is the row's connected marker — present, it renders as a chip and the button flips to Reconnect.
func CustomDangerRow ¶ added in v0.17.0
func CustomDangerRow(info *CustomDefInfo) templ.Component
CustomDangerRow is the definition-level danger zone: the disable toggle (zero operations served until re-enabled; cards and instance rows stay) and the delete (removes the definition, its instances, and — for MCP defs — the server registration; run history survives and the access tag is kept for re-creates).
func CustomDefActions ¶ added in v0.17.0
func CustomDefActions(info *CustomDefInfo) templ.Component
CustomDefActions is the definition-owner button group on the connector list page: the jump into the definition editor. Re-sync lives on each instance page (CustomResyncTools) — the probe runs under that instance's account.
func CustomMCPServerFormPage ¶ added in v0.17.0
func CustomMCPServerFormPage(serverID string, form *customconn.ServerForm, tools []MCPToolRow, info *CustomDefInfo, user *entity.User) templ.Component
CustomMCPServerFormPage renders the MCP server registration form — label + URL, the four auth scheme panels (one visible at a time, toggled by custom_mcp_form.js), scheme-independent extra headers, the Test-connection card, and the tool exclude-list. Saving creates the connector directly: every tool the server lists is an operation unless ticked as excluded, and tools added server-side appear after a reload with no wick change. Save stays disabled until one successful test in this form session; the server re-enforces the gate in SaveServer. serverID=="" registers a new server, otherwise the form edits the stored row (form prefilled; secret values stay as their wick_enc_ tokens and pass through unchanged unless replaced; tools carries the live catalog probed server-side for the exclude list — empty when the server was unreachable at render).
func CustomManualPage ¶ added in v0.17.0
CustomManualPage is the blank/manual builder: the same draft editor as the review page, split into a three-step stepper (Meta → Configs → Operations). custom_manual.js drives the step visibility on top of custom_review.js, which owns the form itself. Saving posts the same Draft to the same create endpoint as the paste flow.
func CustomPastePage ¶ added in v0.17.0
CustomPastePage is the entry of the paste flow: one big paste box behind two parser tabs. The cURL tab is the deterministic default; the AI tab renders only when at least one structured-output provider exists — aiProviders carries the selectable instance names (resolved live, so newly configured providers appear on refresh). Parse posts the box to /manager/connectors/custom/parse and, on success, the JS stores the returned draft in sessionStorage and navigates to the review page.
func CustomReloadBanner ¶ added in v0.17.0
func CustomReloadBanner(info *CustomDefInfo) templ.Component
CustomReloadBanner sits at the top of a custom connector's detail page while the stored definition is newer than the serving module. Reload rebuilds + atomically swaps the executor; until then the old in-memory module keeps serving.
func CustomResyncTools ¶ added in v0.17.0
func CustomResyncTools(info *CustomDefInfo, instanceID string) templ.Component
CustomResyncTools is the per-instance catalog re-sync on an MCP def's instance page: re-fetches the server's live tools/list under THIS instance's account (oauth servers may expose different tools per account) and atomically swaps the fresh operation set in.
func CustomReviewPage ¶ added in v0.17.0
func CustomReviewPage(mode string, defID string, draft any, categories []string, info *CustomDefInfo, user *entity.User) templ.Component
CustomReviewPage renders the review form for a custom connector draft. mode "new" loads the draft from sessionStorage (stored there by the paste / import JS); mode "edit" embeds the stored definition as JSON. The form itself is rendered client-side by custom_review.js into the containers customDraftForm lays out.
func HasHealthCheck ¶ added in v0.10.0
HasHealthCheck reports whether a connector module registered a HealthCheck hook. The detail page renders the "Check Permissions" button only when this is true so connectors without a hook do not expose a no-op action.
func IconPicker ¶ added in v0.17.0
IconPicker is the connector icon control: a preview button opening a panel with an emoji grid plus a paste slot for inline <svg> / data:image payloads (validated server-side to 32KB). The value lives in a hidden input under inputID so existing form JS keeps reading / writing it; icon_picker.js listens for `change` on that input to refresh the preview after programmatic prefill.
func JobDetailPage ¶
func JobDetailPage(j *entity.Job, configs []entity.Config, editConfigKey string, user *entity.User, errMsg string, bannerEntry *ui.MissingEntry) templ.Component
JobDetailPage is the one-stop admin view for a single job: settings (schedule, enabled, max runs) and runtime configs. bannerEntry is non-nil when this job still has Required configs empty; the ScopedSetupBanner above the body nudges the admin.
func Layout ¶
Layout is the shared chrome (nav + tabs + dark toggle + user menu) for every manager screen. Pages wrap their <main> body as children.
func OpsSection ¶ added in v0.16.0
func OpsSection(mod connector.Module, opStates map[string]connectors.OpState, rowBaseURL string, bulkURL string, showActions bool) templ.Component
OpsSection renders the shared Operations table used by both the connector detail page and the per-account ops page.
rowBaseURL — base URL for per-op toggle + test/history, e.g.
/manager/connectors/slack/{rowID}
For account mode: /manager/connectors/slack/{rowID}/accounts/{accID}
bulkURL — POST target for Enable all / Disable all; empty = hide bulk buttons opStates — current enabled state per op key showActions — show Test / History links (false in account mode)
func ToolDetailPage ¶
func ToolDetailPage(t tool.Tool, configs []entity.Config, editKey string, user *entity.User, bannerEntry *ui.MissingEntry) templ.Component
ToolDetailPage is the per-tool config editor. No schedule, no runs — just the reusable configs table scoped to Meta.Key. bannerEntry is non-nil when this tool still has Required configs empty; the ScopedSetupBanner above the body nudges the admin to fill them in.
Types ¶
type ConnectorIndexCard ¶ added in v0.14.8
type ConnectorIndexCard struct {
Key string
Name string
Description string
Icon string
Category string // category tag name, used for grouping + filtering
OpCount int
ActiveCount int // enabled instances with complete config (ready to use)
NeedsSetupCount int // enabled instances with required config still missing
DisabledCount int // instances the caller can manage that are row-disabled
System bool
// Custom marks definitions that live in the custom_connectors table
// instead of Go code; CustomSource carries the import origin shown on
// the badge ("cURL" / "MCP" / "Manual"); NeedsReload flags a custom
// def whose stored definition is newer than the module currently
// serving.
Custom bool
CustomSource string
NeedsReload bool
}
ConnectorIndexCard is one connector definition rendered on the connectors index page (/manager/connectors). It collapses a module's Meta plus the number of rows the caller can manage into a single card that links to the per-connector rows page.
type ConnectorIndexGroup ¶ added in v0.14.8
type ConnectorIndexGroup struct {
Name string
Description string
Cards []ConnectorIndexCard
}
ConnectorIndexGroup is a category section on the connectors index page, rendered as a bordered group card (same chrome as the home page groups). Name/Description come from the category tag; Cards are the connectors tagged with it, sorted by display name.
type CustomDefInfo ¶ added in v0.17.0
type CustomDefInfo struct {
DefID string
SourceLabel string // "cURL" | "MCP" | "Manual"
Dirty bool
Disabled bool
MCP bool
Connected bool // last tools/list probe OK (MCP only)
Tested bool // server has been probed at least once (MCP only)
OAuth bool // server uses the oauth scheme (per-instance accounts)
// OAuthAccount is the viewed instance's resolved identity (email /
// username from OIDC) — header chip on the detail page; empty when
// the server yields no identity (chip hidden). OAuthConnected says
// whether an access token is attached at all — drives the
// Connect vs Reconnect button independent of identity.
OAuthAccount string
OAuthConnected bool
}
CustomDefInfo decorates the connector list/detail pages when the key belongs to a custom definition: the "Custom · <source>" badge, the edit-definition link, the reload banner (Dirty), the disable toggle, and the delete-definition danger row. MCP defs additionally carry the connection status chip (Connected / Disconnected, from the server row's last probe) and the Re-sync action — cURL/manual defs have no connection to track. Nil on built-in connectors.
type HealthBanner ¶ added in v0.10.0
type HealthBanner struct {
Kind string // "ok" | "err" — empty means no banner
ErrorMessage string
NewlyLocked []string
NewlyCleared []string
}
HealthBanner is the data the row detail page renders right above the Operations section after a health-check round-trip. Kind picks the styling; the three slices show op transitions and granular errors.
func HealthBannerFromQuery ¶ added in v0.10.0
func HealthBannerFromQuery(q url.Values) HealthBanner
HealthBannerFromQuery decodes the redirect query params runConnectorHealthCheck stamps onto the detail-page URL. Returns a zero-value banner (no render) when the page was opened without health-check params.
type MCPToolRow ¶ added in v0.17.0
MCPToolRow is one row of the exclude-list on the MCP server form — the live tools/list catalog slimmed for display. Serialized into the page as JSON for custom_mcp_form.js to render.
Source Files
¶
- audit_log_templ.go
- config_helpers.go
- configs_templ.go
- connector_account_ops_templ.go
- connector_detail_templ.go
- connector_history_templ.go
- connector_list_templ.go
- connector_ops_templ.go
- connector_slack.go
- connector_test_templ.go
- connectors_index.go
- connectors_index_templ.go
- custom.go
- custom_banner_templ.go
- custom_manual_templ.go
- custom_mcp_form_templ.go
- custom_paste_templ.go
- custom_review_templ.go
- helpers.go
- icon_picker_templ.go
- icon_templ.go
- job_detail_templ.go
- layout_templ.go
- tool_detail_templ.go