31 Commits

Author SHA1 Message Date
rcourtman 539268ae1a refactor: clean up unused code and remove dead files
- Remove unused compareVersions function and DEBUG_METRICS constant
- Delete dataFetcherFixes.js file (unused alternative implementations)
- Remove alertManagementModal.js.backup file
- Clean up commented debug logs and "REMOVED" code blocks
- Remove empty socket handlers that did nothing
- Remove unused URL import from server/index.js

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 08:55:39 +01:00
rcourtman 4452b27655 fix: resolve circular reference errors in alert system
- Fixed undefined guest.type errors in generateAlertMessage by adding proper null checks
- Separated notification status from alert objects to prevent circular references during serialization
- Added comprehensive error handling with fallback data when alert serialization fails
- Improved alert state management to track notification status separately
- Fixed alert display issues in UI by ensuring proper data structure
- Added debugging helpers for troubleshooting serialization issues
- Cleaned up console logging and removed development artifacts

These changes resolve the "Converting circular structure to JSON" errors that were
preventing alerts from being properly displayed and managed in the UI.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-09 16:15:56 +01:00
rcourtman 4fd1e2f83d feat: comprehensive backup system improvements
Major enhancements to backup monitoring accuracy and user experience:

## Core Fixes
- **Fix timestamp precision loss**: PVE/PBS age filtering now shows correct times (17h vs incorrect 36h)
- **Server-side deduplication**: Shared storage backups no longer counted multiple times
- **Client-side deduplication**: Calendar drill-down shows each guest only once per date
- **Clean UI**: Removed redundant backup count numbers when type badges are shown

## Technical Implementation
- Added `latestTimes` object with type-specific timestamps to guest data structure
- Implemented `deduplicateStorageBackups()` function using volid-based deduplication
- Enhanced calendar-heatmap processing to merge duplicate guest entries by vmid
- Updated backup detail card to use direct timestamp lookup instead of date aggregation

## Files Modified
- `server/dataFetcher.js`: Added shared storage deduplication logic
- `src/public/js/ui/backups.js`: Enhanced guest data with type-specific latest times
- `src/public/js/ui/backup-detail-card.js`: Fixed age calculation and removed redundant counts
- `src/public/js/ui/calendar-heatmap.js`: Implemented client-side guest deduplication
- `docs/BACKUP_ARCHITECTURE.md`: Documented pragmatic solution approach

## Result
- Accurate backup ages when filtering by PVE/PBS/Snapshots
- No more duplicate counting from shared storage (NFS, Ceph, etc.)
- Clean calendar view with single guest entries per date
- Foundation for future backup system enhancements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 19:44:15 +01:00
root 944a197fef fix: improve reliability and user experience across components
- Update PBS connectivity check endpoint for better compatibility
- Make alert checking asynchronous to prevent blocking
- Update test expectations for webhook error messages with retry counts
- Enhance alerts handler with better event listeners and error handling
- Improve PBS UI by replacing symbols with clearer text labels

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 18:38:27 +01:00
courtmanr@gmail.com bd9a976100 feat: enhance system reliability with DNS resilience and advanced alerting
- Implement resilient DNS resolution for API calls with fallback mechanisms
- Add compound threshold alert rules with multi-metric evaluation
- Enable immediate alert evaluation when rules are enabled
- Add alert rules file watching for dynamic configuration updates
- Improve alert state management with proper resolution handling
- Include comprehensive testing and documentation for DNS features

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 15:46:04 +01:00
courtmanr@gmail.com ccbb5c41c6 fix: make individual node resource fetching non-blocking
The smart cluster handling prevented endpoint duplication but individual
node resource fetching was still sequential and blocking. This adds:

- Promise.allSettled for parallel node resource fetching
- 8-second timeouts on individual resource requests
- Proper error handling for failed resources

This should completely eliminate dashboard freezes when nodes go offline.

Addresses issue #104 follow-up
2025-06-04 20:42:18 +01:00
courtmanr@gmail.com 6117586f02 feat: implement smart cluster handling with endpoint prioritization
- Add cluster membership detection to identify same-cluster endpoints
- Implement endpoint prioritization with failover support
- Eliminate data duplication by using only one endpoint per cluster
- Maintain backward compatibility with existing configurations
- Add caching for cluster membership detection (5min TTL)

This resolves the core issue where users configure multiple endpoints
for the same cluster, causing blocking timeouts and data duplication.
Now only the primary endpoint is used, with automatic failover to
backup endpoints when needed.

