Critical fixes:
1. Monitor type detection on edit
- When editing a Docker monitor, type is now correctly detected from monitor object
- Previously defaulted to "hardware" causing incorrect form fields to show
- Fix: Detect type from query params on create, from monitor.type on edit
2. Default interval for Docker monitors
- Docker monitors now default to 30 seconds (0.5 minutes) on creation
- Hardware monitors remain at 15 seconds (0.25 minutes)
- Pass monitorType to initializeInfrastructureMonitorForCreate
3. Type-aware fallback links
- Hardware tab empty state: links to /infrastructure/create?type=hardware
- Docker tab empty state: links to /infrastructure/create?type=docker
- Ensures correct form is shown when creating from empty state
UX improvements:
4. Enhanced error messaging in Docker container table
- Differentiate between "No containers" vs "Docker daemon unavailable"
- Show error details when Capture API fails
- Display critical errors (docker.client) with red background
- Show partial error messages when some containers fail to inspect
5. Display Capture metadata
- Show Capture version in container table header
- Display error count when errors are present (⚠ N error(s) encountered)
- Help users identify API issues vs legitimate empty states
6. Improved empty state handling
- "Docker daemon unavailable" - when Docker socket unreachable on Capture server
- "No containers found" - when Capture is working but no containers exist
- "Partial data available" - when some containers failed to inspect
- Show specific error messages from Capture API
These changes improve the user experience when:
- Editing existing Docker monitors (correct form fields shown)
- Creating Docker monitors (proper default interval)
- Troubleshooting Capture API issues (clear error messages)
- Understanding container availability (version info, error details)
Backend changes:
- Update Check model to store Docker container data (container_id, status, health, ports, etc.)
- Refactor networkService to support both local Docker and remote Capture API
- requestLocalDocker: Existing local Docker socket monitoring
- requestCaptureDocker: New Capture API endpoint integration
- requestDocker: Routes based on URL pattern (http/https vs container name)
- Update statusService to handle Docker check data storage
- Enforce proper error handling for Capture API (401, 404, 500, 207 responses)
Frontend changes:
- Add Hardware/Docker tabs to Infrastructure page
- Add query parameter support for monitor type selection
- Prepare form for Docker monitor creation (partial)
Status: Backend complete, frontend in progress
Next: Complete Docker monitor form, add container table component, test end-to-end