{{define "content"}} {{$d := .Data}}

Installed

Version
{{or $d.Installed.Version "unknown"}}{{if $d.Installed.Rev}} {{$d.Installed.Rev}}{{end}}
Settings schema
{{$d.Installed.Schema}}
{{if $d.Status.Running}}

Updating…

Verifying, importing and building the new version. This page refreshes on its own; the web UI restarts when the new version is switched on.

{{else if $d.Pending}}

Waiting for confirmation

A new configuration is active and not confirmed yet. Confirm it on the Overview, or the router goes back to the previous version.

{{end}}

Install a bundle

A .bundle file made with nix run .#release. It is installed only if it is signed with this router's update key. The settings are kept (and migrated if the new version needs it); the new version must be confirmed afterwards, or the router goes back.

Update server

{{if $d.URL}}
{{end}} {{if $d.OfferErr}}

Could not check: {{$d.OfferErr}}

{{end}} {{with $d.Offer}}

{{if .Newer}}Available: {{.Version}}{{if .Rev}} {{.Rev}}{{end}}.{{else}}Nothing newer: the server has {{.Version}}.{{end}}

{{if not .Newer}}

{{end}}
{{end}}

The server only has to serve static files: the latest file and cache/ that nix run .#release writes. The data is signed, so plain HTTP works too.

{{if $d.Status.Log}}

Last update{{if $d.Status.Result}} — {{if eq $d.Status.Result "success"}}succeeded{{else}}failed ({{$d.Status.Result}}){{end}}{{end}}

{{$d.Status.Log}}
{{end}} {{end}}