Commit graph

803 commits

Author SHA1 Message Date
b897330a7e docs: add integrations and org settings sections to in-app help page 2026-02-14 11:28:57 -06:00
95ce9ad06d refactor: org settings into tabbed interface with integrations 2026-02-14 11:28:57 -06:00
8d00a04187
feat: add FluxCD image automation, fix Preseem duplicate AP crash
Switch deployment pipeline from GitLab Agent kubectl to FluxCD image
automation. CI now only builds and pushes tagged images to Forgejo
registry; FluxCD detects new tags and updates the deployment manifest.

Fix Ecto.MultipleResultsError on /dashboard when a device has multiple
Preseem access point records by using limit(1) instead of Repo.get_by.
2026-02-14 10:30:12 -06:00
c37ae76ceb fix: device index uses device_role instead of nonexistent device_type, last_checked_at instead of last_seen_at; make TimescaleDB migrations conditional for dev/test 2026-02-14 10:13:03 -06:00
715a20dd09 fix: dashboard activity feed uses correct field names (summary/timestamp instead of description/inserted_at) 2026-02-14 09:57:37 -06:00
e195e5c9e8 fix: close UDP sockets in error paths to prevent fd leak
get_bulk, set, and get_multi used 'with' chains that skipped
close_socket when the operation failed, leaking file descriptors.
Over time this exhausted the fd limit causing EMFILE crashes.

Switched to case + try/after to guarantee socket cleanup.
2026-02-14 09:50:12 -06:00
12b1a64f8d fix: use atom for Ecto.Enum alert_type in activity feed query 2026-02-13 19:52:29 -06:00
0fc36524b4 fix: resolve 500 errors on /activity and /changelog
- Activity feed: use schema modules instead of string table names in Ecto
  queries to fix UUID encoding (Postgrex expected binary, got string)
- Changelog parser: remove plain hyphen from separator character class
  to prevent splitting on date hyphens (2026-02-13)
