- <.icon name="hero-server" class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500" />
-
- Add your first device
-
-
- Start monitoring by adding network devices to this site.
-
-
- You can add routers, switches, servers, or any device with an IP address.
-
-
+ <%!-- Active Alerts Panel --%>
+
+
+
+ <.icon name="hero-bell-alert" class="h-5 w-5" />
+ Active Alerts
+ <%= if @active_alerts != [] do %>
+ {length(@active_alerts)}
+ <% end %>
+
+ <%= if @active_alerts == [] do %>
+
+ <.icon name="hero-check-circle" class="mx-auto h-8 w-8 text-green-500" />
+
No active alerts
+
+ <% else %>
+
+
+ <.icon
+ name={insight_urgency_icon(alert.severity)}
+ class={["h-5 w-5 mt-0.5 shrink-0", insight_urgency_class(alert.severity)]}
+ />
+
+
{alert.message}
+
+ {time_ago(alert.triggered_at)}
+
+
+
+
+ <% end %>
+
+
+
+ <%!-- Recent Config Changes Panel --%>
+
+
+
+ <.icon name="hero-document-text" class="h-5 w-5" />
+ Recent Config Changes
+
+ <%= if @config_changes == [] do %>
+
+
No config changes in the last 30 days
+
+ <% else %>
+
+
+
+
+ {change.device_name || "Unknown device"}
+
+
+ {time_ago(change.detected_at)}
+
+
+
+ {change_size_label(change.diff_size || 0)}
+
+
+
+ <% end %>
+
+
+
+
+ <%!-- Right Column --%>
+
+ <%!-- Device Health Grid --%>
+
+
+
+
+ <.icon name="hero-server" class="h-5 w-5" />
+ Device Health
+
<.button
navigate={~p"/devices/new?site_id=#{@site.id}"}
variant="primary"
+ class="btn-sm"
>
- <.icon name="hero-plus" class="h-5 w-5" /> Add Device
+ <.icon name="hero-plus" class="h-4 w-4" /> Add
-
- <% else %>
-
- <.link
- :for={eq <- @device}
- navigate={~p"/devices/#{eq.id}"}
- class="flex items-center justify-between rounded-lg border border-gray-200 bg-white p-4 dark:border-white/10 dark:bg-gray-800/50 hover:border-gray-300 dark:hover:border-white/20 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer"
- >
-
-
{eq.name}
-
{eq.ip_address}
+ <%= if @device == [] do %>
+
+ <.icon name="hero-server" class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500" />
+
+ Add your first device
+
+
+ Start monitoring by adding network devices to this site.
+
+
+ <.button navigate={~p"/devices/new?site_id=#{@site.id}"} variant="primary">
+ <.icon name="hero-plus" class="h-5 w-5" /> Add Device
+
+
-
- {eq.status |> to_string() |> String.upcase()}
-
-
+ <% else %>
+
+ <.link
+ :for={eq <- @device}
+ navigate={~p"/devices/#{eq.id}"}
+ class="flex items-center gap-3 rounded-lg border border-base-300 p-3 hover:bg-base-200 transition-colors cursor-pointer"
+ >
+
+
+
{eq.name}
+
{eq.ip_address}
+
+
+ {format_response_time(@response_times[eq.id])}
+
+
+
+ <% end %>
+
+
+
+ <%!-- Insights Panel --%>
+ <%= if @insights != [] do %>
+
+
+
+ <.icon name="hero-light-bulb" class="h-5 w-5" />
+ Preseem Insights
+
+
+
+ <.icon
+ name={insight_urgency_icon(insight.urgency)}
+ class={["h-5 w-5 mt-0.5 shrink-0", insight_urgency_class(insight.urgency)]}
+ />
+
+
{insight.title}
+ <%= if insight.description do %>
+
+ {insight.description}
+
+ <% end %>
+
+
+
+
<% end %>
-
+
+ <%!-- Latency Chart --%>
<%= if @latency_chart_data do %>
-
-
-
-
- Site Latency - Last 24 Hours
+
+
+
+
+ <.icon name="hero-chart-bar" class="h-5 w-5" />
+ Site Latency — Last 24 Hours
-
-