Commit graph

53 commits

Author SHA1 Message Date
882a5d7eab
fix: display count sensor values as integers instead of floats
Connection counts (IPv4/IPv6, DHCP leases) were showing as floats
(e.g. 1270.0) in executor output, change detection messages, and
chart tooltips/axes. Now displayed as integers everywhere.
2026-03-06 15:03:30 -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
b56cdf4e9f
feat: dynamic favicon reflects real-time system health status
Favicon changes to green/yellow/red based on device and alert status.
LiveView computes the status server-side and passes it to a minimal
JS hook that generates PNG favicons via canvas.
2026-03-05 13:47:54 -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
02474c529f ui: major redesign - NOC dashboard, consolidated nav, dense tables, flat alerts 2026-02-14 20:15:07 -06:00
b1438204df Fix Cytoscape.js crash on navigation away from network map
- Stop running layout before destroy to prevent async callbacks hitting null renderer
- Set wheelSensitivity to 1 (default) to suppress console warning
2026-02-14 14:53:17 -06:00
5df5c97c45 feat: add geographic location to sites with geocoding, address fields, and Leaflet.js network map 2026-02-14 13:07:14 -06:00
2389e11469 feat: add search trigger button with ⌘K hint in navbar 2026-02-13 19:13:11 -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
7371ceb942
feat: add automatic network topology inference
Build a rich network topology from SNMP polling data using evidence-based
confidence scoring. LLDP/CDP neighbors, MAC address tables, and ARP data
are combined to infer device links with weighted confidence merging.

- Add DeviceLink and DeviceLinkEvidence schemas for persistent topology
- Implement evidence collectors: LLDP (0.95), CDP (0.95), MAC (0.7), ARP (0.6)
- Add device role inference from sysObjectID/sysDescr patterns
- Hook topology inference into DevicePollerWorker pipeline
- Add stale link cleanup (24h mark stale, 72h delete) via NeighborCleanupWorker
- Update NetworkMapLive with "Added" vs "All Devices" tabs
- Add connected devices section to device detail page
- Add device role selector to device edit form
- Update Cytoscape.js with role-based node shapes/colors and confidence edges
2026-02-12 13:28:01 -06:00
26bb3d5ca1
color network map nodes by device status
green for online, yellow for unknown, red for offline. previously
nodes were colored by device type which didn't convey health state.
also remove agent last_seen_at display from device detail page since
the offline badge already communicates agent health.
2026-02-11 15:41:50 -06:00
3276a1cd8c
fix user session controller test
Update email input ID assertion to match actual template implementation
2026-02-03 13:42:24 -06:00
5d5116681a
device edit refactor 2026-02-02 10:00:00 -06:00
f938b263cd
Mikrotik backup and gettext start 2026-02-02 09:11:22 -06:00
1790db8d5a
update mikrotik port with/without ssl 2026-02-01 17:09:52 -06:00
7232dab601
live device polling 2026-02-01 13:19:32 -06:00
15ac68fd9c banner dissmiss fix 2026-01-31 13:09:58 -06:00
480789c3e2 banner dissmiss and mikrotik version and license 2026-01-31 13:07:09 -06:00
c4ce7a94ca memory leak fixing 2026-01-31 10:40:19 -06:00
30f6f41c4d remove passkey from ts 2026-01-31 10:25:15 -06:00
3c00dcf37c remove passkeys for now 2026-01-31 09:50:35 -06:00
220f1edce3 cookie improvements 2026-01-28 12:30:28 -06:00
588639a47a gdpr cookie consent 2026-01-28 10:52:40 -06:00
74f2970664
ui tweaks 2026-01-26 13:34:52 -06:00
99414459d3
device reorder 2026-01-26 10:22:12 -06:00
d2abe9a14d
add network map 2026-01-25 15:24:35 -06:00
639ffd4a2c
better discovery 2026-01-22 17:40:58 -06:00
cba1f87f8f
fix: disable loading animations on chart graphs 2026-01-21 10:59:12 -06:00
dc9400e6ae
fix: adjust graph x-axis range based on selected time period
- Pass range parameter to SensorChart hook via data-range attribute
- Calculate x-axis min/max dynamically based on selected range (1h, 6h, 12h, 24h, 7d, 30d)
- Show date + time on x-axis labels for ranges > 24 hours
- Show time only for ranges <= 24 hours
- Fixes issue where 7d and 30d graphs showed incorrect time range
2026-01-18 12:56:44 -06:00
d2e38e351e
feat: display all timestamps in user's timezone
- Add timezone to socket assigns in mount_current_scope
- Detect user timezone from browser using Intl.DateTimeFormat
- Auto-save detected timezone to user profile on first connection
- Update all templates to use TimeHelpers with timezone parameter
- Update agent helper functions to accept timezone parameter
- Templates updated:
  - Alert list (triggered, acknowledged, resolved)
  - Device list (last checked)
  - Agent list and show (created, last seen, updated)
  - Admin dashboard (impersonation logs)
  - Admin org/user lists (created/joined dates)
  - Main dashboard (alert times)
