diff --git a/lib/towerops_web/live/org/settings_live.html.heex b/lib/towerops_web/live/org/settings_live.html.heex index accfa4d3..c5866912 100644 --- a/lib/towerops_web/live/org/settings_live.html.heex +++ b/lib/towerops_web/live/org/settings_live.html.heex @@ -804,214 +804,288 @@ <% end %> <%= if @active_tab == "integrations" do %> -
- {provider.description} -
+ class={[ + "relative overflow-hidden rounded-xl border bg-white shadow-sm transition-all dark:bg-white/[0.03]", + cond do + @integrations[provider.id] && @integrations[provider.id].last_sync_status == "failed" -> + "border-red-200 dark:border-red-500/30" + @integrations[provider.id] && @integrations[provider.id].enabled -> + "border-green-200 dark:border-green-500/20" + + true -> + "border-gray-200 dark:border-white/10" + end + ]} + > + <%!-- Left status accent bar --%> ++ {provider.description} +
++ Last sync failed +
+ <%= if integration.last_sync_message && integration.last_sync_message != "" do %> ++ {integration.last_sync_message} +
+ <% end %> <%= if integration.last_synced_at do %> - - Last synced: ++ <.timestamp + datetime={integration.last_synced_at} + timezone={@timezone} + format="absolute" + /> +
+ <% end %> +- <%= if provider.id == "preseem" do %> - Syncs every {integration.sync_interval_minutes} minutes. Baselines and fleet profiles computed nightly. - <% end %> - <%= if provider.id == "gaiia" do %> - Syncs every {integration.sync_interval_minutes} minutes. Reconciliation runs nightly. Also receives real-time webhook updates. - <% end %> - <%= if provider.id == "pagerduty" do %> - Event-driven — no polling needed. TowerOps sends events to PagerDuty in real time: -
+
Your NetBox instance URL and API token. The token needs read permission at minimum. Write permission is required if you want to push data to NetBox.
@@ -1051,15 +1128,18 @@ <%!-- Sync Direction Section --%>+
Choose how data flows between TowerOps and NetBox. You can change this later.
+
Choose which NetBox objects participate in sync. Devices and sites are recommended at minimum.
+
Narrow the sync scope. Leave blank to sync everything. Comma-separated for multiple values.
"text-green-700 dark:text-green-400" - {:error, _} -> "text-red-700 dark:text-red-400" - end - ]}> - <%= case @test_result do %> - <% {:ok, msg} -> %> - <.icon name="hero-check-circle" class="h-4 w-4 inline" /> + <%= case @test_result do %> + <% {:ok, msg} -> %> + <.icon + name="hero-check-circle" + class="h-5 w-5 shrink-0 text-green-500 dark:text-green-400" + /> +
{msg} - <% {:error, msg} -> %> - <.icon name="hero-x-circle" class="h-4 w-4 inline" /> - {msg} - <% end %> -
+ + <% {:error, msg} -> %> + <.icon + name="hero-x-circle" + class="h-5 w-5 shrink-0 text-red-500 dark:text-red-400" + /> +{msg}
+ <% end %>+
When connected, TowerOps will automatically trigger, acknowledge, and resolve PagerDuty incidents in sync with your alerts.
"text-green-800 dark:text-green-200" - {:error, _} -> "text-red-800 dark:text-red-200" + {:ok, _} -> "text-green-800 dark:text-green-300" + {:error, _} -> "text-red-800 dark:text-red-300" end ]}> {elem(@test_result, 1)} @@ -1469,111 +1575,115 @@
- Receive real-time updates from Gaiia when accounts, subscriptions, or inventory items change. -
+ <%!-- Gaiia Webhook Section --%> + <%= if provider.id == "gaiia" && @integrations["gaiia"] do %> ++ Receive real-time updates from Gaiia when accounts, subscriptions, or inventory items change. +
-+ Paste the secret key generated by Gaiia when you create the webhook. +
++ Once configured, Towerops will receive real-time updates when accounts, subscriptions, or inventory items change in Gaiia. +
+- Paste the secret key generated by Gaiia when you create the webhook. -
-- Once configured, Towerops will receive real-time updates when accounts, subscriptions, or inventory items change in Gaiia. -
-