Manage your SMS gateway devices and monitor their status.
| Name | Device ID | Status | Active | Priority | Today | Total | Last Heartbeat | Created | Actions |
|---|---|---|---|---|---|---|---|---|---|
| <%= link_to gateway.name, admin_gateway_path(gateway), class: "text-sm font-semibold text-blue-600 hover:text-blue-500 transition-colors" %> |
<%= gateway.device_id %>
|
<% if gateway.status == "online" %> Online <% else %> Offline <% end %> | <% if gateway.active %> Active <% else %> Inactive <% end %> | <%= gateway.priority %> |
<%= gateway.messages_sent_today %>
|
<%= gateway.messages_received_today %>
|
<%= gateway.total_messages_sent %>
|
<%= gateway.total_messages_received %>
|
<% if gateway.last_heartbeat_at %>
<%= time_ago_in_words(gateway.last_heartbeat_at) %> ago
<%= gateway.last_heartbeat_at.strftime("%m/%d/%y %H:%M") %>
<% else %>
Never
<% end %>
|
<%= gateway.created_at.strftime("%m/%d/%y") %> |
<%= link_to test_admin_gateway_path(gateway),
class: "inline-flex items-center gap-1 rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm hover:bg-blue-500 transition-all duration-200" do %>
Test
<% end %>
<%= button_to toggle_admin_gateway_path(gateway), method: :post,
class: gateway.active ?
"inline-flex items-center gap-2 rounded-lg bg-red-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm hover:bg-red-500 transition-all duration-200" :
"inline-flex items-center gap-2 rounded-lg bg-green-600 px-3 py-1.5 text-xs font-semibold text-white shadow-sm hover:bg-green-500 transition-all duration-200" do %>
<% if gateway.active %>
Deactivate
<% else %>
Activate
<% end %>
<% end %>
|
No gateways registered yet
Gateway devices will appear here once they connect via the API.