Commit Graph

1061 Commits

Author SHA1 Message Date
courtmanr@gmail.com fc1929c205 feat: implement user-controlled update channels (stable/RC)
Add comprehensive update channel system allowing users to choose between:
- Stable: Production releases only (default, safe)
- RC: Release candidate versions for testing fixes and new features

Key Features:
- Safe defaults: All users start on stable channel unless explicitly changed
- Clear UI warnings: RC selection shows warning about potential bugs
- Robust validation: Invalid values auto-correct to stable with warnings
- Security: URL validation prevents malicious downloads
- Bulletproof error handling: Handles all edge cases gracefully

Technical Implementation:
- UPDATE_CHANNEL environment variable (stable/rc)
- Enhanced UpdateManager with channel-specific GitHub API calls
- Frontend UI with clear channel selection and warnings
- Configuration persistence and validation
- Comprehensive edge case handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 10:49:22 +01:00
courtmanr@gmail.com fa0aa6dfdc fix: complete migration from old service names to resolve update failures
Updates installer to use pulse.service and enhances migration logic to handle both pulse-proxmox.service and pulse-monitor.service. This resolves the "No Pulse Installation Found\!" error experienced by existing users during updates.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-03 21:37:31 +01:00
courtmanr@gmail.com ca8a25e815 chore: release v3.21.0-rc.1 2025-06-03 21:11:47 +01:00
courtmanr@gmail.com 8217f48f75 fix: improve auto-update process to use release tarballs correctly
- 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.
2025-06-03 21:11:20 +01:00
courtmanr@gmail.com 82d8fc1c2f fix: resolve dashboard freezing and node duplication in multi-node setups
- 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>
2025-06-03 21:03:33 +01:00
courtmanr@gmail.com d455e93b59 feat: improve calendar date handling for different timezones
- Changed calendar to use local dates instead of UTC throughout
- Added formatLocalDateKey() helper for consistent date formatting
- Updated date comparisons and grid generation to use local timezone
- Fixed day number display to use getDate() instead of getUTCDate()

This should address timezone-related issues where backups appeared on incorrect days.

