towerops/test/towerops_web/live
Graham McIntire 930885e21a
Add agent rename functionality
Implemented ability to rename agents through a new edit page following TDD:

Backend changes:
- Added update_agent_token/2 in Agents context for updating agent names
- Added update_changeset/2 in AgentToken schema that only allows name updates
- Security: Token field cannot be changed, only name field is allowed

LiveView implementation:
- Created AgentLive.Edit module with mount, validate, and save handlers
- Created edit.html.heex template with form for renaming agents
- Added route /orgs/:org_slug/agents/:id/edit
- Added Edit button to agent show page header
- Validates organization ownership using Repo.get_by!

Tests:
- Added comprehensive context tests for update_agent_token/2
- Added LiveView tests for edit page functionality
- Tests cover: loading, validation, save/redirect, auth, and org ownership

All 801 tests passing, no Credo warnings.
2026-01-17 15:48:47 -06:00
..
agent_live Change agent revoke to delete with full cleanup 2026-01-17 15:40:09 -06:00
device_live_nested rename equipment to device 2026-01-17 14:48:46 -06:00
org Implement hierarchical agent assignment for SNMP polling 2026-01-14 08:38:50 -06:00
org_live Add tests for Monitoring.Ping and OrgLive.New 2026-01-13 08:54:49 -06:00
agent_live_test.exs Add agent rename functionality 2026-01-17 15:48:47 -06:00
alert_live_test.exs rename equipment to device 2026-01-17 14:48:46 -06:00
dashboard_live_test.exs rename equipment to device 2026-01-17 14:48:46 -06:00
device_live_test.exs rename equipment to device 2026-01-17 14:48:46 -06:00
org_live_test.exs Fix all failing tests after UI changes 2026-01-05 11:33:26 -06:00
site_live_test.exs rename equipment to device 2026-01-17 14:48:46 -06:00
user_settings_live_test.exs Convert User Settings from controller to LiveView 2026-01-15 16:29:50 -06:00