From 8dae83a59280fb8c9a5374d1f90849e758af965a Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 19 Mar 2026 13:51:02 -0500 Subject: [PATCH] tweaks (#85) Reviewed-on: https://git.mcintire.me/graham/towerops-web/pulls/85 --- CHANGELOG.txt | 33 +++ .../live/activity_feed_live.html.heex | 220 ++++++++++-------- lib/towerops_web/live/device_live/show.ex | 1 + priv/static/changelog.txt | 7 + 4 files changed, 164 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4a2f73e0..800d8b47 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,36 @@ +2026-03-19 +ui: improve agent status display on device detail page + - Wrap agent name and icon inside the offline amber badge so it's clear what is offline + - Add "Agent:" label before the agent indicator in all states (cloud, online, offline) + Files: lib/towerops_web/live/device_live/show.html.heex + +2026-03-19 +fix: subscriber count pluralization ("1 sub" instead of "1 subs") + - Use ngettext in format_subscriber_count in device list and dashboard + - Dashboard impact column was showing "73s" (appended "s" to number) — now shows "73 subs" + Files: lib/towerops_web/live/device_live/index.ex, + lib/towerops_web/live/dashboard_live.ex, + lib/towerops_web/live/dashboard_live.html.heex + +2026-03-19 +fix: show ms unit for ping/http/tcp/dns check result values + - format_check_value now appends " ms" for latency-based check types + Files: lib/towerops_web/live/device_live/show.ex + +2026-03-19 +refactor: activity feed from vertical timeline to structured log table + - Replace left-anchored timeline with full-width table: TIME | TYPE | EVENT | DEVICE/SITE + - Colored left bar per row replaces timeline dot for severity + - Period group headers become table section rows + Files: lib/towerops_web/live/activity_feed_live.html.heex + +2026-03-19 +fix: pre-existing test failures + - TimeSeriesTest: switch to async: false to avoid TimescaleDB chunk creation deadlocks + - settings_live_test: property test now skips assertion when grapheme count < 2 (combining chars) + Files: test/towerops_web/graphql/resolvers/time_series_test.exs, + test/towerops_web/live/org/settings_live_test.exs + 2026-03-17 fix: DNS and ping checks not executing in production - ensure_default_ping_check now calls schedule_check after creating the check diff --git a/lib/towerops_web/live/activity_feed_live.html.heex b/lib/towerops_web/live/activity_feed_live.html.heex index 8a40d556..f1131eea 100644 --- a/lib/towerops_web/live/activity_feed_live.html.heex +++ b/lib/towerops_web/live/activity_feed_live.html.heex @@ -132,126 +132,152 @@ - <%= for {period, period_items} <- @grouped_items do %> - <%!-- Time Period Header --%> -
-
- - {period} - - ({length(period_items)}) - - -
-
+
+ + + + + + + + + + + + + <%= for {period, period_items} <- @grouped_items do %> + <%!-- Period group header row --%> + + + -
- <%!-- Vertical timeline line --%> -
+ <%= for item <- period_items do %> +
+ <%!-- Severity bar --%> + -
- <%= for item <- period_items do %> -
- <%!-- Timeline dot --%> -
-
+ <%!-- Time --%> +
- <%!-- Content --%> -
-
- <.icon - name={item.icon} - class={[ - "h-4 w-4 flex-shrink-0", - severity_icon_color(item.severity, item.type) - ]} - /> - - {relative_time(item.timestamp, @now)} - + <%!-- Type --%> +
+ + <%!-- Event --%> + + + <%!-- Device / Site --%> + -

- <%= if item.link do %> - <.link navigate={item.link} class="hover:underline"> - {item.summary} + <%!-- Link arrow --%> +

+ + <% end %> <% end %> - - - <% end %> + +
+ Time + + Type + + Event + + Device / Site +
+ + {period} + + + ({length(period_items)}) + +
+
+
+
+
+ <.icon + name={item.icon} + class={[ + "h-3.5 w-3.5 flex-shrink-0", + severity_icon_color(item.severity, item.type) + ]} + /> + + {relative_time(item.timestamp, @now)} + +
+
{type_label(item.type)} - <%!-- Device/site link --%> + +

+ <%= if item.link do %> + <.link navigate={item.link} class="hover:underline">{item.summary} + <% else %> + {item.summary} + <% end %> +

+

+ {item.detail} +

+
<.link :if={item.device_name && item.link} navigate={item.link} - class="inline-flex items-center gap-1 text-xs font-medium text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300" + class="inline-flex items-center gap-1 text-xs font-medium text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 leading-snug" > - <.icon name="hero-server-stack" class="h-3 w-3" /> + <.icon name="hero-server-stack" class="h-3 w-3 flex-shrink-0" /> {item.device_name} - <.icon name="hero-server-stack" class="h-3 w-3" /> + <.icon name="hero-server-stack" class="h-3 w-3 flex-shrink-0" /> {item.device_name} - +
+ <.icon name="hero-map-pin" class="h-3 w-3 flex-shrink-0" /> + {item.site_name} +
+
+
+ <.link + navigate={item.link} + class="text-gray-400 hover:text-blue-500 dark:text-gray-600 dark:hover:text-blue-400" + > + <.icon name="hero-arrow-right" class="h-4 w-4" /> - <% else %> - {item.summary} - <% end %> -

- -

- {item.detail} -

- -
- <.icon name="hero-map-pin" class="h-3 w-3" /> - {item.site_name} -
-
- - <%!-- Link arrow --%> -
- <.link - navigate={item.link} - class="text-gray-400 hover:text-blue-500 dark:text-gray-600 dark:hover:text-blue-400" - > - <.icon name="hero-arrow-right" class="h-4 w-4" /> - -
- + +
+
<%!-- Load More --%>
diff --git a/lib/towerops_web/live/device_live/show.ex b/lib/towerops_web/live/device_live/show.ex index 6eca708f..69d8dacc 100644 --- a/lib/towerops_web/live/device_live/show.ex +++ b/lib/towerops_web/live/device_live/show.ex @@ -1805,6 +1805,7 @@ defmodule ToweropsWeb.DeviceLive.Show do "snmp_sensor" -> format_check_sensor_value(value, check.config) "snmp_processor" -> "#{Float.round(value, 1)}%" "snmp_storage" -> "#{Float.round(value, 1)}%" + t when t in ["ping", "http", "tcp", "dns"] -> "#{Float.round(value, 2)} ms" _ -> value |> Float.round(2) |> to_string() end end diff --git a/priv/static/changelog.txt b/priv/static/changelog.txt index cc5cd2a0..4661e4c5 100644 --- a/priv/static/changelog.txt +++ b/priv/static/changelog.txt @@ -1,3 +1,10 @@ +2026-03-19 — UI Improvements +* Agent offline status on device pages is now clearly labeled with the agent name inside the badge +* Subscriber counts now correctly show "1 sub" (singular) instead of "1 subs" +* Dashboard outage impact column now shows subscriber counts instead of a value that looked like seconds +* Check result values for ping and service checks now display with their unit (ms) +* Activity feed redesigned as a structured log table for easier scanning across the full display + 2026-03-17 — Check Execution Fixes * Fixed DNS and ping checks not executing in production * Ping checks now automatically schedule when created for new devices