diff --git a/lib/towerops_web/live/help_live/index.ex b/lib/towerops_web/live/help_live/index.ex index f8103d89..44352e0f 100644 --- a/lib/towerops_web/live/help_live/index.ex +++ b/lib/towerops_web/live/help_live/index.ex @@ -283,6 +283,81 @@ defmodule ToweropsWeb.HelpLive.Index do Graphs & Live Polling +
  • + <.link + patch={~p"/help?section=insights"} + class={[ + "block px-3 py-2 rounded-md text-sm font-medium transition-colors", + if @active_section == "insights" do + "bg-blue-50 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300" + else + "text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800" + end + ]} + > + Network Insights + +
  • +
  • + <.link + patch={~p"/help?section=network-map"} + class={[ + "block px-3 py-2 rounded-md text-sm font-medium transition-colors", + if @active_section == "network-map" do + "bg-blue-50 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300" + else + "text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800" + end + ]} + > + Network Map + +
  • +
  • + <.link + patch={~p"/help?section=api-tokens"} + class={[ + "block px-3 py-2 rounded-md text-sm font-medium transition-colors", + if @active_section == "api-tokens" do + "bg-blue-50 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300" + else + "text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800" + end + ]} + > + API Tokens + +
  • +
  • + <.link + patch={~p"/help?section=rest-api"} + class={[ + "block px-3 py-2 rounded-md text-sm font-medium transition-colors", + if @active_section == "rest-api" do + "bg-blue-50 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300" + else + "text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800" + end + ]} + > + REST API + +
  • +
  • + <.link + patch={~p"/help?section=graphql-api"} + class={[ + "block px-3 py-2 rounded-md text-sm font-medium transition-colors", + if @active_section == "graphql-api" do + "bg-blue-50 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300" + else + "text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800" + end + ]} + > + GraphQL API + +
  • @@ -2237,6 +2312,204 @@ defmodule ToweropsWeb.HelpLive.Index do + <% "insights" -> %> +
    +

    + Network Insights +

    +

    + Network Insights provides proactive observations about your network health, gathered automatically from all connected data sources. +

    + +

    How It Works

    +

    + Towerops continuously analyzes data from SNMP polling, Preseem, Gaiia, and other integrations to surface actionable findings. Insights are categorized by source, urgency, and type so you can focus on what matters. +

    + +

    Insight Types

    + + +

    Filtering & Management

    +

    + Use the filter bar to narrow insights by status (active/dismissed), source (Preseem, Gaiia, SNMP, system), and urgency level. Each insight shows affected devices as clickable links so you can drill directly into the device detail page. +

    +

    + Dismiss insights you've reviewed to keep the active list clean. Bulk actions let you select multiple insights at once. +

    + +
    +

    + Tip: Insights run on a nightly schedule. Connect your Gaiia and Preseem integrations in + <.link navigate={~p"/help?section=integrations"} class="underline">Organization Settings + to get the most comprehensive insights. +

    +
    +
    + + <% "network-map" -> %> +
    +

    + Network Map +

    +

    + The Network Map provides a geographic view of your sites on an interactive map. Sites with latitude and longitude coordinates are displayed as markers that you can click to view details. +

    + +

    Adding Location Data

    +

    + Each site can have an address and/or latitude/longitude coordinates. You can set these in two ways: +

    + + +

    Geocoding Setup

    +

    + Address-to-coordinate conversion requires a Google Maps Geocoding API key. Your administrator sets this as the GOOGLE_MAPS_API_KEY environment variable on the server. The map display itself uses OpenStreetMap and requires no API key. +

    + +

    Map Features

    + +
    + + <% "api-tokens" -> %> +
    +

    + API Tokens +

    +

    + API tokens allow external applications and scripts to authenticate with the Towerops REST and GraphQL APIs. Each token is scoped to an organization and can be managed from your user settings. +

    + +

    Creating a Token

    +
      +
    1. Go to User Settings → API Tokens
    2. +
    3. Click "Create API Token"
    4. +
    5. Give the token a descriptive name (e.g., "Grafana Integration")
    6. +
    7. Copy the token immediately — it will only be shown once
    8. +
    + +

    Using a Token

    +

    + Include the token in the Authorization header: +

    +
    +
    Authorization: Bearer your-api-token-here
    +
    + +

    Security Best Practices

    + + +
    +

    + See also: + <.link navigate={~p"/help?section=rest-api"} class="underline">REST API and + <.link navigate={~p"/help?section=graphql-api"} class="underline">GraphQL API + for endpoint documentation. +

    +
    +
    + + <% "rest-api" -> %> +
    +

    + REST API +

    +

    + The Towerops REST API provides programmatic access to your monitoring data. All endpoints are under /api/v1/ and require a valid API token. +

    + +

    Available Endpoints

    + + +

    Quick Example

    +
    +
    <%= raw("curl -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  https://app.towerops.net/api/v1/devices") %>
    +
    +

    + All responses use <%= raw("{\"data\": ...}") %> format. Results are scoped to the organization associated with your API token. +

    + +
    +

    + Full reference: + REST API Documentation → + — complete endpoint reference with request/response examples. +

    +
    +
    + + <% "graphql-api" -> %> +
    +

    + GraphQL API +

    +

    + The GraphQL API lets you query exactly the data you need in a single request. The endpoint is POST /api/graphql and uses the same API token authentication as the REST API. +

    + +

    Why GraphQL?

    + + +

    Quick Example

    +
    +
    <%= raw("curl -X POST https://app.towerops.net/api/graphql \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\": \"{ devices { id name ipAddress status } }\"}'") %>
    +
    + +

    Available Queries

    + + +

    Mutations

    + + +
    +

    + Full reference: + GraphQL API Documentation → + — complete schema reference with query examples and variable usage. +

    +
    +
    + <% _ -> %>