ui: update chip + per-host button
- Surface UpdateAvailable + TargetVersion on the dashboard host row, the host_chrome header, and the JSON Host shape. - New host_update_chip partial renders an amber out-of-date pill next to the agent-version display when the host's agent trails the server. - Host detail right-rail gains an admin-only Update agent button (disabled when host is offline or already updating). - New .update-chip and .btn-amber CSS tokens; tailwind output refreshed.
This commit is contained in:
@@ -78,6 +78,26 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{if and $page.CanAdmin $page.UpdateAvailable}}
|
||||
<div class="panel rounded-[7px] px-4 py-3.5">
|
||||
<div class="text-[11px] text-ink-fade uppercase tracking-[0.1em] mb-2.5">Agent update</div>
|
||||
<p class="text-[12px] text-ink-mute leading-[1.55] mb-3">
|
||||
Agent at <span class="mono text-ink-mid">{{$host.AgentVersion}}</span> ·
|
||||
server at <span class="mono text-ink-mid">{{$page.TargetVersion}}</span>.
|
||||
Pushes a self-update command; the agent re-launches into the new binary
|
||||
and reconnects.
|
||||
</p>
|
||||
<form hx-post="/hosts/{{$host.ID}}/update" hx-swap="none">
|
||||
<button class="btn btn-amber btn-block"
|
||||
{{if not $page.Online}}disabled title="Agent must be online"
|
||||
{{else if $page.UpdateInProgress}}disabled title="Update already in progress"
|
||||
{{end}}>
|
||||
Update agent
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="panel rounded-[7px] px-4 py-3.5">
|
||||
<div class="text-[11px] text-ink-fade uppercase tracking-[0.1em] mb-2.5">Restore</div>
|
||||
<p class="text-[12px] text-ink-mute leading-[1.55] mb-3">
|
||||
|
||||
Reference in New Issue
Block a user