package templates import ( "time" "vetting/internal/model" ) // TileData pairs a host with its latest run and the derived fields the // tile needs to render: spec-diff count (server-side diff result) and // the on-disk path to the hold-key artifact when the run is holding. // LastSeenAt is the host-mode agent's most recent heartbeat. Stages is // the list of canonical-order stage rows for Latest, used by HostTile // to render the mini run-view; nil/empty for never-run hosts (a ghost // dot strip is rendered from DefaultStageOrder). type TileData struct { Host model.Host Latest *model.Run Stages []model.Stage SpecDiffCritical int HoldKeyPath string LastSeenAt *time.Time } templ Dashboard(tiles []TileData) { @Layout("Dashboard") {

Registered hosts

Register host
if len(tiles) == 0 {

No hosts registered yet.

Register your first host
} else {
for _, t := range tiles { @HostTile(t) }
}
} }