Commit graph

81 commits

Author SHA1 Message Date
d09d64f7bd
add more things to dashboard 2026-01-04 12:13:20 -06:00
779203049d
Recreate monitoring_checks migration with new timestamp
The previous migration was already marked as run but the table doesn't exist.
Using standard PostgreSQL table without TimescaleDB commercial features.
2026-01-04 11:57:54 -06:00
ef06170c0d
Make site cards fully clickable and remove View button 2026-01-04 11:53:32 -06:00
e3c3056aca
Add onboarding wizard to guide users through site creation
- Dashboard shows welcome wizard when no sites exist
- Equipment page redirects to site creation when no sites exist
- Equipment form redirects users to create a site if none exist
- Equipment list hides "New Equipment" button when no sites exist
- Update layouts to accept nil current_organization for org-less pages
2026-01-04 11:47:25 -06:00
6bc802b22a
Add global header to new organization page
All authenticated pages now have consistent navigation header.
Login/registration pages keep simple layout as they're for
unauthenticated users.
2026-01-04 11:41:26 -06:00
6fbdf9a9b8
Add global header to user settings page
Use Layouts.authenticated instead of Layouts.app for consistent
navigation across the application.
2026-01-04 11:38:07 -06:00
5fdb0e81fd
Add main menubar to /orgs page
- Change /orgs to use Layouts.authenticated instead of Layouts.app
- Update authenticated layout to show user menu without organization
- Menu button shows org name when in org, 'Menu' on org list page
- Always show Settings and Log out options
2026-01-04 11:34:21 -06:00
c87630f472
Make org boxes clickable and add global layout
- Wrap /orgs page in Layouts.app to include header/footer
- Make entire org box clickable by using .link component
- Remove 'Open' button - entire card is now the link
- Add cursor-pointer for better UX
2026-01-04 11:27:36 -06:00
9a721191fe
Set default email sender to hi@towerops.net
Configure mailer_from in runtime config and update UserNotifier
and AlertNotifier to use the configured from address.
2026-01-04 11:16:12 -06:00
72c260e122
Add /health endpoint for Kubernetes probes
Create HealthController that returns 200 OK for health checks.
Route is outside browser pipeline to avoid SSL redirect and
authentication requirements.
2026-01-04 10:56:03 -06:00
aed28de923
Fix SSL redirect excluding /health endpoint
Move exclude option inside force_ssl config so /health endpoint
is not redirected to HTTPS (needed for k8s readiness probe).
2026-01-03 16:52:28 -06:00
4216a5b7bf
Remove all TimescaleDB features from migrations
- Convert snmp_sensor_readings to standard table
- Convert snmp_interface_stats to standard table
- Disable snmp_sensor_aggregates (continuous aggregates)
- Disable snmp_interface_aggregates (continuous aggregates)

