{{define "title"}}Dashboard · restic-manager{{end}} {{define "content"}}
{{$page := .Page}} {{template "crit_banner" .Page}} {{if and (eq $page.HostCount 0) (eq (len $page.PendingHosts) 0)}} {{/* ---------- empty state ---------- */}}

No hosts yet.

restic-manager tracks backups across a fleet — but there’s nothing to track until you enrol your first host. Mint a token from + Add host, paste the install command on a Linux box, and the host will appear here within seconds.

Prerequisite: restic ≥ 0.16 already installed on the target host.
{{else}} {{/* ---------- fleet summary ---------- */}}
Fleet
{{$page.Summary.TotalHosts}} hosts
{{$page.Summary.HostsOnline}}online {{$page.Summary.HostsDegraded}}degraded {{$page.Summary.HostsOffline}}offline
Backed up
{{bytes $page.Summary.RepoBytesTotal}}
{{comma $page.Summary.SnapshotsTotal}} snapshots total
Last 24h
{{$page.Summary.JobsLast24h}} jobs
{{$page.Summary.JobsLast24hSucceeded}} succeeded {{if gt $page.Summary.JobsLast24hFailed 0}} · {{$page.Summary.JobsLast24hFailed}} failed{{end}} {{if gt $page.Summary.JobsLast24hCancelled 0}} · {{$page.Summary.JobsLast24hCancelled}} cancelled{{end}}
Open alerts
{{if eq $page.Summary.OpenAlerts 0}}
0 unresolved
all clear
{{else}}
{{$page.Summary.OpenAlerts}} unresolved
{{end}}
{{/* ---------- Hosts-behind hero tile (P6-18) ---------- */}} {{if gt $page.UpdatesBehind 0}}
{{$page.UpdatesBehind}} {{if eq $page.UpdatesBehind 1}}host behind{{else}}hosts behind{{end}} · review →
{{end}} {{/* ---------- Pending hosts (announce-and-approve queue) ---------- */}} {{if gt (len $page.PendingHosts) 0}}

Pending hosts

{{len $page.PendingHosts}} waiting for approval
{{range $i, $ph := $page.PendingHosts}}
{{$ph.Hostname}} {{$ph.OS}}/{{$ph.Arch}} agent {{$ph.AgentVersion}} restic {{$ph.ResticVersion}}
{{$ph.Fingerprint}}
from {{$ph.AnnouncedFromIP}} · {{relTime $ph.FirstSeenAt}} · expires {{relTime $ph.ExpiresAt}}
{{end}}
{{end}} {{/* ---------- hosts table ---------- */}} {{$f := $page.Filter}} {{$sortURL := $page.SortURL}}

Hosts

{{$page.ShownCount}} of {{$page.HostCount}}
{{/* Filter row (NS-04): GET /, every input is a hidden field for the filters not currently being edited so submit merges rather than clobbers state. */}}
{{if $f.Tag}}{{end}} {{if ne $f.Sort "name"}}{{end}} {{if eq $f.Dir "desc"}}{{end}} {{if or $f.Search $f.Status $f.RepoStatus}} clear {{end}}
{{/* Tag chip-row — only renders when at least one tag exists in the fleet. Active tag is highlighted; clicking the active tag clears the filter. The "All" pill is shown in the active state when no tag filter is set. */}} {{if $page.KnownTags}}
tag All {{range $page.KnownTags}} {{$t := .}} {{$t}} {{end}}
{{end}} {{/* Live-poll wrapper (NS-04, mirrors the alerts pattern). hx-get refetches with the current filter pinned; hx-select grabs only this same div from the response so the surrounding chrome doesn't flash. The toggle persists in localStorage so a refreshed tab honours the operator's previous choice. */}}
{{end}}
{{end}}