Addresses issue #104
2025-06-04 19:00:59 +01:00
courtmanr@gmail.com 67d79e20ed feat: consolidate update system and improve version comparison UI
- Consolidate dual update mechanisms to use proven install script
- Fix critical version parameter extraction bug
- Add comprehensive commit differences display with GitHub links
- Improve update UI with expandable details and compact summary
- Remove redundant channel recommendation warnings
- Add proper error handling and cleanup for update process
2025-06-04 14:20:28 +01:00
courtmanr@gmail.com cbe49c20f6 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 8ff6f8f366 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 29e90d769d 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 8aa47a5261 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
courtmanr@gmail.com 4f678c600e fix: resolve PVE backup visibility issue with hybrid node discovery and filtering fixes
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>
2025-05-30 23:43:56 +01:00
courtmanr@gmail.com c770c07671 chore: release v3.12.3
- Test tarball creation script to prevent macOS extended attribute warnings
- Minor improvements to data fetcher
2025-05-29 23:22:42 +01:00
courtmanr@gmail.com 8b1051a999 feat: enhance backup management with interactive calendar and improved failure tracking
- Add comprehensive PBS task failure detection and processing
- Implement interactive backup calendar heatmap with detail cards
- Enhance backup filtering with guest type and health status options
- Improve keyboard navigation and search functionality across tabs
- Add backup detail card component for granular backup information
- Update test coverage for enhanced backup data fetching
- Clean up debug logging and improve console output clarity

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-29 16:23:49 +01:00
courtmanr@gmail.com 649c034182 feat: enhance data fetching and update documentation
- Improve server data fetching capabilities
- Update README with latest features and instructions
- Enhance data processing for backup visualization

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-29 00:06:04 +01:00
courtmanr@gmail.com 1fe463db2b Enhance backup presentation with separate columns for each backup type
- Replace generic Source/Location columns with specific backup type columns
- Add PBS Backups column with purple indicator and detailed tooltips
- Add PVE Backups column with orange indicator and storage info
- Enhanced Snapshots column with blue indicator and clickable counts
- Clear visual distinction between backup storage locations
- Detailed tooltips show PBS instances, datastores, and storage names
- Improved user experience for mixed backup environments
2025-05-28 13:52:20 +01:00
courtmanr@gmail.com 30102a40cb feat: add PVE backup and snapshot support
- Add support for local PVE backups (vzdump tasks)
- Add support for backup files on PVE storage (including NFS)
- Add VM/CT snapshot display with modal view
- Update backup tab to show both PBS and PVE backups
- Change columns to Source/Location for clarity
- Update diagnostics to handle PVE-only setups

Fixes #81 - PBS token permission warnings for PVE-only users
Fixes #80 - Support for backups on NFS and other PVE storage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-28 09:01:24 +01:00
courtmanr@gmail.com 3f3afaac5d fix: Resolve test failures and integrate recent UI/backend updates 2025-05-26 22:08:12 +01:00
courtmanr@gmail.com 46df0dab97 Update data fetching, metrics, and UI components 2025-05-26 18:25:59 +01:00
courtmanr@gmail.com 6add9ca5f6 refactor: improve PBS integration with enhanced error handling, updated tests, and refined UI components
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-26 17:23:48 +01:00
courtmanr@gmail.com 7b2bea0647 chore: clean up logs and disable alert popups for release readiness 2025-05-25 09:52:45 +01:00
courtmanr@gmail.com 02f384c849 Feat: Implement enhanced server monitoring, alerting, and performance tracking 2025-05-24 22:01:28 +01:00
courtmanr@gmail.com 7d06ac32ee fix: Revert PBS task fetch window to 7 days 2025-05-16 23:01:06 +01:00
courtmanr@gmail.com c83ade7f79 feat: Increase PBS task fetch window to 14 days 2025-05-16 22:26:49 +01:00
courtmanr@gmail.com f626915706 refactor(server): Improve error handling in dataFetcher and update tests 2025-05-10 16:04:45 +01:00
courtmanr@gmail.com 5ccfcee793 fix(dataFetcher): Use endpointId for consistent data association 2025-05-08 14:59:58 +01:00
courtmanr@gmail.com 9042721e1a Update dataFetcher and add pbsUtils tests 2025-05-08 11:55:56 +01:00
courtmanr@gmail.com af531c1524 Feat(dataFetcher): Add QEMU agent memory fetching & refactor node data retrieval 2025-05-08 11:18:28 +01:00
courtmanr@gmail.com 73005a5a73 feat: Enhance VM memory reporting using QEMU guest agent 2025-05-06 14:24:25 +01:00
courtmanr@gmail.com caf9313a0f feat: Sync all local changes including UI and server updates 2025-04-30 16:21:07 +01:00