CI : Update agent from web
This commit is contained in:
@@ -56,6 +56,7 @@ export function AgentCard({ agent, selected, onToggleSelect, onCommand, onOpenSe
|
||||
<span className="muted small">
|
||||
{agent.hostname ?? '—'} · {agent.platform}
|
||||
{agent.agentVersion ? ` · v${agent.agentVersion}` : ''}
|
||||
{status.buildId ? ` · build ${status.buildId}` : ''}
|
||||
</span>
|
||||
</div>
|
||||
<span className={`badge ${state.tone}`}>{state.label}</span>
|
||||
@@ -148,6 +149,25 @@ export function AgentCard({ agent, selected, onToggleSelect, onCommand, onOpenSe
|
||||
Connecter OBS
|
||||
</button>
|
||||
)}
|
||||
|
||||
{status.canSelfUpdate && (
|
||||
<button
|
||||
className="ghost"
|
||||
disabled={!agent.online || busy || status.recording}
|
||||
title={
|
||||
status.recording
|
||||
? 'Enregistrement en cours — la mise à jour est refusée'
|
||||
: 'Télécharger et installer la dernière version de l\'agent'
|
||||
}
|
||||
onClick={() => {
|
||||
if (confirm(`Mettre à jour « ${agent.name} » ? L'agent redémarrera.`)) {
|
||||
void run('agent.update');
|
||||
}
|
||||
}}
|
||||
>
|
||||
⬆ Mettre à jour
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<footer className="card-foot muted small">
|
||||
|
||||
Reference in New Issue
Block a user