Related to #120 - Please check the next RC release to see if this resolves the calendar date issues.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-03 20:43:00 +01:00
courtmanr@gmail.com a419763f9c fix: webhook configuration persistence and Discord 400 errors
- 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>
2025-06-03 19:31:07 +01:00
courtmanr@gmail.com 79d5b8b977 fix: update webhook integration test to use existing API endpoint
- Replace non-existent /api/guests endpoint with /api/test-webhook
- Simplify test flow by using Pulse's built-in webhook testing
- All webhook tests now pass successfully

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-03 19:16:05 +01:00
courtmanr@gmail.com a5374c891b feat: simplify pre-release workflow to use only release candidates (RC)
- Update create-release.sh to show only RC example
- Remove alpha/beta complexity, keeping just RC for testing
- Simplify version progression: stable -> RC -> stable
- Auto-update continues to ignore pre-releases for safety
2025-06-03 15:56:02 +01:00
courtmanr@gmail.com ac089c8487 fix: resolve webhook configuration loading and checkbox persistence issues
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>
2025-06-03 15:18:02 +01:00
courtmanr@gmail.com 51ee20711c docs: update README with missing features documentation
- Add comprehensive webhook notifications documentation (Discord, Slack, Teams)
- Add email notifications documentation with SMTP configuration
- Expand alert system documentation with acknowledgment and escalation features
- Document virtual scrolling and performance optimizations
- Add notification troubleshooting section
- Reorganize features section into clear categories
- Update table of contents with new sections

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 23:27:47 +01:00
courtmanr@gmail.com 3b8c31f2e3 docs: restore screenshot images for README
- Restores docs/images/ directory with all 8 screenshot images
- Images are referenced in README.md for documentation
- Only restoring images (not large PDF files)
- Keeps tarball size reasonable while fixing broken image links
2025-06-02 23:23:27 +01:00
courtmanr@gmail.com d6f71ff572 chore: remove docs directory with large PDF files
- Removes 22MB of Proxmox documentation PDFs
- Reduces release tarball size from 25MB to ~11MB
- Documentation can be accessed directly from Proxmox sources
2025-06-02 22:00:37 +01:00
courtmanr@gmail.com 6bccd19dc3 chore: release v3.20.0 2025-06-02 18:50:19 +01:00
courtmanr@gmail.com 3c77b5890e feat: redesign backup health card with clearer statistics and improved layout
- Make health score more prominent with larger font and context
- Replace confusing guest counts with clear total backup count
- Add recent coverage metric showing guests with backups in last 7 days
- Reorganize backup type statistics with clear labeling
- Add coverage ratio showing protected vs unprotected guests
- Improve visual hierarchy and information density

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 18:48:08 +01:00
courtmanr@gmail.com cb9f8f1457 feat: improve backup type labels with styled badges in history card
- Convert plain text backup type labels to rounded badge components
- Add proper spacing between multiple backup types (PBS, PVE, SNAP)
- Implement consistent styling across multi-date and single-date views
- Include dark mode support with appropriate color contrasts
- Left-align types column for better visual consistency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 18:20:06 +01:00
courtmanr@gmail.com 3c62011c5a test: add timestamp validation regression test
- Create comprehensive test for getValidTimestamp() method
- Verify handling of valid, invalid, null, and undefined timestamps
- Confirm no RangeError exceptions are thrown during ISO string generation
- Validate the complete fix for Teams webhook "Time Value Error"
- Demonstrate robust fallback logic for all edge cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 18:08:30 +01:00
courtmanr@gmail.com 2071d4a820 fix: enhance webhook timestamp validation and add comprehensive tests
- 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>
2025-06-02 18:05:26 +01:00
courtmanr@gmail.com 9b128b40d4 fix: resolve remaining Teams webhook timestamp errors
- Fix remaining alert.timestamp references in email notifications and Discord/Slack embeds
- Replace with alert.triggeredAt || alert.lastUpdate || Date.now() pattern
- Resolves RangeError when sending webhook notifications to Teams
- Fixes issue #114 completely

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 18:01:21 +01:00
courtmanr@gmail.com 890712dc5a test: add webhook functionality testing tools
- Add test-webhook.js server for receiving webhook notifications
- Add webhook-integration-test.js for comprehensive webhook testing
- Verify webhook payload format and Discord/Slack compatibility
- Test alert system integration with webhook notifications

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 17:58:35 +01:00
courtmanr@gmail.com c817791aa8 fix: resolve webhook notification timestamp error and improve scroll timing
- 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>
2025-06-02 16:53:49 +01:00
courtmanr@gmail.com 96934b6c95 feat: implement consistent backup type filtering across detail card views
- Add comprehensive backup type filtering to detail card when filters are active
- Show only filtered backup types (PBS/PVE/SNAP) instead of all types
- Ensure calendar date selections respect active backup type filters
- Implement three helper functions for different data structures
- Clean up debug logging and improve scroll position handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 16:51:00 +01:00
courtmanr@gmail.com aea8b79a72 fix: improve backup health monitoring and add comprehensive validation
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>
2025-06-02 15:20:59 +01:00
courtmanr@gmail.com e86ca38f6a test: significantly improve test coverage and fix Jest configuration
## 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>
2025-06-02 09:49:48 +01:00
courtmanr@gmail.com cbaf9ed027 fix: upgrade Nodemailer to 7.0.3 and resolve Express 5 route conflicts
- Upgraded Nodemailer 6.10.1 → 7.0.3 (fully compatible with SMTP usage)
- Temporarily keep Express 4.21.2 due to path-to-regexp v8 breaking changes
- Removed duplicate threshold routes from configApi.js (moved to thresholdRoutes.js)
- Express 5 upgrade will require route pattern updates for compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 09:47:21 +01:00
courtmanr@gmail.com efe1f5eb58 chore: upgrade Express to 5.1.0 and Nodemailer to 7.0.3
- Express 4.21.2 → 5.1.0: Major version upgrade with improved performance
- Nodemailer 6.10.1 → 7.0.3: Major version upgrade with SESv2 support
- Both upgrades are fully compatible with existing codebase
- No breaking changes affect current SMTP usage or Express routes
- Automated dependency security and feature improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 09:38:41 +01:00
courtmanr@gmail.com 6fbc4e0422 fix: resolve auto-update npm permission errors and dependency installation issues
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-01 23:37:05 +01:00
courtmanr@gmail.com 93c5e692f6 chore: release v3.19.0 2025-06-01 23:27:39 +01:00
courtmanr@gmail.com 3430024f63 fix: resolve PVE backup detection and cross-cluster guest ID collisions
- 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>
2025-06-01 23:25:11 +01:00
courtmanr@gmail.com b7e93f7fd8 feat: add dynamic alert rule management with cleanup for disabled types
- 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>
2025-06-01 22:35:30 +01:00
courtmanr@gmail.com 2b1157c8ca debug: add logging to auto-update mechanism to troubleshoot download URL issue 2025-06-01 21:51:53 +01:00
courtmanr@gmail.com 8f82925ce5 fix: use existing node user (uid:gid 1000:1000) instead of creating new user
- Leverages node:18-alpine's existing node user with proper uid:gid 1000:1000
- Eliminates uid/gid conflicts during Docker build
- Maintains security by avoiding system service account permissions
- Completes fix for issue #109
2025-06-01 21:42:49 +01:00
courtmanr@gmail.com 69f0009d2d fix: change appuser to uid:gid 1000:1000 for security
- Use standard user uid:gid 1000:1000 instead of 100:101 (postfix:crontab)
- Add user override in docker-compose.yml to ensure consistent uid:gid
- Prevents .env files from having system service account permissions
- Addresses critical security concern in issue #109
2025-06-01 21:40:04 +01:00
courtmanr@gmail.com c17ca8747d fix: ensure config and data directories exist with proper permissions in Docker container
- Create /usr/src/app/config and /usr/src/app/data directories before setting ownership
- Fixes permission issues when saving configuration via web UI
- Resolves issue #109 where appuser cannot write to .env file in mounted config volume
2025-06-01 21:35:46 +01:00
courtmanr@gmail.com f9bfcb69ec chore: release v3.18.0 2025-06-01 21:30:12 +01:00
courtmanr@gmail.com 964db89507 feat: implement webhook notifications for alerts
- 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>
2025-06-01 21:16:47 +01:00
courtmanr@gmail.com 2c61e09e76 fix: correct nodemailer method name from createTransporter to createTransport
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-01 21:08:16 +01:00
courtmanr@gmail.com dd98d7707e feat: implement email notifications for alerts
- 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>
2025-06-01 21:03:28 +01:00
courtmanr@gmail.com f7303b573a fix: resolve custom threshold dropdown validation error
- 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
2025-06-01 20:51:53 +01:00
courtmanr@gmail.com 7abe322944 fix: enhance security by properly sanitizing sensitive data in diagnostic reports
- 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>
2025-05-31 23:57:48 +01:00
courtmanr@gmail.com b4bae69b83 feat: make node names clickable in summary cards
Added clickable links to node names in both regular and mobile summary cards.
When a node URL is available, users can now click the node name to open the
node's web interface in a new tab.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 23:50:49 +01:00
courtmanr@gmail.com 04ae1fd0bf fix: resolve update mechanism issues and add test mode
- 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>
2025-05-31 23:38:08 +01:00
courtmanr@gmail.com be70c344e0 3.17.3 2025-05-31 22:57:26 +01:00
courtmanr@gmail.com 7069f8c2a2 fix: prioritize display names in node link resolution
When custom node names are configured, the dashboard shows display names
but node links were failing because getHostUrl was checking actual node
names first. This fix reorders the lookup to check display names first,
ensuring that custom-named nodes have working links.