2026-01-18 12:19:17 -06:00
f530c1b9a6
fix AutoDismissFlash hook order and implement raw ICMP ping
AutoDismissFlash hook fix:
- Move hook definitions before LiveSocket initialization
- Ensures hooks are defined when referenced in LiveSocket constructor
- Remove duplicate Hooks object

Raw ICMP ping implementation:
- Replace system ping command with pure Elixir implementation
- Use raw ICMP sockets for echo request/reply
- Build ICMP packets manually with proper checksum calculation
- Parse IP addresses using :inet.parse_address/1
- Handle both raw ICMP and IP-wrapped responses
- Requires CAP_NET_RAW capability in production containers
- Suitable for containerized environments without ping command
2026-01-18 10:56:04 -06:00
b0d1c8d9b1
fix TypeScript types for AutoDismissFlash hook 2026-01-18 10:51:42 -06:00
243c687d35
fix all credo issues and add flash auto-dismiss
- Replace TODO comment with "Future enhancement" note
- Alias nested DeviceProfiles.Importer module
- Replace expensive length/1 check with empty list comparison
- Extract nested logic into helper functions to reduce complexity:
  - import_sensor_with_states for sensor import
  - walk_sensor_oid and walk_processor_oid for SNMP walks
  - apply_processor_precision and determine_processor_status
  - check_device_health for device monitoring
- Add auto-dismiss functionality to flash messages (30 second timeout)
- Implement AutoDismissFlash LiveView hook in TypeScript
2026-01-18 10:43:23 -06:00
b1fedcda45
updates 2026-01-17 17:49:53 -06:00
f9a18fa423
Fix clipboard copy and org settings navigation
- Replace phx:copy event with CopyToClipboard LiveView hook for more
  reliable clipboard functionality
- Add visual feedback (checkmark) when text is copied to clipboard
- Apply hook to both agent token and docker compose copy buttons
- Add readonly attribute to docker compose textarea
- Fix org settings page to stay on settings after save instead of
  redirecting to dashboard

The clipboard copy now works correctly by using a dedicated LiveView
hook that directly handles the click event and clipboard API, rather
than relying on custom event dispatching which was causing issues.
2026-01-17 12:18:49 -06:00
bdde71462a
Fix memory/CPU chart fill: explicitly disable area fill for non-traffic charts
- Set fill: false for CPU, memory, and storage charts
- Prevents Chart.js from auto-filling when backgroundColor is set
- Only traffic charts should have filled area (fill: 'origin')
- Fixes visual bug where 20% memory usage appeared as 100% fill
2026-01-17 10:28:52 -06:00
3539e36f12
updates 2026-01-16 13:15:59 -06:00
ab6ecbdfdc
Convert JavaScript to TypeScript with proper type definitions
- Add comprehensive type definitions for vendor libraries (Chart.js, topbar)
- Add TypeScript types for LiveView hooks and WebAuthn interfaces
- Convert all JS files to TypeScript with proper typing:
  - app.js → app.ts
  - webauthn.js → webauthn.ts
  - webauthn_utils.js → webauthn_utils.ts
  - passkey_settings.js → passkey_settings.ts
  - passkey_login.js → passkey_login.ts
  - passkey_discoverable.js → passkey_discoverable.ts
- Update tsconfig.json with modern ES2022 and strict type checking
- Update esbuild config to use app.ts as entry point
- All assets compile successfully with esbuild's native TypeScript support
- No node_modules required, following Phoenix/Elixir conventions
2026-01-15 13:29:49 -06:00
2bacf6337c
Fix equipment charts to display full 24-hour time range
Set explicit min/max bounds on chart x-axis to ensure all graphs
consistently show 24 hours of data, even when data points are sparse.

Also fix AlertNotifierTest race condition by disabling async execution.
2026-01-15 13:12:29 -06:00
434ad14265
Fix clipboard copy functionality for Docker Compose example
Added phx:copy event listener to handle clipboard operations for both
input/textarea elements and other content. The Docker Compose example
copy button now properly copies the configuration to clipboard.

The handler supports:
- INPUT and TEXTAREA elements (using .value)
- Other elements like PRE/CODE (using .innerText or .textContent)
2026-01-14 09:30:09 -06:00
4f924ba9a7
add passkey 2026-01-09 12:26:32 -06:00
4242044cbd
Add parameter filtering to redact SNMP community strings from logs 2026-01-05 13:48:39 -06:00
af39c7e9fd
Add raw attribute logging to debug boolean values 2026-01-05 13:47:16 -06:00
ae5b73c495
Add console logging to debug traffic graph issues 2026-01-05 13:45:37 -06:00
13ca70da40
Add safety checks for traffic graph scale calculation 2026-01-05 13:44:02 -06:00
527e28736a
Make traffic graph scale symmetric to keep zero line in middle 2026-01-05 13:43:09 -06:00
abe4cb6845
Make traffic bar chart bars connected with no gaps 2026-01-05 13:40:44 -06:00
ce7988b10d
Show traffic as mirrored bar chart with outbound above and inbound below zero axis 2026-01-05 13:40:13 -06:00
b6abe23493
Format traffic values in Mbps/Gbps and fix column layout 2026-01-05 13:38:07 -06:00
a57dfd2e26
Move traffic graph below device info and add zero axis line 2026-01-05 13:36:54 -06:00