towerops/lib/towerops_web/live/agent_live
Graham McIntire 96706b2cf8
Deduplicate agent status helper functions
Extracted 5 shared helper functions into ToweropsWeb.AgentLive.Helpers:
- agent_status/1 - Determines online/warning/offline/never status
- status_badge_class/1 - Returns Tailwind CSS classes for status badges
- status_dot_class/1 - Returns CSS classes for animated status dots
- format_last_seen/1 - Formats DateTime as human-readable time ago
- format_uptime/1 - Formats uptime seconds as days/hours/minutes

Removed duplicate code from:
- lib/towerops_web/live/agent_live/index.ex
- lib/towerops_web/live/agent_live/show.ex

Both modules now import the shared helpers, following DRY principle.
This reduces code duplication and makes status formatting consistent
across all agent-related pages.
2026-01-14 19:12:06 -06:00
..
helpers.ex Deduplicate agent status helper functions 2026-01-14 19:12:06 -06:00
index.ex Deduplicate agent status helper functions 2026-01-14 19:12:06 -06:00
index.html.heex Implement all quick win improvements for agent UI and functionality 2026-01-14 18:46:03 -06:00
show.ex Deduplicate agent status helper functions 2026-01-14 19:12:06 -06:00
show.html.heex Implement all quick win improvements for agent UI and functionality 2026-01-14 18:46:03 -06:00