Commit Graph

156 Commits

Author SHA1 Message Date
courtmanr@gmail.com bb4a06d1bb feat: implement sudoless update system with polkit integration
- 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
2025-06-04 15:20:00 +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 ce9b1bb2e1 feat: improve alert manager functionality and testing 2025-06-04 10:52:10 +01:00
courtmanr@gmail.com 9d8942e8b5 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 aa884b5ff5 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 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 3237f24610 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 2de032f04f 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 f4aaea1f53 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 78d6f7ff15 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 3775b4d68a 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 cbd6964ac8 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 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 945c3e4320 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 0442ca832b 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 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 ab88beee2e 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 7c21d73844 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 cacad13af9 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 29889e5e10 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 1d3fb22e48 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 9523589f3c 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 b58baa9d14 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 938947bd00 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 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 93f9f98e3c fix: prevent PBS host from saving with protocol prefix
- 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>
2025-05-31 18:04:10 +01:00
courtmanr@gmail.com 012825b93b feat: integrate diagnostics into settings menu
- Move diagnostics from standalone page to settings modal tab
- Add Diagnostics tab to settings navigation
- Port all diagnostic functionality to settings UI module
- Update diagnostics button to open settings modal directly
- Remove standalone diagnostics.html page
- Preserve all features: report generation, sanitization, copy/download

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 17:46:19 +01:00
courtmanr@gmail.com 81c07e118c fix: support non-sequential server IDs in configuration
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>
2025-05-31 17:30:04 +01:00
courtmanr@gmail.com 93c14b6ecb fix: resolve Express v5 compatibility issues and improve server startup
- Downgrade Express from ^5.1.0 to ^4.21.2 to resolve path-to-regexp v8 compatibility issues
- Fix "Missing parameter name" server startup error caused by Express v5/path-to-regexp v8 breaking changes
- Move initial discovery cycle to background execution to allow immediate HTTP server startup
- Remove conflicting server/node_modules directory that contained outdated path-to-regexp

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:17:11 +01:00
courtmanr@gmail.com 407e1a4f2d fix: resolve custom threshold configuration errors
- 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>
2025-05-31 11:48:39 +01:00
courtmanr@gmail.com bdf7bc926f feat: consolidate alert functionality into unified Alert Configuration tab
• 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>
2025-05-31 11:32:16 +01:00
courtmanr@gmail.com d883d85b7b fix: implement persistent Docker volume configuration to prevent data loss
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>
2025-05-31 10:30:51 +01:00
courtmanr@gmail.com 7249a2dd13 fix: preserve existing credentials when adding additional PVE/PBS endpoints
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>
2025-05-31 10:01:15 +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 3381981bb8 fix: make update system Docker-aware and prevent container modifications
- Added Docker environment detection to prevent in-place updates
- Show Docker-specific update instructions in UI instead of update button
- Provide proper docker pull commands for Docker users
- Updated README with web-based update documentation
- Ensure Docker container immutability is maintained
2025-05-30 16:35:24 +01:00
courtmanr@gmail.com afa1aef98f feat: add web-based update management system
- 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
2025-05-30 16:31:14 +01:00
courtmanr@gmail.com 468172c5bf fix: ensure settings modal displays all configured PVE/PBS endpoints
- 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
2025-05-30 16:21:01 +01:00
courtmanr@gmail.com 931d3fb183 feat: replace setup screen with automatic settings modal for initial configuration
- 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>
2025-05-30 15:10:27 +01:00
courtmanr@gmail.com d21599bbe6 clean: remove debug logging from configuration API
- 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>
2025-05-30 15:04:01 +01:00
courtmanr@gmail.com de339cdac0 debug: add comprehensive logging for configuration reload process
- 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>
2025-05-30 14:39:07 +01:00
courtmanr@gmail.com 3fdca3dd16 fix: improve test connections to use existing token secrets
- 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>
2025-05-30 14:11:23 +01:00
courtmanr@gmail.com b84f3d8f38 fix: resolve test connections error in settings modal
- 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>
2025-05-30 14:08:15 +01:00
courtmanr@gmail.com 1776138ca3 feat: redesign settings as comprehensive modal-based configuration system
- 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>
2025-05-30 13:49:53 +01:00
courtmanr@gmail.com 0ad1d00e94 feat: add Settings tab for configuration management
- 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.
2025-05-30 12:04:33 +01:00
courtmanr@gmail.com b684ca9205 fix: improve configuration readiness detection in setup flow
- 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.
2025-05-30 11:49:11 +01:00
courtmanr@gmail.com 647cdaa625 fix: ensure API clients are properly reloaded after configuration save
- 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.
2025-05-30 11:45:08 +01:00
courtmanr@gmail.com 4ed73d71d0 feat: improve setup flow with health check and Continue button
- 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.
2025-05-30 11:35:40 +01:00
courtmanr@gmail.com fcb075cbe5 fix: restore complete configApi.js with all features
- 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>
2025-05-30 11:06:35 +01:00
courtmanr@gmail.com 3e12a572ba fix: resolve configuration save and redirect issues
- 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>
2025-05-30 10:57:57 +01:00
courtmanr@gmail.com ae665fc0a4 feat: add comprehensive configuration options to setup page
- 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>
2025-05-30 10:53:51 +01:00