Wire all dashboard buttons: auth downloads, get_log feedback, action tests.

This commit is contained in:
drjones
2026-05-28 19:56:11 -07:00
parent 9e26c4babb
commit fda72041f0
8 changed files with 143 additions and 8 deletions

View File

@@ -74,7 +74,12 @@ export default function AgentRemoteActions({
setBusy(action);
try {
if (!compact) addLog(`> Executing ${action}...`);
await api.sendAgentCommand(agentId, action, args);
const res = await api.sendAgentCommand(agentId, action, args);
if (res.success === false) {
addLog(`Command rejected: ${res.error ?? 'unknown error'}`);
return;
}
if (!compact) addLog(`> ${action} sent to ${agentId === 'all' ? 'fleet' : agentName}`);
onCommandSent?.(action);
} catch (err: unknown) {
const msg = err instanceof Error ? err.message : 'Command failed';