Documentation
¶
Overview ¶
Package-level UI helpers: small render primitives that don't fit cleanly into any one feature module. Today this holds the key-chip pill renderer (used in modal footers and toast actions) and the spinner glyph picker (used in the status area when an action is in flight).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionResult ¶
ActionResult is emitted when an async action (start/stop/restart) finishes. The status bar renders Err/Detail so the user sees failures without dropping out of the TUI.
type DumpEntry ¶ added in v1.20.0
type DumpEntry struct {
ID string
TS string
Type string
Site string
Request string
File string
Line int
Label string
Text string
}
DumpEntry is a TUI-side mirror of dumps.Event with the fields rendering needs cached as strings so the View path doesn't allocate per frame.
type LogKind ¶
type LogKind int
LogKind picks between `podman logs` (containers), `journalctl --user` (worker systemd units), and `tail -F` (framework app log files). Workers don't run as containers so their output lives in the user journal; sites and services do, and their history is richer when pulled from podman; framework app logs (laravel.log, etc.) live on disk because the framework writes them directly.
type LogTarget ¶
LogTarget fully describes one tail-able source: what to tail, how to tail it, and how to label it in the pane header.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the bubbletea root. Panes are all projections of snap plus small per-pane cursor/scroll state, so every refresh cycle rebuilds from a single source of truth without stale data.
func NewModel ¶
NewModel builds an initial model. The caller is expected to call podman.Cache.Start before running; NewModel itself is pure.
func (*Model) Init ¶
Init implements tea.Model. Kicks off the first snapshot load, the refresh ticker, the eventbus subscription, a one-shot update check, and the spinner tick (a perpetual 100ms heartbeat so the spinner glyph stays animated whenever a "…" status is showing).
type ServiceRow ¶
type ServiceRow struct {
Name string
Version string
State ServiceState
Custom bool
Pinned bool
SiteCount int
Dashboard string
DependsOn []string
WorkerSite string
WorkerKind string
WorkerPath string
}
ServiceRow is a flat row for the services pane. Sourced from podman unit status and service config so the TUI doesn't need to reach into ui/server.go. For site-owned workers (queue, schedule, horizon, reverb, custom framework workers) WorkerSite / WorkerKind are set so actions can run the right per-site command instead of `lerd service start/stop` which would fail.
type ServiceState ¶
type ServiceState int
ServiceState is a tri-state the TUI uses to pick a glyph and colour.
type Snapshot ¶
type Snapshot struct {
Sites []siteinfo.EnrichedSite
Services []ServiceRow
Status StatusRow
// Workspaces group sites for display only, in the order the user's config
// lists them. The TUI shows them and never edits them.
Workspaces []config.Workspace
}
Snapshot is the full view-model the TUI renders from. Produced by loadSnapshot from the same sources lerd-ui uses, so every pane reflects the same point-in-time state.
Source Files
¶
- actions.go
- activity.go
- chrome.go
- dashboard.go
- databases.go
- debug.go
- detail.go
- doctor.go
- dumps.go
- events.go
- filter.go
- help.go
- lan.go
- log_tail.go
- log_tail_linux.go
- logs_render.go
- modal.go
- model.go
- overview.go
- palette.go
- panes.go
- php_extras.go
- picker.go
- servicedetail.go
- settings.go
- sitetabs.go
- snapshot.go
- system.go
- theme.go
- timing.go
- toast.go