Show the log in the page over the site while updating or upgrading

The Update page's overlay carries the update's log; the Packages page gets
an overlay too, named after the step that runs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 12:10:58 +01:00
co-authored by Claude Sonnet 5.5
parent d6de7781fe
commit 8fe0a72897
5 changed files with 35 additions and 5 deletions
+9 -2
View File
@@ -26,7 +26,14 @@
{{if $d.Updating}}
<section class="busy"><h2>Updating…</h2><p>The router is installing a new version of nixos-router.</p></section>
{{else if $d.Run.Running}}
<section class="busy"><h2>Working…</h2><p>This page updates on its own. The web UI restarts when an upgrade is switched on.</p></section>
<div class="upload-overlay" role="dialog" aria-modal="true">
<div class="upload-card wide">
<h2>{{$d.Title}}</h2>
<progress max="100"></progress>
{{if $d.Run.Log}}<pre class="log">{{$d.Run.Log}}</pre>{{end}}
<p class="muted">The page reloads when it is done. The web UI restarts when an upgrade is switched on, and you log in again.</p>
</div>
</div>
{{else if $d.Pending}}
<section class="pending"><h2>Waiting for confirmation</h2>
<p>A new system is active and not confirmed yet. Confirm it on the <a href="/">Overview</a>, or the router goes back to the
@@ -99,7 +106,7 @@
<section><p>Choose a channel to look for upgrades.</p></section>
{{end}}
{{if $d.Run.Log}}
{{if and $d.Run.Log (not $d.Run.Running)}}
<section>
<h2>Last run{{if $d.Run.Result}} — {{if eq $d.Run.Result "success"}}succeeded{{else}}failed ({{$d.Run.Result}}){{end}}{{end}}</h2>
<pre class="log">{{$d.Run.Log}}</pre>