Commit graph

1666 commits

Author SHA1 Message Date
78aa415073 Skip Phoenix poller/monitor scheduling when SNMP disabled
JobCleanupTask was scheduling poller and monitor jobs for all SNMP-enabled
devices on every startup without checking phoenix_snmp_disabled. These jobs
would immediately bail out but still consumed queue capacity.

JobHealthCheckWorker had the same issue - recovering 'missing' monitor jobs
that would just no-op.

Both now check Client.phoenix_snmp_disabled() before scheduling.
2026-02-17 07:12:15 -06:00
FluxCD
ee478a4817 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771282252-7160bf9 [skip ci] 2026-02-16 22:54:51 +00:00
7160bf95d6 Add admin endpoint to flush Oban jobs by state 2026-02-16 16:50:23 -06:00
FluxCD
0b03efe7b6 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771281501-de986bd [skip ci] 2026-02-16 22:42:48 +00:00
de986bddf6
Prevent Oban polling/monitoring job stacking per device
When the Oban queue backs up, the 60-second uniqueness window expires
and duplicate jobs stack up per device. Switch to period: :infinity so
only one poll/monitor job exists per device at any time. Add replace
option to supersede stale scheduled jobs with updated scheduled_at.
Remove :executing from unique states so self-scheduling works while
the current job runs. Set max_attempts: 1 since retrying stale polls
is pointless.

Also fix all credo --strict issues across the codebase.
2026-02-16 16:37:48 -06:00
FluxCD
09c56e3e9b chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771279924-179f049 [skip ci] 2026-02-16 22:14:45 +00:00
179f0494e5
Fix pre-existing test failures from role enum and MikroTik changes
- invitation_test: default role is now :technician not :member
- settings_live_members_test: use "technician" role in invite form (member removed from select)
- form_test: MikroTik API section is intentionally disabled, expect refute
2026-02-16 16:11:32 -06:00
FluxCD
72e0c0bf22 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771279533-e09b306 [skip ci] 2026-02-16 22:09:42 +00:00
e09b306f9c
Fix maintenance window form crash on mount
The form template iterated over changeset error tuples directly
(e.g. changeset.errors[:name] returns a tuple, not a list), causing
Protocol.UndefinedError for Enumerable on Tuple.

