diff --git a/lib/towerops_web/live/org/settings_live.html.heex b/lib/towerops_web/live/org/settings_live.html.heex index 9b9d88e7..9796f377 100644 --- a/lib/towerops_web/live/org/settings_live.html.heex +++ b/lib/towerops_web/live/org/settings_live.html.heex @@ -868,118 +868,109 @@ <% billing_locked? = @active_billing_provider != nil and provider.id in @billing_provider_ids and provider.id != @active_billing_provider %> - <%!-- Section headers --%> - <%= if idx == 0 do %> -
- {provider.description} -
-+ {provider.description} +
+- {t("Your NetBox instance URL and API token.")} -
-- <.icon - name="hero-shield-check" - class="h-3.5 w-3.5 inline -mt-0.5" - /> - {raw(format_help_step(provider.setup_help.permissions))} -
-
- <.icon
- name="hero-arrow-top-right-on-square"
- class="h-3 w-3 inline -mt-0.5"
- /> Example URL:
- {provider.setup_help.url_pattern}
-
- {t( - "Choose how data flows between TowerOps and NetBox. You can change this later." - )} -
- -- {t( - "Choose which NetBox objects participate in sync. Devices and sites are recommended at minimum." - )} -
-- {t( - "Narrow the sync scope. Leave blank to sync everything. Comma-separated for multiple values." - )} -
-- {t( - "How often TowerOps checks NetBox for changes. 30 minutes is recommended for most setups." - )} -
-- {msg} -
- <% {:error, msg} -> %> - <.icon - name="hero-x-circle" - class="h-5 w-5 shrink-0 text-red-500 dark:text-red-400" - /> -- {msg} -
- <% end %> -- {t("Your Sonar instance URL and API token.")} + {t("Your NetBox instance URL and API token.")}
+ {t( + "Choose how data flows between TowerOps and NetBox. You can change this later." + )} +
+ ++ {t( + "Choose which NetBox objects participate in sync. Devices and sites are recommended at minimum." + )} +
++ {t( + "Narrow the sync scope. Leave blank to sync everything. Comma-separated for multiple values." + )} +
++ {t( + "How often TowerOps checks NetBox for changes. 30 minutes is recommended for most setups." + )} +
"text-green-800 dark:text-green-300" - {:error, _} -> "text-red-800 dark:text-red-300" - end - ]}> - {elem(@test_result, 1)} -
+ <%= 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-5 w-5 shrink-0 text-red-500 dark:text-red-400" + /> ++ {msg} +
+ <% end %>- {t("Your Splynx instance URL, API key, and API secret.")} + {t("Your Sonar instance URL and API token.")}
-- <.icon - name="hero-shield-check" - class="h-3.5 w-3.5 inline -mt-0.5" - /> - {raw(format_help_step(provider.setup_help.permissions))} -
-
- <.icon
- name="hero-arrow-top-right-on-square"
- class="h-3 w-3 inline -mt-0.5"
- /> Example URL:
- {provider.setup_help.url_pattern}
-
- {t( - "When connected, TowerOps will automatically trigger, acknowledge, and resolve PagerDuty incidents in sync with your alerts." - )} -
-- {t( - "When someone resolves or acknowledges an incident directly in PagerDuty," - )} - {t("TowerOps will automatically update the corresponding alert.")} +
+ {t("Your Splynx instance URL, API key, and API secret.")}
-
- {ToweropsWeb.Endpoint.url()}/api/v1/webhooks/pagerduty/{@current_scope.organization.id}
-
+ + <.icon + name="hero-shield-check" + class="h-3.5 w-3.5 inline -mt-0.5" + /> + {raw(format_help_step(provider.setup_help.permissions))} +
+
+ <.icon
+ name="hero-arrow-top-right-on-square"
+ class="h-3 w-3 inline -mt-0.5"
+ /> Example URL:
+ {provider.setup_help.url_pattern}
+
+
"text-green-800 dark:text-green-300" + {:error, _} -> "text-red-800 dark:text-red-300" + end + ]}> + {elem(@test_result, 1)} +
++ <.icon + name="hero-shield-check" + class="h-3.5 w-3.5 inline -mt-0.5" + /> + {raw(format_help_step(provider.setup_help.permissions))} +
+
+ <.icon
+ name="hero-arrow-top-right-on-square"
+ class="h-3 w-3 inline -mt-0.5"
+ /> Example URL:
+ {provider.setup_help.url_pattern}
+
+ {t( + "When connected, TowerOps will automatically trigger, acknowledge, and resolve PagerDuty incidents in sync with your alerts." + )} +
++ {t( + "When someone resolves or acknowledges an incident directly in PagerDuty," + )} + {t("TowerOps will automatically update the corresponding alert.")} +
+
+ {ToweropsWeb.Endpoint.url()}/api/v1/webhooks/pagerduty/{@current_scope.organization.id}
+
+ "text-green-800 dark:text-green-300" + {:error, _} -> "text-red-800 dark:text-red-300" + end + ]}> + {elem(@test_result, 1)} +
+- {t( - "Receive real-time updates from Gaiia when accounts, subscriptions, or inventory items change." - )} -
+ <%!-- Gaiia Webhook Section --%> + <%= if provider.id == "gaiia" && @integrations["gaiia"] do %> ++ {t( + "Receive real-time updates from Gaiia when accounts, subscriptions, or inventory items change." + )} +
-+ {t( + "Paste the secret key generated by Gaiia when you create the webhook." + )} +
++ {t( + "Once configured, Towerops will receive real-time updates when accounts, subscriptions, or inventory items change in Gaiia." + )} +
- {t("Paste the secret key generated by Gaiia when you create the webhook.")} -
-- {t( - "Once configured, Towerops will receive real-time updates when accounts, subscriptions, or inventory items change in Gaiia." - )} -
-+ Disable {Enum.find_value(@providers, fn p -> + if p.id == @active_billing_provider, do: p.name + end)} to switch to a different billing provider. +
+