- Cyberpunk-themed Unraid dashboard - Disk usage monitoring with ring charts - System metrics (CPU, Memory, Parity) - Docker container status display - Optimized for Raspberry Pi 3 - GraphQL API integration 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
7.7 KiB
Unraid Dashboard Project Summary
Project Overview
This project is a custom web-based dashboard for monitoring an Unraid server. The dashboard is designed to run on a Raspberry Pi 3 and displays real-time system information with a cyberpunk aesthetic.
Design Requirements
Visual Theme
- Color Scheme: Black background with teal (#00ffff) primary color
- Alert Colors: Red highlights for critical states (CPU/Memory >90%, errors)
- Typography: Monospace font (Courier New)
- Style: Cyberpunk aesthetic with glowing borders and text shadows
Displayed Information
-
System Resources
- CPU usage (overall percentage)
- Memory usage (percentage)
-
Parity Status
- Current status (VALID/ERROR)
- Last check date
- Error count
-
Disk Array
- Individual progress bars for each disk
- Capacity usage percentage
- Temperature monitoring
- Disk size information
-
Docker Containers
- Container names
- Status (running/stopped/paused)
- Color-coded status indicators
Technical Constraints
- Lightweight implementation for Raspberry Pi 3
- Vanilla HTML/CSS/JavaScript (no heavy frameworks)
- Periodic updates (5-second intervals)
Implementation Details
File Structure
unraid-dash/
├── index.html # Main HTML structure
├── styles.css # Cyberpunk-themed styling
├── script.js # API integration and data handling
└── PROJECT_SUMMARY.md # This file
Technology Stack
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- API: Unraid GraphQL API
- Authentication: API Key header (
x-api-key)
Server Configuration
- Server Address: http://192.168.2.61:81
- GraphQL Endpoint: http://192.168.2.61:81/graphql
- API Key: 32a4fe6bfa86764565fa50600af75d70639936f8e2a9cc04b86bf716331df54f
Development Progress
Completed Tasks
- ✅ Created HTML structure with all dashboard sections
- ✅ Implemented cyberpunk CSS styling with responsive design
- ✅ Developed mock data system for initial testing
- ✅ Integrated Unraid GraphQL API authentication
- ✅ Implemented GraphQL query functions for:
- System information (CPU, Memory)
- Array and disk information
- Docker container status
- ✅ Added error handling and logging
- ✅ Corrected GraphQL schema field names based on API responses
Current Issues
API Request Failures (400 Bad Request)
Status: UNRESOLVED
Description: The dashboard successfully connects to the Unraid GraphQL endpoint but receives 400 Bad Request errors when executing queries.
Error Details:
Error response body: "{"errors":[{"message":"Cannot query field \"used\" on type \"ArrayDisk\"..."}]}"
Attempted Solutions:
- Corrected query structure to use
array.capacity.disks[]for usage data - Simplified query formatting (removed excess whitespace)
- Verified API key authentication (CORS headers confirm connection works)
- Added extensive debugging logs
Current Query Structure:
# System Info Query
query { info { cpu { manufacturer brand cores threads } memory { total free used } } }
# Array Info Query
query { array { state capacity { disks { free used total } } disks { name size status temp } } }
# Docker Query
query { dockerContainers { id names state status autoStart } }
Observations:
- Server responds with proper CORS headers
- Authentication appears to be working (no 401/403 errors)
- Network connectivity is confirmed
- GraphQL validation errors suggest field names may still be incorrect
Next Steps
Immediate Actions Required
-
Verify GraphQL Schema: Access the Unraid GraphQL sandbox at
http://192.168.2.61:81/graphqlto inspect the actual schema- Enable via: Settings → Management Access → Developer Options
- Or use CLI:
unraid-api developer --sandbox true
-
Test Queries Directly: Use the GraphQL sandbox or Apollo Studio to test queries before implementing
-
Investigate Alternative Approaches:
- Consider using community REST APIs (unREST, Unraid Simple Monitoring API)
- Explore the Unraid MCP server documentation
- Check if API version or Unraid version affects available fields
Potential Schema Issues to Investigate
- Exact field names for disk capacity data
- Whether
memoryobject exists oninfotype - Correct structure for CPU utilization (may need separate query or different field)
- Parity status field location (not yet identified in schema)
Alternative Data Sources
If GraphQL continues to fail, consider:
- unREST API: REST endpoint at
/api/docker/containers - Direct file parsing: Read Unraid state files (may require server-side script)
- System commands: Execute commands via SSH and parse output
Code Structure
JavaScript Functions
API Layer:
executeGraphQLQuery(query)- Executes GraphQL queries with authenticationfetchSystemInfo()- Retrieves CPU and memory datafetchArrayInfo()- Retrieves disk array and capacity datafetchDockerContainers()- Retrieves Docker container statuses
UI Update Functions:
updateTimestamp()- Updates current time displayupdateCPU(percentage)- Updates CPU progress barupdateMemory(percentage)- Updates memory progress barupdateParity(parityData)- Updates parity status displayupdateDisks(disks)- Renders disk array with progress barsupdateDocker(containers)- Renders Docker container grid
Utilities:
formatBytes(bytes)- Converts bytes to human-readable formatshowError(message)- Displays error messages in UIupdateDashboard()- Main orchestration function
CSS Classes
Progress Bars:
.progress-bar- Container for progress indicators.progress-fill- Animated fill element.progress-fill.warning- Orange color (70-89%).progress-fill.critical- Red color (90%+)
Status Indicators:
.docker-status.running- Teal background.docker-status.stopped- Red background.docker-status.paused- Orange background.status-value.error- Red text with glow effect
Resources and Documentation
Official Documentation
Community Resources
Notes
Design Decisions
- Chose vanilla JavaScript over frameworks to minimize resource usage on Raspberry Pi 3
- Used GraphQL for official API support (though encountering issues)
- Implemented parallel API calls for performance
- Added color-coded warnings for proactive monitoring
Known Limitations
- CPU usage percentage not available directly from GraphQL API (placeholder implementation)
- Parity check details require additional investigation
- Temperature data availability depends on disk hardware support
- Real-time updates limited to 5-second intervals to avoid API throttling
Browser Compatibility
- Requires modern browser with Fetch API support
- Tested in Safari 26.1 on macOS
- Should work on Raspberry Pi OS default browser (Chromium)
Conclusion
The dashboard user interface and basic API integration structure are complete. However, the project is currently blocked by GraphQL schema compatibility issues. The next critical step is to access the GraphQL sandbox or schema documentation to identify the correct field names and query structure for the Unraid API version in use.
Last Updated: 2025-11-22 Status: In Development - API Integration Blocked Priority: Resolve GraphQL schema field names