Rewrote form to use to_form/2 and <.input> components per LiveView
conventions. Errors are now handled properly by the input component.
2026-02-16 16:04:59 -06:00
FluxCD
0cc519b6bf chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771279255-d233f55 [skip ci] 2026-02-16 22:03:41 +00:00
d233f55a35 Fix: add check_executors queue to Oban config (was missing, causing 4.5k stuck jobs) 2026-02-16 16:00:24 -06:00
FluxCD
7e57ff8ad5 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771278915-6e3db72 [skip ci] 2026-02-16 21:59:39 +00:00
6e3db720fd Collapse device page tabs into header row — single line nav 2026-02-16 15:54:42 -06:00
FluxCD
9dca0b099e chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771263863-44d9bb4 [skip ci] 2026-02-16 17:48:03 +00:00
44d9bb4c49 Merge pull request 'feature/subscriber-impact' (#6) from feature/subscriber-impact into main
Reviewed-on: graham/towerops-web#6
2026-02-16 09:43:54 -08:00
b12d46c716 Add wireless client table discovery and improve subscriber matching
Poll connected client/SM tables from APs via vendor-specific SNMP:
- Cambium ePMP: cambiumAPConnectedSTATable
- Ubiquiti airOS: ubntStaTable
- MikroTik RouterOS: mtxrWlRtabTable

Wireless client MAC matches now take highest priority for
subscriber-to-AP mapping, giving accurate per-radio subscriber counts.
2026-02-16 11:16:52 -06:00
520f7b0c54 Add subscriber-to-AP matching via ARP + Gaiia integration
Matches Gaiia subscriber accounts to TowerOps devices using:
- ARP table IP matching (high confidence)
- ARP table MAC matching (high confidence)
- Site CIDR fallback (medium confidence)

Enables subscriber impact display on alerts and device pages.
2026-02-16 11:07:20 -06:00
FluxCD
c1b816f7fe chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771260135-261bfd4 [skip ci] 2026-02-16 16:45:53 +00:00
261bfd4b95 Merge pull request 'Fix dark mode inconsistencies across all pages' (#4) from fix/dark-mode-consistency into main
Reviewed-on: graham/towerops-web#4
2026-02-16 08:41:46 -08:00
FluxCD
8b06570731 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771259590-0cb2678 [skip ci] 2026-02-16 16:36:54 +00:00
FluxCD
62c4e3c778 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771259290-3f2b2a5 [skip ci] 2026-02-16 16:32:51 +00:00
7ec2b2a00a Fix dark mode inconsistencies across all pages
Add missing dark: variant classes to:
- consent_prompt, check_live/form_component: modal overlays
- error pages (404, 500): body background
- marketing_layouts: page background
- home page: pricing card, CTA button, feature card
- totp_enrollment: QR container
- admin audit_live/monitoring_live: badge colors, event borders
- alert_live: acknowledged-by text
- dashboard_live: severity color fallback
- device_live (index, show, form): status text, spinners
- settings_live: checkbox borders
- trace_live: status colors, labels, table headers
2026-02-16 10:31:52 -06:00
0cb2678373 Merge pull request 'Add maintenance windows LiveView UI' (#5) from feature/maintenance-windows-ui into main
Reviewed-on: graham/towerops-web#5
2026-02-16 08:28:44 -08:00
FluxCD
3ebef43f2e chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771258992-547ca8b [skip ci] 2026-02-16 16:27:51 +00:00
0f9fac76d9 Add maintenance windows LiveView UI
- Index page with All/Active/Upcoming/Past filter tabs
- Show page with active banner, edit/delete actions
- Form page with scope picker (org-wide/site/device), datetime fields
- Nav link added to desktop and mobile nav
2026-02-16 10:26:10 -06:00
3f2b2a5d5e Merge pull request 'Add onboarding flow for new organizations' (#3) from feature/onboarding-flow into main
Reviewed-on: graham/towerops-web#3
2026-02-16 08:23:22 -08:00
547ca8bebd Merge pull request 'Replace 'Other Integrations' with specific category headers on settings page' (#2) from feature/integration-category-headers into main
Reviewed-on: graham/towerops-web#2
2026-02-16 08:22:42 -08:00
2735c1a032 Add onboarding flow for new organizations 2026-02-16 10:14:45 -06:00
0cd62951ec Replace 'Other Integrations' with specific category headers on settings page
Each non-billing integration now shows under its proper category:
- Quality of Experience (Preseem)
- Incident Management (PagerDuty)
- Infrastructure & IPAM (NetBox)
2026-02-16 10:06:47 -06:00
FluxCD
5c70ce49ef chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771257711-5b786aa [skip ci] 2026-02-16 16:05:47 +00:00
5b786aac08 Add maintenance windows and weather overlay (backend)
Maintenance Windows:
- maintenance_windows table with org/site/device scoping
- Full CRUD context (Towerops.Maintenance)
- device_in_maintenance?/1 checks device → site → org hierarchy
- Alert suppression in DeviceMonitorWorker (skips alerts during maintenance)
- maintenance_badge/1 helper for UI display

Weather Overlay:
- weather_observations + weather_alerts tables
- OpenWeatherMap free API client (lat/lon based)
- WeatherSyncWorker (Oban, 15min interval, respects rate limits)
- Observation parsing from OWM response format
- Correlation helpers: severe_weather_near?/2, weather_at/2
- Severity classification tuned for WISP ops (wind, rain, ice thresholds)
- Per-org latest observations query for dashboard
- 30-day automatic cleanup

Both features are backend-only — no UI yet.
2026-02-16 10:01:19 -06:00
FluxCD
33f4b5dc16 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771252516-541b418 [skip ci] 2026-02-16 14:39:41 +00:00
541b418d57 Group billing providers on settings integrations tab
Add 'Billing & Subscriber Management' section header with 'Choose one'
badge and 'Other Integrations' divider on the settings page integrations
tab. Reorder providers: billing first (Gaiia, Sonar, Splynx, VISP),
then QoE/incidents/infrastructure.
2026-02-16 08:34:46 -06:00
FluxCD
6331bc9400 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771251798-9194694 [skip ci] 2026-02-16 14:27:50 +00:00
91946946a6 Make billing integration exclusivity more obvious
Add 'Choose one' badge with indigo border to billing category,
clarify that only one billing platform can be active at a time.
2026-02-16 08:22:47 -06:00
FluxCD
7e819d62cf chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771199171-47b364a [skip ci] 2026-02-15 23:50:49 +00:00
FluxCD
76c84c2a03 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771198882-b4c0407 [skip ci] 2026-02-15 23:45:50 +00:00
47b364a112
Fix Gaiia inventory matching, mapping UX, and logo link
- Fetch MAC address from Gaiia custom fields during inventory sync
- Remove name-based device matching (model names caused false matches)
- Keep IP-only matching for device suggestions
- Make unmapped rows clickable in the Gaiia mapping table
- Point authenticated logo link to /dashboard instead of /orgs
- Fix flaky monitor test teardown race condition
2026-02-15 17:41:43 -06:00
b4c0407ee0 Add granular org roles: executive, technician
New role system:
- owner: full access + financials
- admin: full access + financials (except org deletion)
- executive: read-only + full financial visibility (MRR, revenue)
- technician: field ops (devices, sites, alerts) without financials
- member: legacy alias for technician (migrated)
- viewer: read-only, no financials

Financial data (MRR, revenue, billing) gated behind can_view_financials
assign in all LiveView templates: dashboard, alerts, trace, site show.

Includes migration to rename existing member roles to technician.
2026-02-15 17:40:53 -06:00
FluxCD
bc22abb452 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771198073-d32ba58 [skip ci] 2026-02-15 23:31:43 +00:00
FluxCD
d859757a17 chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771197773-866715f [skip ci] 2026-02-15 23:26:42 +00:00
d32ba58b75 Hide config backup and config change features from UI
Temporarily hide config change tracking, config timeline links,
and config backup references across dashboard, site show, trace,
and home page. Code preserved with hidden class / HTML comments.
2026-02-15 17:26:10 -06:00
866715fdcc Hide MikroTik API/SSH features from UI
Temporarily disable all MikroTik-related UI elements using false guards.
Code is preserved and can be re-enabled by removing the guards.

Hidden: org settings tab/panel, device form config section,
device show backups/timeline tabs, site form config section,
help page nav item.
2026-02-15 17:18:55 -06:00
6d678b6d17 Merge pull request 'gaiia' (#1) from gaiia into main
Reviewed-on: graham/towerops-web#1
2026-02-15 15:17:27 -08:00
f7dc546bcf
Merge remote-tracking branch 'origin/main' into gaiia 2026-02-15 17:17:10 -06:00
719ac1eb0f
Fix Mix.env() runtime crash in releases
Capture Mix.env() at compile time via module attribute since Mix is
not available at runtime in production releases.
2026-02-15 17:16:48 -06:00
8b51b02d45
Compute per-site subscriber counts from IP block matching
After Gaiia sync, match inventory item IPs against network site CIDR
blocks to populate account_count and total_mrr on each site. This
enables the Site Health table to show subscriber and MRR data per site.
2026-02-15 17:11:23 -06:00
de075ea8d9
Store billing subscriber/MRR data on integrations for dashboard
Each billing sync (Gaiia, Splynx, VISP, Sonar) already computes
subscriber counts and MRR but only stored them in sync messages.
Now persists them on the integrations table so the dashboard can
aggregate across all billing providers instead of only querying
Gaiia network sites (which were never populated).

Also fixes SnmpKit Config environment detection to use Mix.env()
as fallback when MIX_ENV env var is not set.
2026-02-15 16:51:33 -06:00
FluxCD
b3d9bdae1a chore: update towerops image to git.mcintire.me/graham/towerops-web:main-1771194965-074c55c [skip ci] 2026-02-15 22:40:17 +00:00
074c55cd7d Sort Gaiia entity mapping: items with suggestions shown first
Both network sites and inventory items tabs now sort entries
with match suggestions to the top of the list.
2026-02-15 16:35:36 -06:00