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. type TileData struct { Host model.Host Latest *model.Run 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) }
}
} }