All TimescaleDB commercial features (hypertables, continuous aggregates,
retention/compression policies) are disabled. Using standard PostgreSQL
tables with proper indexing instead.
2026-01-03 16:39:50 -06:00
94ce596319
Disable monitoring aggregates migration
TimescaleDB continuous aggregates require commercial license.
Metrics are already computed in real-time in the application.
2026-01-03 16:38:40 -06:00
b99c4020a8
Remove all TimescaleDB features from monitoring_checks
Convert to standard PostgreSQL table. TimescaleDB Apache license
doesn't support hypertables or time-series features.
2026-01-03 16:33:07 -06:00
c1ed04f322
Remove TimescaleDB commercial features from migration
Commented out retention and compression policies which require
TimescaleDB commercial license. Apache-licensed version only supports
basic hypertable functionality.
2026-01-03 16:25:30 -06:00
5dda738816
add deps 2026-01-03 16:09:48 -06:00
25b82848d6
Run migrations on app start instead of separate job
- Migrations now run in Application.start/2 before starting services
- Ecto's advisory locks prevent concurrent migrations in clustered setup
- Simplified deployment - no separate migration job needed
- Removed migrate-job.yaml manifest
2026-01-03 16:09:31 -06:00
66ed55d78e
Add security context to meet PodSecurity restricted standard
- Set runAsNonRoot and runAsUser to 65534 (nobody)
- Disable privilege escalation
- Drop all Linux capabilities
- Use RuntimeDefault seccomp profile
- Applies to both migration job and main deployment
2026-01-03 16:02:27 -06:00
d7481dc0fd
Silence debconf warnings in Docker builds
Set DEBIAN_FRONTEND=noninteractive for all apt-get operations
to prevent interactive frontend warnings in build logs
2026-01-03 16:00:54 -06:00
547b7f1f14
Auto-cancel redundant builds on new commits
- Add workflow auto_cancel to cancel old pipelines
- Mark build job as interruptible
- Deploy jobs remain non-interruptible for safety
2026-01-03 15:57:03 -06:00
7a3bb1bde1
Add yaml_elixir dependency to fix snmpkit compile warning
Resolves YamlElixir.read_from_file/1 undefined warning during compilation
2026-01-03 15:56:42 -06:00
1ea4496e95
Add BuildKit cache mounts to speed up Docker builds
- Cache Hex packages across builds
- Cache Mix archives across builds
- Cache npm packages for asset tooling
- Speeds up dependency installation significantly
2026-01-03 15:55:24 -06:00
f050fb0eea
Enable LiveDashboard at /dashboard with authentication
LiveDashboard is now available at /dashboard in all environments
and requires user authentication to access
2026-01-03 15:53:18 -06:00
d80c10fa5d
Make deploy dependency on build explicit
Adds needs clause to ensure deploy waits for build to complete
2026-01-03 15:51:56 -06:00
2e3094634c
Exclude /health endpoint from SSL redirect
Prevents excessive 301 redirect logs from Kubernetes health probes
2026-01-03 15:50:31 -06:00
7339ac7eec
Add automatic database migrations on deployment
- Create Kubernetes Job to run migrations before deployment
- Update GitLab CI to execute migration job and wait for completion
- Ensures migrations run once per deployment in clustered environment
- Migration job uses PostgreSQL advisory locks to prevent race conditions
2026-01-03 15:50:01 -06:00
570c6d03b3
Dockerfile improvements 2026-01-03 15:38:14 -06:00
80cc5e937e
add sendgrid 2026-01-03 15:26:48 -06:00
d6a9bb11d7
Redesign equipment view with compact LibreNMS-style dashboard
- Add real-time updates with 10-second refresh and PubSub integration
- Implement pure SVG charts: response time sparkline and uptime gauge
- Create compact dashboard layout with status cards, metrics, and graphs
- Add relative time display (e.g., '5s ago') for last check
- Redesign SNMP data display: compact device info, sensors grid, interfaces table
- Calculate and display uptime percentage and average response time
- Update tests to match new compact layout
2026-01-03 15:11:47 -06:00
7772ff9a4a
fix a few bits 2026-01-03 14:58:06 -06:00
8cbca259fc
snmp bits 2026-01-03 14:41:28 -06:00
0f9266027f
fix dialyzer things 2026-01-03 12:56:40 -06:00
5ae974d7aa
Fix Dialyzer unmatched return warning in trigger_check handler
- Explicitly discard return value from trigger_check call
- The return value is not needed for this fire-and-forget operation
- Resolves unmatched_return warning at line 58
2026-01-03 12:43:05 -06:00
ba75c7313d
Fix Dialyzer unmatched return warning in log_out_user
- Explicitly discard return value from Endpoint.broadcast call
- Broadcast is fire-and-forget, return value not needed
- Resolves unmatched_return warning at line 54
2026-01-03 12:42:21 -06:00
7cdb93ef31
Fix Dialyzer opaque type warning in register_user_with_organization
- Create changeset before Multi pipeline for better type inference
- Pass changeset directly to Multi.insert instead of using function form
- Resolves call_without_opaque warning at line 97
2026-01-03 12:41:28 -06:00
d345d7df30
Fix Dialyzer pattern match coverage warning
- Replace catch-all pattern with explicit :unknown status handling
- Makes status transitions more explicit and type-safe
- Resolves pattern_match_cov warning at line 174
2026-01-03 12:40:32 -06:00
287fd8064a
Add Dialyzer for static type analysis
- Added dialyxir dependency for static analysis
- Configured PLT file location and analysis flags
- Added priv/plts/ to .gitignore
- Enabled unmatched_returns, error_handling, and unknown type checks
2026-01-03 12:39:02 -06:00
e066c3bf64
add test watch 2026-01-03 12:35:26 -06:00
2967cfadce
Add mix test.watch configuration
- Run only stale tests (affected by changes)
- Clear screen before running tests for better visibility
2026-01-03 12:35:00 -06:00
6986a14e13
Add mix_test_watch for automatic test running
- Added mix_test_watch dependency for dev/test environments
- Enables 'mix test.watch' command to run tests on file changes
2026-01-03 12:34:19 -06:00
5d9ebb14f9
Change organization slugs to random IDs independent of name
- Organization names can now be freely duplicated
- Slugs are generated as random 8-character lowercase alphanumeric IDs
- Provides ~218 trillion possible combinations
- Updated tests to not rely on name-based slug patterns
2026-01-03 12:33:11 -06:00
fec4fa65fe
Fix test redirect expectations and datetime handling
- Update LiveView tests to match actual redirect behavior
- Fix equipment and site form redirect test expectations
- Update organization tests to reflect slug-based uniqueness
- All datetime truncation fixes for Ecto :utc_datetime fields
2026-01-03 12:31:04 -06:00
7d4f7dd7d4
Add active page navigation highlighting
- Add active_page attribute to authenticated layout
- Update nav_link component to show active state with border and text styling
- Update all LiveView templates to pass active_page parameter
- Fix datetime truncation issues in tests and schemas for :utc_datetime fields
- Fix dashboard test assertions for equipment status text
2026-01-03 12:28:26 -06:00
d283f4ac6c
Fix dropdown menu position to appear below button 2026-01-03 12:18:56 -06:00
424b82ca4c
Add z-index to dropdown menu to appear above page content 2026-01-03 12:18:03 -06:00
7e6c190904
Fix vertical alignment of organization dropdown menu 2026-01-03 12:17:06 -06:00
28ac30a48f
Add dropdown menu for organization name with Switch Org, Settings, and Log out options 2026-01-03 12:16:29 -06:00
b0a17e7ea6
Add comprehensive test coverage for LiveView modules and contexts
- Add LiveView tests for DashboardLive, AlertLive, SiteLive, EquipmentLive, OrgLive
- Add comprehensive tests for Organizations context (memberships, invitations, auth)
- Add tests for AlertNotifier email delivery
- Improve test coverage from 54.78% to 86.65%
- Add 101 new tests (256 total tests)
2026-01-03 11:21:53 -06:00
c27aa4f5f8
Change default organization name to "Personal" 2026-01-03 11:10:34 -06:00
aff602e7dd
Fix active alerts filter to exclude recovery notifications
Only equipment_down alerts should be counted as "active alerts that need attention".
Equipment_up alerts are informational recovery notifications and don't require action.
2026-01-03 11:09:13 -06:00