Commit graph

47 commits

Author SHA1 Message Date
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
c198fdeaa1
add snmp port 2026-02-03 12:51:50 -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
fbad8c64b2
dark mode 2026-01-20 16:56:49 -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
ddabb3f030
Add detailed graph view with date range selection
- Create GraphLive.Show for detailed sensor graph visualization
- Add route for /equipment/:id/graph/:sensor_type endpoint
- Make all chart headers clickable with navigation to detail view
- Implement date range selector (1h, 6h, 12h, 24h, 7d, 30d)
- Fix chart rendering by destroying and recreating on data updates
- Fix duplicate data loading in LiveView event handlers
- Fix MikroTik profile typing warning for entity sensor discovery
2026-01-05 11:09:21 -06:00
05f1aec227
Add sensor charts and improve equipment detail page
- Add Chart.js integration for interactive sensor graphs
- Add processor, memory, storage, temperature, and voltage charts showing 24 hours of data
- Fix device information box to use natural height instead of stretching
- Update MikroTik profile to discover ENTITY-SENSOR-MIB sensors
- Support multiple sensor types per chart (celsius/temperature, volts/voltage)
- Use 24-hour time format in chart tooltips and x-axis labels
- Support auto-scaling y-axis for non-percentage metrics
2026-01-05 11:01:21 -06:00
ba463dc5a2
init 2025-12-21 11:10:43 -06:00