From 635d89d774b7ee7529f5f75c2fcd20d893196fda Mon Sep 17 00:00:00 2001 From: Graham McIntie Date: Sun, 15 Feb 2026 15:05:20 -0600 Subject: [PATCH] Fix mobile Gaiia entity mapping + redirect / to /dashboard - Entity mapping table: hide Gaiia ID and Linked columns on mobile, show Gaiia ID inline under name on small screens - Allow text wrapping in name column for long names - Add overflow-x-auto to table container for safety - Redirect authenticated users from / to /dashboard instead of /orgs --- .../controllers/page_controller.ex | 2 +- .../live/org/gaiia_mapping_live.html.heex | 19 +++++++++++-------- .../controllers/page_controller_test.exs | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/towerops_web/controllers/page_controller.ex b/lib/towerops_web/controllers/page_controller.ex index 5da8a0f9..18a760b3 100644 --- a/lib/towerops_web/controllers/page_controller.ex +++ b/lib/towerops_web/controllers/page_controller.ex @@ -6,7 +6,7 @@ defmodule ToweropsWeb.PageController do def home(conn, _params) do # If user is authenticated, redirect to organization list if conn.assigns.current_scope && conn.assigns.current_scope.user do - redirect(conn, to: ~p"/orgs") + redirect(conn, to: ~p"/dashboard") else render(conn, :home, layout: false) end diff --git a/lib/towerops_web/live/org/gaiia_mapping_live.html.heex b/lib/towerops_web/live/org/gaiia_mapping_live.html.heex index 9857854f..1ca9d6e6 100644 --- a/lib/towerops_web/live/org/gaiia_mapping_live.html.heex +++ b/lib/towerops_web/live/org/gaiia_mapping_live.html.heex @@ -129,7 +129,7 @@

<% else %> -
+
@@ -141,7 +141,7 @@ @@ -155,7 +155,7 @@ <% end %> @@ -170,17 +170,20 @@ <%= for item <- @items do %> - - <%= if @tab == "devices" do %> @@ -188,7 +191,7 @@ {item.ip_address || "-"} <% end %> -
{t("Gaiia ID")} {if @tab == "sites", do: "Linked Site", else: "Linked Device"}
-
- {item.name || "Unnamed"} +
+
+ {item.name || "Unnamed"} <%= if Map.has_key?(@suggestions, item.gaiia_id) do %> <.icon name="hero-light-bulb-mini" class="mr-0.5 h-3 w-3" /> Suggestion <% end %> + + {item.gaiia_id} +
+ +