fix(agents): don't trigger a full sync when deleting a single agent (#879) (#889)
Deleting a single agent from the agents list emitted `delete`, which the parent view wired to `syncAgents()` — firing a full `POST /agents/sync` against Wazuh and Velociraptor and then re-fetching. In environments with thousands of agents that full sync is slow and unnecessary; the backend DELETE endpoint already removes the agent from Wazuh, Velociraptor, and the database directly. Wire the single-delete event to `getAgents()` instead, so it just re-fetches the list — matching the existing bulk-delete path (onBulkDeleteComplete). The explicit toolbar "Sync" button still calls syncAgents() for users who want a full reconciliation. Fixes #879 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
taylor_socfortress committed
May 27, 2026 at 14:25 UTC
083876651c7eb80fbe7d62c4acb383a262375310
1 file changed
+1
-1
frontend/src/views/agents/Agents.vue
+1
-1
@@ -34,7 +34,7 @@
34
hoverable
35
clickable
36
class="item-appear item-appear-bottom item-appear-005"
37
- @delete="syncAgents()"
37
+ @delete="getAgents()"
38
@click="handleAgentClick(agent)"
39
@toggle-selection="toggleAgentSelection(agent)"
40
/>