Commit graph

4 commits

Author SHA1 Message Date
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
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
dffa46dfde
Improve UI styling and remove DaisyUI dependencies
- Remove default Phoenix branding and create custom layouts
- Replace DaisyUI classes with custom Tailwind components throughout
- Add authenticated layout with navigation bar for organization pages
- Redesign all core components (buttons, forms, tables, alerts)
- Make dashboard stat cards clickable to navigate to respective pages
- Update alert acknowledge button to only show for equipment down alerts
- Add consistent dark mode support across all pages
- Implement modern design with zinc color palette and improved spacing
2026-01-03 11:02:38 -06:00
1bd72dac78
1. Sites Management
- Sites schema with hierarchical parent-child relationships
  - CRUD operations for sites
  - Sites context with helper functions
  - LiveView pages:
    - /orgs/:slug/sites - List all sites
    - /orgs/:slug/sites/new - Create new site
    - /orgs/:slug/sites/:id - View site details
    - /orgs/:slug/sites/:id/edit - Edit site
  - Support for site locations and descriptions
  - Site tree builder for hierarchy visualization

  2. Equipment Management
  - Equipment schema with monitoring fields
  - IP address validation (IPv4 & IPv6)
  - Equipment status tracking (up/down/unknown)
  - Customizable check intervals per equipment
  - Equipment context with CRUD operations
  - LiveView pages:
    - /orgs/:slug/equipment - List all equipment
    - /orgs/:slug/equipment/new - Add equipment
    - /orgs/:slug/equipment/:id - View equipment details
    - /orgs/:slug/equipment/:id/edit - Edit equipment
  - Equipment can be added from site pages
  - Status badges and last checked timestamps

  3. Database Schema
  - sites table with self-referencing parent_site_id
  - equipment table with status tracking
  - All migrations run successfully
  - Proper indexes on foreign keys and status

  4. Features Implemented
  -  IP address validation using :inet.parse_address
  -  Site hierarchy with parent-child relationships
  -  Equipment linked to sites
  -  Monitoring enabled/disabled per equipment
  -  Customizable check intervals (30s - 3600s)
  -  Status tracking (up/down/unknown)
  -  Timestamps for last check and last status change
  -  Organization-scoped data (users only see their org's data)
2025-12-21 13:39:19 -06:00