ui: P2R-09 auto-init UX — init line in chrome + danger-zone re-init
Latest 'init' job status surfaced under the host-detail vitals strip
(succeeded/failed/running/queued, with link to the live job log on
non-success). New POST /hosts/{id}/repo/reinit handler dispatches a
fresh init job after the operator types the host name to confirm;
audit row records 'host.repo_reinit'.
This commit is contained in:
@@ -238,8 +238,16 @@
|
||||
<span class="mono text-ink-mid">secrets.enc</span> is reused.
|
||||
</p>
|
||||
</div>
|
||||
<button class="btn btn-danger btn-lg flex-none" disabled
|
||||
title="re-init flow lands in P2R-09">Re-init repo…</button>
|
||||
<form method="post" action="/hosts/{{$host.ID}}/repo/reinit"
|
||||
class="flex-none flex flex-col items-end" style="gap: 8px;"
|
||||
onsubmit="return confirm('Re-initialise the repo on host "{{$host.Name}}"? Existing snapshots are lost if the rest-server allows the wipe; restic refuses if it sees a config file already there.');">
|
||||
<input type="text" name="confirm_hostname" required autocomplete="off"
|
||||
placeholder="type hostname to confirm"
|
||||
class="input mono"
|
||||
style="width: 240px; height: 30px; padding: 0 8px; font-size: 12px;">
|
||||
<button type="submit" class="btn btn-danger btn-lg whitespace-nowrap"
|
||||
{{if eq $host.Status "online"}}{{else}}disabled title="host is offline"{{end}}>Re-init repo…</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user