- Check display names before actual node names in getHostUrl
- Maintains backward compatibility for non-custom setups
- Fixes issue where clicking custom node names didn't open web interface

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 22:56:56 +01:00
courtmanr@gmail.com 77dfd9420d 3.17.2 2025-05-31 22:36:12 +01:00
courtmanr@gmail.com f4f135f086 fix: update Express to 4.21.2 to resolve security vulnerabilities
Fixes 7 Dependabot security alerts:
- HIGH: path-to-regexp ReDoS vulnerabilities (CVE-2024-45296, CVE-2024-45813)
- HIGH: body-parser DoS vulnerability (CVE-2024-45590)
- LOW: cookie out of bounds characters (CVE-2024-47764)
- LOW: express XSS via response.redirect() (CVE-2024-43796)
- LOW: send/serve-static template injection XSS (CVE-2024-43799, CVE-2024-43800)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 22:33:31 +01:00
courtmanr@gmail.com 1e8d530f2e chore: release v3.17.1 2025-05-31 22:10:02 +01:00
courtmanr@gmail.com f2b3617941 fix: resolve stuck tooltip issue with improved event handling
- Fixed handleMouseOut to properly detect when leaving tooltip triggers
- Added document mouseleave handler to hide tooltips when mouse leaves viewport
- Added scroll event handler to prevent tooltips getting stuck during scrolling
- Improved event handling to prevent premature tooltip hiding from child element bubbling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 22:04:40 +01:00
courtmanr@gmail.com 4a340ab6f7 fix: only use custom node names when explicitly configured
- 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>
2025-05-31 21:51:32 +01:00
courtmanr@gmail.com d08ca39312 fix: improve node name display and configuration handling
- 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>
2025-05-31 21:41:01 +01:00