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 ¶
- 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 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, user *entity.User) templ.Component
- func HasHealthCheck(mod connector.Module) bool
- 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 HealthBanner
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) 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 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, 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 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 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
}
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 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.
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
- helpers.go
- job_detail_templ.go
- layout_templ.go
- tool_detail_templ.go