Commit 930b35a
feat: Redesign /scans page with host-centric accordion view
## Major UI/UX Redesign
- Transform scan-centric flat table to host-centric collapsible accordion view
- Group all scans by host with expandable/collapsible sections
- Display hosts sorted by most recent scan date (last 30 days)
- Show success ratio (5/10 format) for completed vs total scans per host
## Enhanced Host Status Integration
- Integrate existing StatusChip component with comprehensive status types
- Support online/offline/reachable/ping_only/scanning/error/maintenance/pending
- Extract host status and IP address from backend scan data
- Display real-time host status with proper icons and color coding
## Robust Data Validation & Transformation
- Add comprehensive scan-host association validation
- Transform backend nested host data to frontend expected format
- Filter out scans without proper host associations with detailed logging
- Implement host ID collision detection and data integrity checks
- Handle missing host data gracefully with fallback naming
## Host-Level Actions
- One-click rescan using most recent scan configuration
- Navigate to detailed host information pages
- Export host scan reports (all/completed/failed) as CSV
- Actions menu with export options for each host
## Individual Scan Actions
- View detailed scan results (/scans/{uuid})
- Download scan reports (completed scans only)
- Replace "Progress" column with "Actions" column
- Move progress indicators inline with status chips
## Data Architecture Improvements
- Add BackendScan interface for proper API response typing
- Create hostStatusMap for efficient status data management
- Implement 30-day scan filtering with date-based sorting
- Add comprehensive error handling and user feedback
## Technical Enhancements
- Fix StatusChip import (default vs named export)
- Ensure all scans have required host_id foreign key association
- Maintain backward compatibility with existing API endpoints
- Preserve periodic refresh functionality for running scans
## User Experience
- Clean accordion interface with host metrics in headers
- Collapsible scan details maintain full scan information
- Success ratio prominently displayed for quick compliance overview
- Consistent status visualization across host and scan levels
- Improved navigation flow to detailed scan and host pages
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 1b2c07a commit 930b35a
1 file changed
Lines changed: 562 additions & 91 deletions
0 commit comments