hub: F-16 — inline two-step confirm partial replaces every native confirm() (offsite/PBS re-issue, freeze, telemetry reset, dismiss-all, regen-password, claim-resend, block/delete, geo-disable); hub_confirm_gate.py enforces zero

Claude-Session: https://claude.ai/code/session_01GzammAMzsJTgpQHqxwM2bC
This commit is contained in:
2026-07-13 08:19:54 +02:00
parent bad9203daa
commit 5d66c62bd6
7 changed files with 93 additions and 21 deletions
@@ -123,18 +123,18 @@
submits with it. Resets the box credential + stages a fresh one-time password. -->
<button type="submit" class="btn btn-outline" style="margin-top:.5rem"
formaction="/configs/{{$.Config.CustomerID}}/offsite-reissue" formmethod="POST"
onclick="return confirm('Re-issue the offsite credentials?\n\nThe box password is reset and a fresh one-time password is staged for the controller. Guests with a working installed key are unaffected (key-auth-first); a stuck fresh guest picks the new password up on its next config refresh.')">
data-confirm="Re-issue the offsite credentials? The box password is reset and a fresh one-time password is staged for the controller. Guests with a working installed key are unaffected (key-auth-first); a stuck fresh guest picks the new password up on its next config refresh.">
Re-issue offsite credentials</button>
{{if eq (index . "type") "shared"}}
<!-- SLICE 4: operator freeze lever (readonly on the sub-account) — MANUAL only, never
automatic: freezing also blocks prune, the customer's only way down from over-quota. -->
<button type="submit" class="btn btn-outline" style="margin-top:.5rem"
formaction="/configs/{{$.Config.CustomerID}}/offsite-freeze" formmethod="POST"
onclick="return confirm('Freeze the offsite storage (read-only)?\n\nNew backups AND prune will fail until unfrozen — use for runaway usage only.')">
data-confirm="Freeze the offsite storage (read-only)? New backups AND prune will fail until unfrozen — use for runaway usage only.">
Freeze offsite (read-only)</button>
<button type="submit" class="btn btn-outline" name="unfreeze" value="1" style="margin-top:.5rem"
formaction="/configs/{{$.Config.CustomerID}}/offsite-freeze" formmethod="POST"
onclick="return confirm('Unfreeze the offsite storage (read-write again)?')">
data-confirm="Unfreeze the offsite storage (read-write again)?">
Unfreeze offsite</button>
{{end}}
{{end}}{{end}}{{end}}
@@ -177,7 +177,7 @@
Rides the parent form via formaction; _csrf submits with it. -->
<button type="submit" class="btn btn-outline" style="margin-top:.5rem"
formaction="/configs/{{.Config.CustomerID}}/pbsdr-reissue" formmethod="POST"
onclick="return confirm('Re-issue the PBS credentials?\n\nThe endpoint token is re-keyed and a fresh one-time secret is staged for the host agent. A box with a working storage entry re-applies on its next desired-state fetch.')">
data-confirm="Re-issue the PBS credentials? The endpoint token is re-keyed and a fresh one-time secret is staged for the host agent. A box with a working storage entry re-applies on its next desired-state fetch.">
Re-issue PBS credentials</button>
{{end}}
</details>