towerops/lib/towerops_web
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
..
channels more renames 2026-01-17 15:13:56 -06:00
components rename equipment to device 2026-01-17 14:48:46 -06:00
controllers credo cleanup 2026-01-17 15:00:52 -06:00
helpers Add build timestamp to footer with shared time formatting helpers 2026-01-17 11:10:50 -06:00
live Add agent rename functionality 2026-01-17 15:48:47 -06:00
plugs Add comprehensive Dialyzer type specifications 2026-01-17 10:52:02 -06:00
endpoint.ex agent improvements and agent config 2026-01-16 17:26:51 -06:00
gettext.ex init 2025-12-21 11:10:43 -06:00
router.ex Add agent rename functionality 2026-01-17 15:48:47 -06:00
telemetry.ex Add comprehensive Dialyzer type specifications 2026-01-17 10:52:02 -06:00
user_auth.ex moduledocs 2026-01-17 15:08:49 -06:00