towerops/lib/towerops_web
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
..
components Add Agents navigation link to authenticated layout 2026-01-13 13:14:23 -06:00
controllers Implement hierarchical agent assignment for SNMP polling 2026-01-14 08:38:50 -06:00
live Implement hierarchical agent assignment for SNMP polling 2026-01-14 08:38:50 -06:00
plugs Fix database ownership issues in agent auth tests 2026-01-13 13:16:54 -06:00
endpoint.ex Fix health check logging with dynamic log level in endpoint 2026-01-06 13:57:32 -06:00
gettext.ex init 2025-12-21 11:10:43 -06:00
router.ex add remote agent setup 2026-01-09 13:15:31 -06:00
telemetry.ex format 2025-12-21 11:31:08 -06:00
user_auth.ex Streamline login flow and fix test failures 2026-01-13 13:08:24 -06:00