Remove duplicate device counting logic by consolidating three identical implementations into a single reusable function. **Changes:** - Refactor agent_live/index.ex mount/3 to use calculate_device_counts/1 - Delete duplicate calculate_cloud_poller_counts/1 function - Replace all usages with calculate_device_counts/1 **Before:** - Lines 31-47: Inline counting for agent_tokens and cloud_pollers - Lines 312-318: calculate_device_counts/1 - Lines 320-326: calculate_cloud_poller_counts/1 (identical logic) **After:** - Single calculate_device_counts/1 function used everywhere - ~20 lines removed **Benefits:** - Eliminates triple duplication of counting logic - Single source of truth for device counting - Easier to maintain and test 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| mix/tasks | ||
| snmpkit | ||
| towerops | ||
| towerops_web | ||
| snmp_lib.ex | ||
| snmp_mgr.ex | ||
| snmpkit.ex | ||
| towerops.ex | ||
| towerops_native.ex | ||
| towerops_web.ex | ||