Web UI: dark/light themes (appliance layout, sidebar, switch checkboxes), theme preference on the Advanced page, Changes page with the pending diff. Interface names: router.interfaces.<name>.mac, lans.<l>.deviceName and pppoe.vlanName; a rename is staged for the next reboot by router-apply. Remote access: an MCP server (POST /mcp) and an OpenAPI REST API (/api/v1, /api/openapi.json) with the same tokens, scopes, limits and audit log; tools to read status, settings, leases, logs (get_logs), and to edit and check the saved settings (never applied). Tokens on the API access page. Firewall: a reserved `local` zone (the router itself) as the destination of rules, so the web UI or SSH can be allowed from the WAN. PLAN.md lists what is still left. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
48 lines
2.2 KiB
HTML
48 lines
2.2 KiB
HTML
{{define "content"}}
|
|
{{$s := .Data.Status}}
|
|
{{if $s.Applying}}
|
|
<section class="busy"><h2>Applying…</h2><p>Building the new configuration. This page refreshes on its own.</p></section>
|
|
{{else if $s.ConfirmRunning}}
|
|
<section class="busy"><h2>Confirming…</h2></section>
|
|
{{else if gt (seconds $s.RollbackIn) 0}}
|
|
<section class="pending">
|
|
<h2>Waiting for confirmation</h2>
|
|
<p>The new configuration is active. Unless you confirm it within <strong>{{duration $s.RollbackIn}}</strong>,
|
|
the router goes back to the confirmed system on its own.</p>
|
|
<form method="post" action="/confirm"><input type="hidden" name="csrf" value="{{.CSRF}}"><button>Confirm</button></form>
|
|
</section>
|
|
{{else if $s.Unapplied}}
|
|
<section class="pending">
|
|
<p>The settings have changes that are not part of the confirmed system. <a href="/changes">Review the changes</a>.</p>
|
|
<div class="actions">
|
|
<form method="post" action="/apply"><input type="hidden" name="csrf" value="{{.CSRF}}"><button>Apply</button></form>
|
|
<form method="post" action="/discard"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="secondary">Discard changes</button></form>
|
|
</div>
|
|
</section>
|
|
{{end}}
|
|
|
|
<div id="dashboard" data-range="{{.Data.Dashboard.Range}}" data-interval="{{.Data.Dashboard.Interval}}">
|
|
{{template "dashboard" .}}
|
|
</div>
|
|
|
|
<section>
|
|
<h2>Configuration</h2>
|
|
{{if not (or $s.Applying $s.ConfirmRunning $s.Unapplied (gt (seconds $s.RollbackIn) 0))}}<p>The settings match the confirmed system.</p>{{end}}
|
|
<dl>
|
|
<dt>Running system</dt><dd><code>{{short $s.Current}}</code></dd>
|
|
<dt>Confirmed system</dt><dd><code>{{short $s.Confirmed}}</code></dd>
|
|
</dl>
|
|
{{if not (or $s.Applying $s.ConfirmRunning $s.Unapplied (gt (seconds $s.RollbackIn) 0))}}
|
|
<form method="post" action="/apply"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="secondary">Rebuild and apply</button></form>
|
|
{{end}}
|
|
</section>
|
|
|
|
{{if $s.Log}}
|
|
<section>
|
|
<h2>Last apply{{if $s.ApplyResult}} — {{if eq $s.ApplyResult "success"}}succeeded{{else}}failed ({{$s.ApplyResult}}){{end}}{{end}}</h2>
|
|
<pre class="log">{{$s.Log}}</pre>
|
|
</section>
|
|
{{end}}
|
|
<script src="/static/dashboard.js" defer></script>
|
|
{{end}}
|