2026-02-13 19:49:12 -06:00
67eac2f1c9 fix: prevent cascading crash in error email handler when SES not configured 2026-02-13 19:44:51 -06:00
9e7ee5099d refactor: fix all credo strict issues, format all code, fix broken routes
- Fix broken route paths in dashboard (/discovery, /subscribers/trace, /config-changes)
- Fix insights empty state settings link (org-scoped route)
- Add underscores to all 86400 literals across 6 files
- Alphabetize aliases in search.ex and agent_channel.ex
- Extract changelog parser helper to reduce nesting
- Extract dashboard impact calculation to reduce nesting
- Refactor agent_channel config change detection (pattern match, extract function)
- Combine double Enum.reject into single call in trace.ex
- Fix line length in trace.ex search query
- Replace length/1 > 0 with != [] in trace_live
- Run mix format on all files
2026-02-13 19:34:40 -06:00
493b1e8001 fix: correct broken route paths in dashboard and insights templates 2026-02-13 19:27:32 -06:00
bc128388ba feat: add loading skeletons and page transitions 2026-02-13 19:18:28 -06:00
ad6e9b91a3 feat: add global CSS polish — transitions, hover effects, scrollbar styling, status pulse 2026-02-13 19:17:38 -06:00
2389e11469 feat: add search trigger button with ⌘K hint in navbar 2026-02-13 19:13:11 -06:00
bfe552cb47 feat: enhance dashboard with uptime, quick actions, mini activity feed 2026-02-13 19:13:04 -06:00
88b5b55a01 feat: enhance activity feed with real-time updates, time grouping, search 2026-02-13 19:12:49 -06:00
314ed610d3 feat: add polished empty states across all pages 2026-02-13 19:11:54 -06:00
b7204b604d fix: remove experimental badges from Alerts and Network Map nav items 2026-02-13 19:11:34 -06:00
dec6f0f271 feat: rewrite marketing landing page for WISP operators
- Pain point section: disconnected tools, slow impact assessment
- WISP-specific features: impact dashboard, subscriber trace, alert triage, config tracking
- Pricing tiers: Starter (free/10 devices), Pro (/dev/mo), Business (/dev/mo)
- Use case sections: NOC, Help Desk, Owner perspectives
- Tech details: 786 device profiles, secure agent arch, SNMP v1/v2c/v3
- Updated both changelogs
2026-02-13 19:07:04 -06:00
608bad0cf6 Add What's New changelog page
- ChangelogParser: parses priv/static/changelog.txt into structured entries
- ChangelogLive: timeline view with DaisyUI styling
- Route at /changelog in authenticated scope
- What's New link in org dropdown menu
2026-02-13 19:01:19 -06:00
f64a1690fd fix: remove duplicate age_text/severity_color that conflicted with sub-agent's versions 2026-02-13 19:00:46 -06:00
eb4556300e fix: safer float formatting in site show template 2026-02-13 18:59:02 -06:00
08b876b207 fix: add missing age_text and severity_color helpers to alert_live 2026-02-13 18:58:13 -06:00
2c1b749487 fix: prevent nil crashes in trace template (Decimal, Calendar) 2026-02-13 18:56:55 -06:00
8b403db527 feat: smart alert triage with site grouping, severity colors, and resolve
- Group alerts by site (tower/location) with collapsible sections
- Show alert count badges per site, critical count highlighted
- Color-code alerts by severity and age (red >1h, orange >15m, yellow new)
- Add Resolve button with confirmation dialog
- Show subscriber impact from Gaiia inventory at site and alert level
- Filter tabs: Unresolved, Critical, All, Resolved with counts
- Sort options: Severity (default), Oldest First, Subscriber Impact
- Sites with most critical alerts and highest subscriber impact sort first
- Use DaisyUI collapse, badge, tab, and btn components
2026-02-13 18:56:37 -06:00
723f475933 feat: add global search (Cmd+K) across devices, sites, accounts, alerts
- Add Towerops.Search context module with categorized search
- Add GlobalSearchComponent LiveComponent with modal overlay
- Add GlobalSearch JS hook for Cmd+K/Ctrl+K keyboard shortcut
- Wire into authenticated layout
- Keyboard navigation (up/down/enter/esc) support
- DaisyUI-styled modal with categorized results (5 per category)
- Searches: device name/IP, site name, account name/ID, alert message
2026-02-13 18:56:15 -06:00
ba97281beb Rewrite site detail page to use all show.ex helpers
- Add summary stat cards (subscribers, MRR, device count, alerts)
- Add QoE summary with capacity bar (qoe_color, qoe_bg, capacity_bar_color)
- Device health grid with status dots and response times (status_dot_class, format_response_time)
- Active alerts panel with urgency icons (insight_urgency_class, insight_urgency_icon, time_ago)
- Config changes panel with size labels (change_size_label, change_size_color, time_ago)
- Preseem insights panel with urgency styling
- Keep existing latency chart
- Use DaisyUI card/badge components throughout
2026-02-13 18:54:59 -06:00
9c266e57ff feat: wire up Trace and Activity Feed routes + nav 2026-02-13 18:50:28 -06:00
0b837a7f6d fix: add remaining missing helpers (device_status_dot, alert_dot, urgency_dot) 2026-02-13 18:46:23 -06:00
1d77204769 fix: remove changelog_live with missing ChangelogParser dep 2026-02-13 18:45:18 -06:00
010736b555 fix: add issues_callout component to trace_live 2026-02-13 18:44:39 -06:00
7c2321da75 fix: add all missing helper functions to trace_live 2026-02-13 18:43:27 -06:00
da5a6c9edc fix: add missing type_badge_class to trace_live 2026-02-13 18:42:00 -06:00
c512f30e5a feat: add device list health indicators
- Health status dot (green/yellow/red/gray) from worst-case check state
- Relative 'last seen' with color-coded staleness thresholds
- Response time badge from latest monitoring check
- Subscriber count badge from Gaiia inventory items
- Batch queries to avoid N+1: Monitoring.get_device_health_summary/1,
  Monitoring.get_device_latest_response_times/1,
  Gaiia.get_device_subscriber_counts/1
