Replace the revoke functionality with delete to properly clean up agent references. When an agent is deleted: - All direct device assignments are removed - Agent is removed from site defaults - Agent is removed from organization defaults - Devices automatically fall back to site/org agents or cloud polling This ensures no orphaned references and provides better clarity about what happens to device monitoring when an agent is removed. - Add delete_agent_token/1 function in Agents context - Update LiveView to use delete_agent event instead of revoke_agent - Update UI button from "Revoke" to "Delete" with clearer confirmation message - Add comprehensive tests for delete functionality and fallback behavior - All 792 tests passing, no Credo warnings |
||
|---|---|---|
| .. | ||
| index_test.exs | ||