Commit graph

103 commits

Author SHA1 Message Date
f09d1b296d feat: add historical wireless client tracking with TimescaleDB
- Create wireless_client_readings hypertable with compression and retention
- Add WirelessClientReading schema and batch insert function
- Update DevicePollerWorker to save historical readings
- Add signal_badge and snr_badge components to CoreComponents
2026-03-09 17:42:17 -05:00
1c222f8ff5
feat: add capacity insight worker, UI, and reporting views
Add CapacityInsightWorker (every 15 min) that generates critical/warning
insights when backhaul utilization exceeds 90%/75% and auto-resolves
when it drops below 70%.

Add capacity and utilization columns to the device ports tab with
set/clear capacity controls. Add organization-level /capacity page
with summary cards and per-site capacity table. Add capacity summary
card to site show page. Add Capacity link to nav menu.
2026-03-07 14:42:40 -06:00
c86ca57864
feat: add real-time status emoji updates in page titles
Dynamically update page title emoji when device/alert status changes:
- Add PubSub broadcasts when alerts are created/resolved
- Create StatusTitleComponent LiveComponent to subscribe to alert changes
- Add StatusTitle JavaScript hook to update document.title in real-time
- Subscribe to organization:alerts channel on LiveView mount
- Push emoji update events when alert status changes

This provides immediate visual feedback in browser tabs when
critical/warning/healthy status changes without requiring page refresh.
2026-03-06 14:49:44 -06:00
9bef1b289d
feat: add status emoji to page titles
Add colored circle emoji (🔴/🟡/🟢) to page titles based on organization
health status:
- 🔴 Red: Critical alerts (device_down, agent_offline, severity 1)
- 🟡 Yellow: Warning alerts (severity 2 or any active alerts)
- 🟢 Green: No active alerts

Provides at-a-glance status visibility in browser tabs.

Note: Favicon remains static stoplight, only page title is dynamic.
2026-03-06 14:45:02 -06:00
c110832b42
Revert "feat: add status emoji to page titles"
This reverts commit f3873e0da7.
2026-03-06 14:43:13 -06:00
f3873e0da7
feat: add status emoji to page titles
Add colored circle emoji (🔴/🟡/🟢) to page titles based on organization
health status:
- 🔴 Red: Critical alerts (device_down, agent_offline, severity 1)
- 🟡 Yellow: Warning alerts (severity 2 or any active alerts)
- 🟢 Green: No active alerts

Provides at-a-glance status visibility in browser tabs.
2026-03-06 14:42:55 -06:00
4b4bb2668f
feat: add billing tab to organization settings
Implements Phase 6 of Stripe billing integration:
- Add Billing tab to organization settings page
- Display subscription status, device usage, and estimated costs
- "Upgrade to Paid Plan" button for free tier orgs
- "Manage Billing" button to access Stripe Customer Portal
- Billing information panel showing subscription details
- Support for dark mode and responsive design

Also fixes organization name truncation in top navigation:
- Long organization names now show with ellipsis instead of being cut off
- Added max-w-xs constraint and truncate class to org switcher button
2026-03-06 11:08:05 -06:00
d3d5d1e706
feat: add TowerOps suffix to all page titles
Add '| TowerOps' suffix to page titles so users can easily identify
TowerOps tabs when multiple browser tabs are open.

Examples:
- Dashboard → 'Dashboard | TowerOps'
- Equipment Details → 'Router-1 | TowerOps'
- No page_title → 'TowerOps'

Uses Phoenix LiveView's suffix parameter on live_title component.
2026-03-05 13:51:28 -06:00
ade7e2fe15
fix: correct mail adapter message interpolation in login page
Fixes fragmented translation that displayed raw '%{link}' placeholder text
instead of properly interpolated link in development mail adapter notice.

Changes:
- Consolidate separate translation calls into single interpolated string
- Use raw() helper to safely inject HTML link into translated text
- Update Spanish translation to include %{link} placeholder
- Extract updated translations with mix gettext.extract

