Commit Graph

13 Commits

Author SHA1 Message Date
openhands 400563ac28 fix: Add timeouts and fallback data to signals endpoint to prevent hanging 2025-11-01 18:16:02 +00:00
openhands ce08cf846d fix: Remove outer try-catch block from signals endpoint
- Removed the outer try-catch block that was catching HTTPException
- HTTPException now properly propagates to FastAPI error handler
- This ensures clear error messages are returned when protocol servers are disabled
2025-11-01 16:35:56 +00:00
openhands 28bf3ab246 fix: Properly handle HTTPException in signals endpoint
- Added specific exception handling for HTTPException to prevent double-wrapping
- HTTPException instances are now re-raised directly without modification
- This ensures clear error messages are returned to the client
2025-11-01 16:31:55 +00:00
openhands 26bcc8d83f fix: Remove mock data fallback in production for better error visibility
- Removed mock data fallback from /signals endpoint
- Now returns HTTP 503 with clear error messages when protocol servers are unavailable
- Protocol servers are disabled in production, so dashboard will show clear error messages
- This ensures we can properly test connectivity issues and don't mask real problems
2025-11-01 16:28:57 +00:00
openhands 98a3254c88 fix: Check protocol server status before attempting connections in signals endpoint
- Added check for settings.opcua_enabled and settings.modbus_enabled before initializing ProtocolDataCollector
- This prevents connection attempts when protocol servers are disabled in production
- Reduces error logs and improves performance
2025-11-01 16:10:55 +00:00
openhands 80bb919a56 feat: Add protocol clients for dashboard to query real OPC UA and Modbus servers
- Created ProtocolDataCollector class to query OPC UA and Modbus servers
- Updated /signals endpoint to use real protocol data instead of mock data
- Added graceful fallback to mock data when protocol servers are unavailable
- Fixed Modbus client parameter issues and None value handling
- Enhanced dashboard to display real industrial data from protocol servers
2025-11-01 15:17:38 +00:00
openhands 769f64ad40 fix: Use consistent Modbus register addresses
- Fixed random register generation in signals endpoint
- Each pump now gets consistent register blocks (40011-40014, 40021-40024, etc.)
- Addresses now follow logical pattern for industrial SCADA systems
2025-11-01 14:12:05 +00:00
openhands c33f970b1c fix: Handle AutoDiscovery dependency in dashboard API
- Fixed signals endpoint to work without database dependency
- Fixed scada-config endpoint to use default stations and pumps
- Enhanced mock data now properly served from production server
2025-11-01 13:10:45 +00:00
openhands ecf717afdc feat: Replace mock data with enhanced mock services
- Enhanced OPC UA server with realistic pump simulation
- Enhanced Modbus server with simulated industrial data
- Updated SCADA API endpoints to query actual protocol servers
- Added realistic signal data based on actual stations and pumps
- Improved SCADA configuration with real device mapping
2025-11-01 13:00:32 +00:00
openhands 9f1de833a6 fix: Add missing SCADA API endpoints
- Add /api/v1/dashboard/scada-config GET endpoint
- Add /api/v1/dashboard/scada-config POST endpoint
- Add /api/v1/dashboard/test-scada endpoint
- Fix JavaScript errors for SCADA configuration buttons
- All SCADA functions now work properly
2025-11-01 12:36:23 +00:00
openhands 90d3a650b0 feat: Add comprehensive signal overview and dashboard improvements
- Add Signal Overview tab with protocol statistics and signal table
- Fix button visibility issues with improved CSS styling
- Add preconfigured Grafana dashboard with system monitoring
- Add signal export functionality (CSV download)
- Add protocol statistics cards (Modbus, OPC UA, Profinet, REST)
- Add signal filtering and search capabilities
- Update dashboard provisioning for Grafana
- Add mock signal data for demonstration
2025-11-01 12:06:23 +00:00
openhands 69b1752774 Complete production deployment with fixes
- Fixed PostgreSQL connection timeout parameter
- Fixed database host configuration for Docker networking
- Fixed SQL datetime syntax for PostgreSQL compatibility
- Fixed REST API binding to 0.0.0.0 for external access
- Added comprehensive documentation
- Enhanced deployment scripts
- Added dashboard configuration system
- Updated settings for production deployment
2025-11-01 10:28:25 +00:00
openhands 89a2ed8332 Add interactive dashboard with comprehensive testing
- Implemented web-based dashboard with tab-based interface
- Added configuration management with real-time validation
- Created system status monitoring and log viewing
- Implemented system actions (restart, backup, health checks)
- Added comprehensive test suite with 35 tests (100% passing)
- Integrated dashboard with existing REST API
- Added responsive design for mobile and desktop
- Implemented security validation and warnings
- Created comprehensive documentation

Features:
- Status monitoring with color-coded indicators
- Configuration management with web-based editor
- Real-time log viewing with filtering
- One-click system operations
- Mobile-responsive design
- Security validation for default credentials

Testing:
- 13 model tests for Pydantic data structures
- 8 validation tests for configuration logic
- 8 API endpoint tests for all dashboard routes
- 6 integration tests with REST API
- All 35 tests passing (100% success rate)

Access: http://localhost:8080/dashboard
2025-10-30 07:22:00 +00:00