- Add polkit rule for sudoless service management
- Improve update manager with multi-strategy restart approach
- Fix npm dependency conflicts in update process
- Add comprehensive test suite for update system
- Enhance frontend update progress tracking
- Update install script with automatic polkit setup
- Skip npm install since release tarballs already include node_modules
- Better validation of update package structure
- Improved error handling and logging
- Use Node.js fs operations instead of shell commands for better cross-platform support
This should eliminate npm errors during auto-update process.
- Changed Promise.all to Promise.allSettled to prevent one offline endpoint from blocking all others
- Added intelligent node deduplication that prefers online nodes with fresh data
- Implemented 5-second timeout for discovery calls to fail fast
- Added 1-minute cache to preserve node state during brief outages
- Fixed transition states to avoid "red dot with online status" issue
This addresses issue #104 where:
- Dashboard would freeze when primary node went offline
- Nodes were duplicated when multiple endpoints pointed to same cluster
- Dashboard stopped updating during node reboots
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add webhook configuration to structured config response in configApi
- Update settings UI to properly display webhook enabled state
- Fix Discord webhook 400 errors by sending platform-specific payloads
- Detect webhook type (Discord/Slack) and send appropriate format
- Preserve webhook settings when saving configuration
- Update both test webhook and alert webhook sending logic
Fixes#119🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes two webhook-related problems reported in issue #119:
- Webhook checkbox not persisting after save due to config not being included in API response
- 400 errors during webhook testing due to incorrect form data binding
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add robust timestamp validation with getValidTimestamp() method
- Handle invalid timestamp values gracefully with fallback to current time
- Prevent RangeError when Date constructor receives invalid values
- Add comprehensive AlertManager test suite with 12 test cases
- Test webhook payload structure, timestamp handling, and error scenarios
- Verify Discord/Slack compatibility and email notification fixes
- Increase AlertManager test coverage from 0% to 40.11%
Fixes#114 completely with bulletproof timestamp handling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix RangeError in AlertManager by using correct timestamp fields (triggeredAt/lastUpdate) instead of non-existent alert.timestamp
- Replace Promise.resolve() with requestAnimationFrame() for better scroll position restoration timing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced backup health status calculations with more accurate age-based
categorization and improved UI filtering. Added comprehensive backup data
validation test suite and ground truth testing framework.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Test Coverage Achievements
- **apiClients.js**: 100% statement coverage ✅
- **configLoader.js**: 100% statement coverage ✅
- **pbsUtils.js**: 100% statement coverage ✅
- **Overall coverage**: 77.97% (up from 77.83%)
- **All tests passing**: 116/116 ✅
## Key Improvements
### Jest Configuration
- Fix Jest configuration to use V8 coverage provider instead of Babel
- Resolve Babel/Istanbul errors that were preventing tests from running
- Add `testEnvironment: "node"` and `coverageProvider: "v8"` settings
### Test Coverage Enhancements
- **pbsUtils.js**: Export and test `categorizeAndCountTasks` function for complete coverage
- **configLoader.js**: Add test for config directory loading path
- **dataFetcher.js**: Add defensive null checking for API clients and comprehensive test fixes
- **All test files**: Update test expectations to match current application behavior
### Test Reliability
- Fix config tests to match new setup mode behavior instead of error throwing
- Update dataFetcher tests for correct API call sequences and error messages
- Add proper mock data for backup functionality testing
- Resolve test flakiness with proper async handling
### Code Quality
- Add null safety check in dataFetcher for missing API client endpoints
- Export previously internal function for better testability
- Maintain backward compatibility while improving robustness
## Files Changed
- `package.json`: Update Jest configuration
- `server/pbsUtils.js`: Export categorizeAndCountTasks function
- `server/dataFetcher.js`: Add null client validation
- `server/tests/*.test.js`: Comprehensive test updates and additions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix PVE backup task classification logic that incorrectly defaulted to PBS when log parsing failed
- Implement proper separation between PVE backups (actual backup files) and snapshots (point-in-time states)
- Add cross-node backup matching within clusters while maintaining cross-cluster isolation
- Resolve duplicate guest display issue caused by identical guest IDs across different Proxmox clusters
- Remove reliance on unparseable job-level backup tasks in favor of actual backup file detection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add refreshRules() method to AlertManager for dynamic rule updates
- Add cleanupAlertsForRule() to remove active alerts when rules are disabled
- Modify configuration reload to trigger alert rule refresh
- Add getAlertManager() method to state module for consistent access
- Existing alerts are now properly cleaned up when global alert types are disabled
- Changes take effect immediately without requiring server restart
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive webhook support for Discord, Slack, Teams
- Rich embeds with color-coded severity and inline fields
- Webhook configuration UI with test functionality
- Dual payload format (Discord embeds + Slack attachments)
- Error handling with timeout and proper HTTP responses
- Test webhook endpoint with sample alert data
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add nodemailer dependency for SMTP email sending
- Implement email notification channel in AlertManager
- Add rich HTML email templates with alert details
- Create email configuration UI in settings page
- Add test email functionality with validation
- Support for multiple recipients and Gmail app passwords
- Addresses feature request in issue #111🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Client now uses 'auto-detect' placeholder when node can't be determined
- Server handles node auto-detection by looking up VM/LXC in current state
- Fixes 'Please select a VM/LXC from the dropdown first' error in v3.17.3
- Addresses issue #110
- Add sanitization for name fields in Proxmox and PBS configurations
- Sanitize PBS node_name values to prevent leaking actual node names
- Improve URL sanitization to handle URLs without protocols
- Use clearer redaction patterns (REDACTED-IP, REDACTED-HOST)
- Add more aggressive fallback sanitization for malformed URLs
This prevents exposure of sensitive infrastructure details when diagnostic
reports are shared for debugging purposes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix download URL property mismatch (downloadUrl vs browser_download_url)
- Add comprehensive error logging for update failures
- Create test mode for update mechanism (UPDATE_TEST_MODE=true)
- Add test script for easy update testing without releases
- Improve restart logic for different deployment environments
- Add tar package dependency for creating update packages
- Update .gitignore to exclude backup and temp directories
- Add documentation for update testing workflow
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change config loader to set name to null instead of host address when no custom name is provided
- This ensures discovered node names are used by default
- Custom names are only applied when PROXMOX_NODE_NAME is explicitly set
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add support for custom display names via PROXMOX_NODE_NAME configuration
- Handle multi-node clusters properly by prefixing node names with endpoint name
- Fix dashboard and nodes views to show configured display names
- Fix non-sequential endpoint numbering issue in settings (node_2, node_8, node_14)
- Improve endpoint configuration loading to handle any index number
Fixes#100🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Strip http:// or https:// from PBS_HOST values in settings form
- Update placeholders to show IP/hostname format without protocol
- Fix discovery cycle to trigger for PBS-only configurations
- Resolves issue where PBS data wouldn't load due to malformed host URL
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Previously, the config loader required sequential numbering (2, 3, 4...) for additional Proxmox/PBS endpoints. If a user had PROXMOX_HOST_2 and PROXMOX_HOST_4 (skipping 3), only endpoint 2 would be loaded.
This fix scans all environment variables to find any PROXMOX_HOST_N or PBS_HOST_N patterns, regardless of numbering sequence. Now users can have endpoints numbered 2, 5, 10, etc. and all will be properly loaded.
Fixes#96🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add validation to prevent API calls with missing nodeId/vmid parameters
- Implement proper guest selector initialization for edit modal
- Add server-side error handlers to return JSON instead of HTML for API routes
- Include debug logging for threshold configuration troubleshooting
- Ensure dropdown selection properly populates all required hidden fields
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
• Merge separate "Alerts" and "Custom Thresholds" tabs into single "Alert Configuration" tab
• Improve UX by organizing all alert settings in one logical location
• Add comprehensive custom per-VM/LXC threshold management system with migration support
• Include blue "T" badges for VMs with custom thresholds in dashboard
• Implement full CRUD operations for threshold configurations via REST API
• Support migration-aware threshold keys (endpointId:vmid) for cluster environments
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Previously, configuration created via the web UI was lost when containers were
recreated or updated, requiring users to reconfigure each time. This was due to
the .env file being stored inside the container filesystem.
Changes:
- Add persistent volume mount for configuration directory in docker-compose.yml
- Update ConfigApi to auto-detect Docker vs development environment
- Configure dotenv loading to use persistent config path when available
- Update file watcher to monitor correct .env file location
- Remove conflicting host .env file mount
- Update README with new volume configuration instructions
Configuration now persists across container updates, eliminating the need for
users to reconfigure after updates.
Fixes#94🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Previously, adding additional PVE credentials would remove all existing PBS
credentials from the .env file, and vice versa. This was caused by the credential
removal logic not checking if the new configuration actually contained endpoints
of the same type before removing existing ones.
The fix ensures that:
- PBS credentials are preserved when adding additional PVE endpoints
- PVE credentials are preserved when adding additional PBS endpoints
- Existing endpoints are only removed when explicitly managing that endpoint type
Fixes#91🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements comprehensive solution for GitHub issue #80 where PVE backups stored on local node storage weren't appearing in the backup tab. Adds intelligent node discovery system that creates direct connections to access node-local storage while maintaining backward compatibility with shared storage setups.
Key improvements:
- Hybrid discovery approach with automatic node IP detection and connection caching
- Fixed data structure mismatches and key collision issues for duplicate VMIDs across nodes
- Corrected PVE backup filtering logic in summary cards and calendar views
- Enhanced API token permission documentation for storage content access
- Optimized connection handling with reduced timeouts for faster discovery cycles
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created UpdateManager class for handling application updates
- Added update check, download, and apply functionality
- Integrated update UI into settings modal with progress tracking
- Added version display and update notifications
- Implemented proper backup and rollback mechanism
- Added Docker-aware restart logic
- Enhanced configuration API to include version information
- Added real-time progress updates via WebSocket
- Modified getConfig() to include all additional endpoints from .env file
- Enhanced configuration save to properly clean up removed endpoints
- Improved .env file organization with grouped additional endpoints
- Updated connection testing to validate all configured endpoints
- Remove redirect to setup.html in favor of always serving main application
- Add automatic detection of placeholder configuration values on page load
- Automatically open settings modal when configuration needs setup
- Provide seamless unified interface for both initial setup and ongoing management
- Eliminate need for separate setup.html page while maintaining full functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Clean up all debug console.log statements from settings system
- Maintain error logging for troubleshooting production issues
- Keep essential reload functionality for additional endpoints
- Finalize comprehensive settings system implementation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add detailed logging for endpoint loading and API client initialization
- Clear environment variables more aggressively during reload
- Add manual verification of additional endpoints in environment
- Help diagnose why additional nodes might require server restart
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Allow testing with existing saved token secrets when not provided in form
- Improve error messages to indicate what fields are missing
- Fall back to existing .env file for token secrets during testing
- Handle both new secrets and existing configuration testing scenarios
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update testConfig function to handle both structured and raw .env formats
- Add proper format detection for configuration testing
- Include validation for required fields before attempting connection
- Add comprehensive logging for debugging test failures
- Ensure test works with new settings form data structure
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace settings tab with settings icon in top-right header
- Implement comprehensive modal interface for ALL .env variables
- Add support for multiple PVE and PBS endpoints with dynamic forms
- Include all service settings (intervals) and alert configuration
- Support both old structured format (setup) and new raw .env format
- Add connection testing and form validation
- Enable complete web-based configuration without SSH access
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add Settings tab to main interface with configuration form
- Create settings.js module for handling configuration updates
- Allow editing Proxmox credentials without SSH access
- Support partial updates (keep existing token secret if not provided)
- Integrate settings module into tab system and initialization
- Update server configApi to handle partial configuration updates
Users can now edit their configuration through the web interface after initial setup.
- Add system info to health endpoint including configPlaceholder status
- Update setup page to check correct health properties
- Include hasData and clientsInitialized flags for better readiness detection
This ensures the 'Continue to Pulse' button appears when the server is actually ready with data, not just when it times out.
- Make runDiscoveryCycle globally accessible for config reload
- Use global API clients in discovery and metrics cycles
- Trigger discovery cycle after configuration reload
- Fix issue where metrics cycle couldn't find reloaded API clients
This ensures the server properly initializes and starts collecting data after saving configuration through the web interface.
- Add health endpoint polling after configuration save
- Show progress messages and loading spinner during initialization
- Display 'Continue to Pulse' button when server is ready
- Add explicit /setup.html route handler
- Improve error handling and logging in configApi
- Prevent form submission on button clicks
- Add percentage progress indicator during setup
This provides better user feedback during the configuration process and ensures users don't navigate to the dashboard before the server is ready.
- Restore advanced settings handling in getConfig and saveConfig
- Include self-signed certificate settings
- Add PBS node name support
- Fix alert configuration saving
- Restore global lastReloadTime update to prevent double reloads
- This fixes the .env file creation and configuration saving
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Use current state for configuration status check in root route
- Prevent double reload when saving config through API
- Track reload times globally to avoid file watcher conflicts
- This fixes the issue where setup page doesn't redirect after save
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add advanced settings section with all .env.example options
- Include metric/discovery intervals configuration
- Add alert system configuration (enabled/thresholds)
- Add PBS node name field (required for non-Sys.Audit tokens)
- Update config API to handle all settings
- Group settings logically in generated .env file
- Load and save all configuration options properly
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>