view

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 14 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

Index

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

func ConfigsTable(rows []entity.Config, actionBase string, _ string, _ string) templ.Component

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

func ConfigsTableFull(rows []entity.Config, actionBase string) templ.Component

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 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, oauthURL string) 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 ConnectorListPage(mod connector.Module, rows []entity.Connector, tagsByRow map[string][]string, user *entity.User, oauthAppCfg ConnectorOAuthAppConfig) templ.Component

ConnectorListPage shows every row that backs a single connector definition. One Meta.Key can have many rows (e.g. Loki Prod / Staging / Dev), each carrying its own credentials and tag set. Rows are listed here with quick actions; clicking a row opens the detail page where configs are edited and operations are tested.

func ConnectorTestPage added in v0.4.0

func ConnectorTestPage(mod connector.Module, row *entity.Connector, activeOp string, prefill map[string]string, 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 HasHealthCheck added in v0.10.0

func HasHealthCheck(mod connector.Module) bool

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 JobStatusBadge

func JobStatusBadge(status entity.JobStatus, enabled bool) templ.Component

func Layout

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

Layout is the shared chrome (nav + tabs + dark toggle + user menu) for every manager screen. Pages wrap their <main> body as children.

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 ConnectorOAuthAppConfig added in v0.13.0

type ConnectorOAuthAppConfig struct {
	Enabled      bool   // true = render the OAuth App section
	ClientID     string // empty when not yet configured
	ClientSecret string // "••••••••" when set, empty when not
	OAuthURL     string // non-empty when ClientID is configured; links to OAuth start
	// DisplayName is the human-readable provider name shown in the UI
	// (e.g. "Slack", "Google"). Populated from OAuthMeta.DisplayName.
	DisplayName string
}

ConnectorOAuthAppConfig carries the connector module-level OAuth app credentials for rendering on the connector list page. This is NOT per-row data — one set of credentials is shared across all rows of a connector.

Credentials are stored in the configs table under owner="connector_oauth:{key}" with keys "client_id" / "client_secret".

ClientSecret is always masked (••••••••) when displaying — the handler never sends the plaintext to the template.

Enabled must be true for the section to render. The handler sets it only when Module.OAuth is non-nil and the user is an admin.

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.

Directories

Path Synopsis
templ: version: v0.3.1020
templ: version: v0.3.1020

Jump to

Keyboard shortcuts

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