diff --git a/lib/towerops_web/live/equipment_live/show.ex b/lib/towerops_web/live/equipment_live/show.ex index 6fc3a68f..c89a63d4 100644 --- a/lib/towerops_web/live/equipment_live/show.ex +++ b/lib/towerops_web/live/equipment_live/show.ex @@ -201,32 +201,4 @@ defmodule ToweropsWeb.EquipmentLive.Show do } end end - - # SVG Chart helpers - - defp uptime_gauge(percentage) do - assigns = %{percentage: percentage} - - color_class = - cond do - percentage >= 95 -> "bg-green-500" - percentage >= 80 -> "bg-yellow-500" - true -> "bg-red-500" - end - - assigns = Map.put(assigns, :color_class, color_class) - - ~H""" -
-
-
-
- {@percentage}% -
-
- """ - end end diff --git a/lib/towerops_web/live/equipment_live/show.html.heex b/lib/towerops_web/live/equipment_live/show.html.heex index 8965035d..fd01f032 100644 --- a/lib/towerops_web/live/equipment_live/show.html.heex +++ b/lib/towerops_web/live/equipment_live/show.html.heex @@ -17,45 +17,6 @@ - -
-
-
Status
-
- - - - {@equipment.status |> to_string() |> String.upcase()} - -
-
- -
-
Uptime
-
- {@metrics.uptime_percentage}% -
-
- -
-
Last Check
-
- - {time_ago(@equipment.last_checked_at)} - -
-
-
- -
-
-

- Availability (last {@metrics.total_checks} checks) -

-
-
-
- {uptime_gauge(@metrics.uptime_percentage)} -
-
- {@metrics.successful_checks} successful - {@metrics.total_checks - @metrics.successful_checks} failed -
-
-
<%= if @snmp_sensors && length(@snmp_sensors) > 0 do %>