diff --git a/lib/towerops_web/live/dashboard_live.html.heex b/lib/towerops_web/live/dashboard_live.html.heex index db01cc5c..c5f7a809 100644 --- a/lib/towerops_web/live/dashboard_live.html.heex +++ b/lib/towerops_web/live/dashboard_live.html.heex @@ -3,98 +3,101 @@ current_scope={@current_scope} active_page="dashboard" > - <.header> - Command Center - <:subtitle>Welcome to {@current_scope.organization.name} - - - <%!-- Last Updated + Refresh --%> - <%= if assigns[:last_updated] do %> -
Network overview
- Follow these steps to set up your network monitoring: +
+ Set up your network monitoring in a few steps.
-- Sites represent your physical locations (offices, data centers, towers, etc.) +
+ Sites represent your physical locations
- Add network devices (routers, switches, servers) to your sites +
+ Add routers, switches, and servers to your sites
- Add network devices (routers, switches, servers) to monitor +
+ Add network devices to monitor
- Towerops will automatically monitor your devices and alert you of issues +
+ TowerOps automatically monitors your devices and alerts you of issues
+
{@summary.health_score}
+
{if @uptime_percentage == 100.0, do: "100", - else: :erlang.float_to_binary(@uptime_percentage, decimals: 1)}% + else: :erlang.float_to_binary(@uptime_percentage, decimals: 1)}%
-- {@device_up}/{@device_count} devices up +
+ {@device_up} of {@device_count} devices up
0 && "text-red-600 dark:text-red-500") || - "text-gray-900 dark:text-white" - ]}> - {@total_alert_count} -
- - <%!-- Devices --%> <.link navigate={~p"/devices"} - class="rounded-lg border border-gray-200 bg-white p-4 shadow-sm transition-shadow hover:shadow-md dark:border-white/10 dark:bg-gray-800/50" + class="rounded-xl border border-gray-200 bg-white p-5 transition hover:shadow-md dark:border-white/10 dark:bg-gray-800/50" >{@device_count}
-+ {@device_count} +
+0, + do: "text-red-600 dark:text-red-400", + else: "text-gray-900 dark:text-white" + ) + ]}> + {@total_alert_count} +
++ <%= if @total_alert_count == 0 do %> + All clear + <% else %> + View details → + <% end %> +
+ ++
{format_number(@summary.subscribers.total)}
@@ -188,17 +232,16 @@
<% end %> - <%!-- Sites (if enabled) --%> <%= if @current_scope.organization.use_sites do %> <.link navigate={~p"/sites"} - class="rounded-lg border border-gray-200 bg-white p-4 shadow-sm transition-shadow hover:shadow-md dark:border-white/10 dark:bg-gray-800/50" + class="rounded-xl border border-gray-200 bg-white p-5 transition hover:shadow-md dark:border-white/10 dark:bg-gray-800/50" >
{@sites_count}
++ {@sites_count} +
<% end %> - <%!-- Insights --%> -- {@summary.insights.critical + @summary.insights.warning + @summary.insights.info} -
++ {@summary.insights.critical + @summary.insights.warning + @summary.insights.info} +
+No active alerts
-+ No active alerts — all systems operational +
+{alert.message}
+ + <%!-- Gaiia impact --%> + <%= if alert.gaiia_impact && alert.gaiia_impact["total_subscribers"] && alert.gaiia_impact["total_subscribers"] > 0 do %> +{alert.message}
- - <%!-- Gaiia impact badges --%> - <%= if alert.gaiia_impact && alert.gaiia_impact["total_subscribers"] && alert.gaiia_impact["total_subscribers"] > 0 do %> -{if change.device, do: change.device.name, else: "Unknown Device"}
-+
{Calendar.strftime(change.changed_at, "%b %d %H:%M")} · {change.change_size} lines · {Enum.join( Enum.take(change.sections_changed, 2), ", " @@ -488,37 +520,35 @@ <% end %>
+
{activity.summary}
-+
{Calendar.strftime(activity.timestamp, "%b %d %H:%M")} <%= if Map.get(activity, :actor_name) do %> by {activity.actor_name} @@ -528,31 +558,31 @@
No active insights
+No active insights
+
{insight.description}
<% end %> @@ -624,7 +654,7 @@ id={"dismiss-insight-#{insight.id}"} phx-click="dismiss_insight" phx-value-id={insight.id} - class="flex-shrink-0 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-white/10 dark:hover:text-gray-300" + class="flex-shrink-0 rounded-lg p-1.5 text-gray-300 hover:bg-gray-100 hover:text-gray-500 dark:text-gray-600 dark:hover:bg-white/10 dark:hover:text-gray-400" title="Dismiss" > <.icon name="hero-x-mark" class="h-4 w-4" /> @@ -636,30 +666,32 @@