Before: "To see sent emails, visit %{link}. the mailbox page."
After: "To see sent emails, visit the mailbox page." (with proper link)
2026-03-05 13:32:34 -06:00
94bc755dd8
fix: add dark mode support to marketing site
Add dark: variants throughout the marketing page and layout so text,
backgrounds, cards, badges, and borders render properly when the
system or user preference is set to dark mode. Use invert + screen
blend mode on the logo PNG to eliminate its white background.
2026-03-04 13:57:12 -06:00
7668518114
fix: handle missing value attr in input component when using name= directly
When calling <.input name="..." ...> without a field or value attr, @value
was absent from assigns causing a KeyError. Added default: nil to the attr
and use __given__ to detect whether value was explicitly passed so the field
clause still reads value from the FormField correctly.
2026-02-17 16:13:46 -06:00
edeeacfefb
Add Exceptions link to admin nav bar 2026-02-17 10:44:03 -06: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
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
2735c1a032 Add onboarding flow for new organizations 2026-02-16 10:14:45 -06: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
c790794191 Fix tests, credo issues, and Gaiia sync bugs
- Fix CLOAK_KEY placeholder in nix shell (invalid base64)
- Fix error HTML test assertion to match actual template
- Fix Gaiia sync: read 'subnet' field instead of 'block' for IP blocks
- Fix Gaiia sync: extract nested status name from subscription objects
- Fix security headers tests for environment detection
- Fix mobile auth tests to use raw_token
- Fix LiveView test assertions to match actual template content
- Fix SNMP config test expectations for test environment
- Refactor: resolve all Credo complexity/nesting issues
  - Extract helper functions in NetBox sync, VISP sync, Sonar sync
  - Flatten nested conditionals in settings, integrations, alerts
  - Use with/validate_present pattern for connection testing
2026-02-15 11:55:49 -06:00
172b830b6b ui: add org settings and user settings to mobile nav 2026-02-15 09:22:48 -06:00
5041ac8e25 ui: polish auth pages, core components, and visual consistency 2026-02-14 21:11:33 -06:00
02474c529f ui: major redesign - NOC dashboard, consolidated nav, dense tables, flat alerts 2026-02-14 20:15:07 -06:00
243b773e39 i18n: wrap all user-facing strings in gettext() 2026-02-14 17:44:01 -06:00
0f7e91af0c ui: remove Agents from top-level nav, accessible via org settings tab 2026-02-14 14:03:49 -06:00
a028695d3b
format 2026-02-14 13:57:25 -06:00
2ea849d622 feat: add developer and product links to marketing footer 2026-02-14 13:07:14 -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
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
b7204b604d fix: remove experimental badges from Alerts and Network Map nav items 2026-02-13 19:11:34 -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
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
9c266e57ff feat: wire up Trace and Activity Feed routes + nav 2026-02-13 18:50:28 -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
f53332672b
add IP allowlist link to superadmin nav, rename whitelist/blacklist to allowlist/denylist 2026-02-11 11:40:44 -06:00
c5d8d73a0c
add row_link to table component for proper anchor tags
Replace phx-click JS.navigate with real <.link navigate> elements
on table rows so users can Ctrl+Click to open in new tabs, use
right-click context menus, and navigate via keyboard. Adds row_link
attr to <.table> core component and applies it to all agent tables.
Converts device list custom table from phx-click to inner links.
2026-02-11 08:46:03 -06:00
5c59777baa
Live-ticking relative timestamps on agents page 2026-02-10 10:24:21 -06:00
481fc6d4a2
Add absolute format to timestamp component to fix render flash 2026-02-10 10:19:54 -06:00
156d9a47bf
UI improvements 2026-02-05 14:57:11 -06:00
1a054fd598
make sites optional 2026-02-04 13:05:32 -06:00
2ef154e4d7
feat: migrate core components to gettext
Migrates consent prompt component strings to gettext for internationalization:
- Updated Policies modal title
- Policy review message
- Policy acceptance checkbox labels (Privacy Policy, Terms of Service)
- Consent disclaimer text
- Accept button text

All strings now use gettext() for translation support.
2026-02-02 12:49:13 -06:00
04c33b0719
paginate audit logs 2026-02-01 13:27:56 -06:00
480789c3e2 banner dissmiss and mikrotik version and license 2026-01-31 13:07:09 -06:00
2a36917738 mfa enforced on login 2026-01-29 14:31:13 -06:00
55e9397d59 user session tracking 2026-01-29 14:14:21 -06:00
c0736d4c2e gdpr consent tracking 2026-01-29 11:12:35 -06:00
8e739283ad refactoring 2026-01-29 10:03:43 -06:00
9833f61043 login redirect fix 2026-01-28 15:18:08 -06:00
aed15dd6a1 impersonate fixes 2026-01-28 14:41:27 -06:00
8b71c4adb8 mib update from librenms 2026-01-28 13:38:31 -06:00
220f1edce3 cookie improvements 2026-01-28 12:30:28 -06:00