Skip to main content

Module frontend

Module frontend 

Source

Modules§

assets
diff
findings
history
runs
services
tui
Interactive terminal UI helpers built on ratatui + crossterm.

Structs§

Args
Minimal, consistent flag parser shared by all frontend commands.
Cell
IdMaps
Lookup tables so foreign keys (asset_id, service_id) can be resolved to human-readable names across every frontend command.
ObsIndex
Index of observations by subject id for change-state lookups.
ResolvedSubject
Table

Enums§

ChangeState
Backward-compatible finite state for observation classification. Kept as a separate type so ObsIndex::state semantics stay intact; Lifecycle is the first-class projection used by the CLI.
Lifecycle
First-class lifecycle of a record, derived from its observations and its stored status. Active and Unchanged are the same lifecycle (present and unchanged in the latest run); the Unchanged alias exists so callers and CLI flags can spell it either way.
LifecycleFilter
A parsed lifecycle filter (--lifecycle/--status) from the CLI.
LifecycleQuery
The lifecycle view requested by the CLI. This is the single query model shared by the list commands (findings, assets, services): --all requests every lifecycle including removed/fixed; the default view hides long-gone records; an explicit --lifecycle/--status/legacy singleton restricts to one state.
SubjectKind

Constants§

LIFECYCLE_NAMES
Recognised lifecycle spellings accepted by CLI filters.

Functions§

bold
classify_kind
color_enabled
cyan
dim
empty_result
Print a “nothing matched” message consistent across commands.
fmt_ts
Compact YYYY-MM-DD HH:MM (UTC) representation for tables.
green
open_backend
Open the configured backend, honouring --backend / --pocketbase-url / --sqlite-path overrides, and fail clearly when unconfigured/unreachable.
parse_ts
Parse RFC3339, the importer’s space-separated timestamp shape, YYYY-MM-DD HH:MM:SS UTC, YYYY-MM-DD, or a unix epoch.
print_json
red
resolve_subject
Resolve a user-supplied id or name to a specific asset, service, or finding. Supports stable ids, exact names/titles, asset:port for services, and unambiguous substring matches.
severity_label
severity_rank
Rank used to sort severities from most to least severe.
severity_style
truncate
ts_since
True if ts is at or after since.
value_to_short
Convert a Value to a compact single-line rendering for verbose output.
yellow