2026-02-13 18:14:29 -06:00
5a3ede1f71 feat: config change → performance correlation system (Roadmap #2)
- New config_change_events table linking backup diffs to time windows
- ConfigChanges context with record/list functions and date filters
- Auto-detect changed sections from MikroTik config diffs
- Agent channel emits change events after backup creation
- Correlator engine: 2h before / 4h after QoE metric comparison
- Creates suspect_config_change insights on significant degradation
- Config Timeline LiveView with chart data, change list, detail view
- Device page: Config Timeline tab + Recent Config Changes card
- Dashboard: Recent Config Changes section with impact indicators
- Fix pre-existing integrations_live.html.heex scope bug
2026-02-13 17:56:55 -06:00
ab8039d59b
fix: move sync schedule block inside integration scope
The sync schedule section referenced `integration` variable outside
the if-block where it was assigned, causing compilation failure.
2026-02-13 16:51:52 -06:00
bd647b8251 feat: unified insights page, integration nav improvements, sync transparency
- Promote Insights to top-level nav at /insights with source/urgency/status filters
- Unified insights page shows all sources (Preseem, Gaiia, SNMP, System)
- Bulk select/dismiss support
- Integration pages now show sync schedule and next sync estimate
- Expose sync_interval_minutes as editable config field
- Add tab navigation between integration sub-pages
- Dashboard insights section links to /insights
- Integration 'Network Insights' link now points to /insights?source=preseem
- Add product roadmap (ROADMAP.md)
2026-02-13 16:40:27 -06:00
a1bf5f284a feat: impact dashboard with MRR at risk, active incidents, enhanced site health
- Add get_impact_summary/1: aggregates current outage subscriber/MRR impact
- Add list_active_incidents/1: down devices enriched with Gaiia/Preseem data, sorted by MRR
- Add get_site_impact_summaries/1: per-site health with QoE, affected subs, MRR at risk
- Dashboard top stats: MRR at Risk and Subscribers Affected cards
- Active Incidents section: color-coded by severity, shows duration/subs/MRR/QoE
- Site Health Grid: green/yellow/red health dots based on uptime and QoE scores
2026-02-13 16:38:14 -06:00
1dbb8926ed
fix: update remaining gaiia graphql status fields for object schema
Gaiia migrated all status fields from scalar enums to object types,
not just AccountStatus. Update BillingSubscription.status,
InventoryItem.status, and nested billingSubscriptions.status in the
accounts query to request { id name } subfields and extract the name
value in sync mappers.
2026-02-13 16:16:00 -06:00
d603a12322
feat: add per-organization Gaiia webhook setup UI
Auto-generate HMAC-SHA256 webhook secret when enabling the Gaiia
integration. Display webhook URL, secret with copy buttons, regenerate
option, and setup instructions on the integrations page.
2026-02-13 16:15:38 -06:00
20ec04379d
fix: update gaiia graphql queries for account status/type schema change
Gaiia API changed AccountStatus and AccountType from scalar enums to
objects with id/name/type subfields. Updated the accounts query to
request nested fields and the sync mapper to extract the name values.
2026-02-13 15:20:06 -06:00
872bef3512
feat: add 12/24-hour time format setting with consistent timezone display
wire time_format into scope, add settings UI selector, change defaults
to 24h, and replace all user-facing Calendar.strftime calls with
centralized TimeHelpers using the user's timezone and time format.
2026-02-13 15:16:29 -06:00
e000529654
fix: match tab order between settings and my data pages
The My Data page had tabs in a different order (Security before Sessions)
than the main settings page, and tab links used JS.push which never fired
because navigate does a full page load. Now both pages share the same tab
order and links include proper ?tab= query params.
2026-02-13 14:54:17 -06:00
20f5f48372
feat: command center dashboard with unified insights and contextual enrichment
Transform the dashboard into a single-pane-of-glass command center that
blends operational metrics with business context from Gaiia subscriber data.

- Extend insight schema with multi-source support (snmp, gaiia, system)
- Add Oban workers for automated insight generation (device health, system, gaiia)
- New Dashboard context with health score computation and site summaries
- Rewrite dashboard LiveView with health overview, alert/insight feeds, site grid
- Add source filter pills for insights with URL state management
- Add metrics bar to site detail pages (device count, alerts, subscribers, MRR)
- Add subscriber/MRR context to alert list site links
- Add subscriber badges to device list site headers
- Real-time PubSub updates for alerts on dashboard
2026-02-13 14:52:49 -06:00
848efa8fc4
fix: align gaiia graphql queries with actual api schema
field mappings from docs:
- accountStatus/accountType -> status/type
- accountBillingSubscriptions -> billingSubscriptions
- billingSubscriptionStatus -> status
- address city/state/zip -> locality/region/postalCode
- networkSiteIpBlocks -> ipBlocks
- inventoryItemStatus -> status, ipAddress -> ipAddressV4
- inventoryModel -> model, inventoryModelCategory -> model.category
- account/networkSite -> assignation.assignee (union type)
- product/recurringAmount/currency -> productVersion (price in cents)
- account on subscription -> entity (union type)
2026-02-13 14:41:14 -06:00
471c4f6893
fix: default new integrations to enabled on creation 2026-02-13 14:08:54 -06:00
e4499e8dd0
fix: use correct auth header for gaiia api
gaiia expects X-Gaiia-Api-Key header, not Authorization: Bearer.
2026-02-13 14:01:19 -06:00
37ea526c61
fix: log swallowed errors in integration connection test
the catch-all error handler was silently discarding the error reason,
making it impossible to debug failures. add logging and a specific
handler for graphql validation errors.
2026-02-13 13:53:50 -06:00
c01f638d3a
fix: use valid graphql query for gaiia connection test
the viewer query doesn't exist in gaiia's schema, causing a 400
validation error. use a minimal accounts query instead. also handle
400 responses with graphql errors properly.
2026-02-13 13:44:58 -06:00
6b2de4a114
add gaiia to org settings integrations page 2026-02-13 13:34:04 -06:00