towerops/test/towerops_web/controllers
Graham McIntire a2d96f8e6e
Implement hierarchical agent assignment for SNMP polling
Add three-level agent assignment hierarchy (Equipment > Site > Organization)
allowing flexible agent deployment strategies. Agents now receive only equipment
assigned to them through direct assignment or inheritance from site/organization
defaults.

Key changes:
- Add agent_token_id to Sites table with migration
- Implement get_effective_agent_token/1 for hierarchical resolution
- Add list_agent_polling_targets/1 to return polling targets per agent
- Update API config endpoint to use hierarchical polling targets
- Add agent assignment UI to equipment, site, and organization forms
- Show agent source (direct/site/org/none) in equipment form
- Add equipment count column to agent list
- Update terminology from "poll from server" to "cloud polling"

Tests:
- Add 8 comprehensive tests for list_agent_polling_targets/1
- Add end-to-end test for hierarchical config endpoint
- All 775 tests passing
2026-01-14 08:38:50 -06:00
..
api Implement hierarchical agent assignment for SNMP polling 2026-01-14 08:38:50 -06:00
error_html_test.exs Add test for ErrorHTML fallback render function 2026-01-13 07:48:23 -06:00
error_json_test.exs init 2025-12-21 11:10:43 -06:00
health_controller_test.exs Add HealthController test (0% → 100%) 2026-01-13 07:39:28 -06:00
page_controller_test.exs add marketing site 2026-01-06 14:34:48 -06:00
page_html_test.exs Add test for PageHTML home template 2026-01-13 07:49:25 -06:00
user_credential_controller_test.exs Add comprehensive tests for EquipmentLive.Form and UserCredentialController 2026-01-12 18:46:15 -06:00
user_registration_controller_test.exs more features 2026-01-02 14:06:44 -06:00
user_registration_html_test.exs Add test for UserRegistrationHTML 2026-01-13 07:52:06 -06:00
user_session_controller_test.exs Streamline login flow and fix test failures 2026-01-13 13:08:24 -06:00
user_session_html_test.exs Add comprehensive tests for UserSessionHTML 2026-01-13 07:50:39 -06:00
user_settings_controller_test.exs 1. User Authentication 2025-12-21 13:31:59 -06:00
user_settings_html_test.exs Add tests for UserSettingsHTML 2026-01-13 07:52:46 -06:00