Commit Graph

219 Commits

Author SHA1 Message Date
rcourtman 701b5343cb feat: update install script to use dynamic version from API 2025-06-13 15:54:30 +01:00
rcourtman ead3a75ddb refactor: major codebase cleanup and consolidation
- Remove duplicate functions and consolidate utilities
  - Created modalManager.js for centralized modal handling
  - Created apiClient.js for consistent API communication
  - Enhanced utils.js with button state management and date formatting
  - Removed duplicate debounce.js file

- Clean up unnecessary files
  - Removed obsolete scripts (fix-css.sh, test-update.sh)
  - Removed runtime data files (active-alerts.json, notification-history.json)
  - Removed debug files (toggle-debug.html, alertManagementModal-cleanup-report.md)
  - Updated .gitignore to properly exclude runtime and development files

- Refactor existing code to use new utilities
  - Updated settings.js to use modalManager, apiClient, and utils
  - Updated alertManagementModal.js to use new utilities
  - Consolidated _formatBytesThreshold to use existing formatSpeed
  - Removed debug console.log statements

- Fix UI issues
  - Fixed modal centering for settings and alert management modals
  - Added flex class and changed items-start to items-center

- Update dependencies
  - Removed unused sqlite3 and conventional-changelog-cli packages
  - Removed duplicate concurrently from dependencies

This refactoring reduces code duplication by ~15-20% and improves maintainability.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-13 00:01:55 +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 823613132b fix: improve data restoration with better directory handling and verification
- Ensure data directory exists before restoration attempts
- Fixed copy operation to properly restore file contents
- Added verification logging to confirm thresholds and acknowledgements restoration
- Better error handling for edge cases during restore process

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 18:24:52 +01:00
courtmanr@gmail.com 8f19cb707e enhance: improve backup reporting and verification for user configs
- Added detailed logging of backup contents (file counts, what was found/missing)
- Enhanced backup info file with configuration summary
- Better visibility into custom thresholds, acknowledgements, and webhook configs
- Improved user feedback about what data was preserved during backup/restore
- Backup already captures all user data correctly (data/, .env, config/)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 18:04:28 +01:00
courtmanr@gmail.com 30086f7883 fix: remove all pulse service files during uninstall
- Added removal of pulse-monitor.service and pulse-proxmox.service during uninstall
- Fixes false positive "Pulse is installed" detection after removal
- Ensures complete cleanup of all legacy service files
- Prevents orphaned service files from interfering with installation detection

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 17:49:23 +01:00
courtmanr@gmail.com e91ebc68b5 feat: add comprehensive backup/restore functionality to installer
- Added backup prompt during Pulse removal with user choice
- Implemented automatic backup detection during fresh installs
- Added interactive restore menu showing available backups with dates/versions
- Comprehensive backup includes: user data, .env config, and config directory
- Seamless restore process with proper file permissions
- Backup location: /tmp/pulse-backup-YYYYMMDD-HHMMSS with info file
- Prevents data loss during removal/reinstallation workflows

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 17:45:06 +01:00
courtmanr@gmail.com 200951b06a fix: ensure complete process cleanup during Pulse removal
- Added pkill commands to terminate any remaining Pulse processes during removal
- Prevents port conflicts when reinstalling after removal
- Uses graceful kill first, then force kill after delay
- Fixes issue where orphaned processes prevented service restart

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 17:38:16 +01:00
courtmanr@gmail.com 3494f5c4fd fix: ensure service file exists even when version is current
- Added setup_systemd_service to "already latest version" path in updates
- Fixes case where service file is missing but version check passes
- Now recreates service file in all update scenarios

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 17:31:34 +01:00
courtmanr@gmail.com ceabacbd2b fix: ensure systemd service file is created during updates
- Added setup_systemd_service call to perform_update() function
- Fixes issue where service file could be missing after updates
- Now updates will recreate pulse.service if it doesn't exist

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-04 17:23:46 +01:00
courtmanr@gmail.com 07b3f0a9c6 fix: ensure polkit directory permissions are correct
- Explicitly set /etc/polkit-1/rules.d permissions to 755
- Handle case where polkit package creates restrictive permissions
- Ensures rule file creation works regardless of polkit install order
- Makes community script integration more robust
2025-06-04 16:16:08 +01:00
courtmanr@gmail.com 681c528aff feat: auto-install polkit for sudoless updates in LXC containers
- Add policykit-1 package to automatic dependency installation
- Check for pkexec command availability before installing polkit
- Enable sudoless update system to work in LXC environments
- Improve compatibility with community Proxmox VE installation scripts

This ensures that new installations (including via community scripts)
automatically get polkit support for seamless web-based updates
without requiring manual sudo commands.
2025-06-04 15:49:16 +01:00
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 3823dcbcb9 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 123aa7db55 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 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 38aee506db fix: preserve .env file during installer updates
- Backup .env file before removing old installation
- Restore .env file after extracting new version
- Fix both update and migration processes
- Ensure proper ownership and permissions on restored .env file
2025-05-31 19:55:50 +01:00
courtmanr@gmail.com 7fb1a14cff chore: update installer SHA to latest commit 2025-05-31 15:56:43 +01:00
courtmanr@gmail.com 34ea6d9d9e fix: use full SHA for installer version tracking
- Use full 40-char SHA instead of abbreviated 7-char version
- Fixes issue where installer kept detecting updates
- SHA comparison now works correctly
2025-05-31 15:56:23 +01:00
courtmanr@gmail.com 90628a5ef2 chore: update installer SHA to current commit 2025-05-31 15:53:18 +01:00
courtmanr@gmail.com 6798dd54db feat: restore robust installer self-update using GitHub API
- Added SHA-based version tracking to avoid GitHub CDN caching issues
- Uses GitHub API to check latest commit SHA for the installer
- Falls back to simple diff check if jq is not available
- Updates embedded SHA when downloading new version
- Much more reliable than simple file comparison

This restores the update method from the original installer that
properly handles GitHub's aggressive CDN caching.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 15:52:59 +01:00
courtmanr@gmail.com e2ed7327e2 fix: correct port number in installer (7655 not 3000)
The server is hardcoded to use port 7655, not 3000
2025-05-31 15:43:10 +01:00
courtmanr@gmail.com 640f31ae4b fix: handle Express version mismatch in tarballs
- Check for Express version mismatch after extracting tarball
- Reinstall dependencies if Express version is wrong
- Fixes service startup failure due to path-to-regexp error
- Works around issue where GitHub releases have wrong Express version

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 15:34:49 +01:00
courtmanr@gmail.com 098b579592 feat: restore installer self-update check
- Added back the self-update check for the installer script
- Installer now checks for updates to itself before running
- Skips update check when running from pipe (curl | bash)
- User is prompted before updating the installer

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 15:31:19 +01:00
courtmanr@gmail.com f2994141b6 refactor: clean up installer for pre-built tarball releases
- Removed npm dependency installation from installer (tarballs include deps)
- Cleaned up output with better icons and formatting
- Simplified installation flow since tarballs are pre-built
- Reduced installer from 590 to 522 lines
- Fixed messaging to be cleaner and more professional

The installer now expects properly built tarballs from create-release.sh
that include all dependencies and pre-built CSS.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 15:29:05 +01:00
courtmanr@gmail.com 227de6a65e fix: install dev dependencies temporarily for CSS build
- Install all dependencies (including dev) initially
- Build CSS with tailwindcss available
- Remove dev dependencies after CSS is built
- Fixes installation failure due to missing tailwindcss
2025-05-31 15:22:25 +01:00
courtmanr@gmail.com 081f1703d3 fix: handle CSS build gracefully in tarball installations
- Check if CSS is already built before attempting to rebuild
- Skip CSS build if tailwindcss is not available (dev dependency)
- Continue installation even if CSS build fails (tarball should have pre-built CSS)
- Fix issue where installation would fail due to missing tailwindcss

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 15:18:12 +01:00
courtmanr@gmail.com e0e0781819 refactor: simplify install script and remove automatic updates
- Reduced script size from 2290 to 590 lines (74% reduction)
- Switched from git cloning to tarball installation
- Removed all automatic update functionality (cron jobs, self-update)
- Removed unnecessary dependencies (git, diffutils, jq)
- Simplified installation flow with cleaner code structure
- Preserved core functionality: install, update, remove, migrate
- All updates now require manual execution

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 15:15:47 +01:00
courtmanr@gmail.com 56a7cfce8a fix: ensure npm install runs when Express version mismatch is detected
- Set should_update_deps=true when Express version mismatch is found
- Previously, the installer would detect the mismatch but still skip npm install
- This was causing the path-to-regexp error to persist even after detection

The installer will now properly update dependencies when it detects
that Express version is not 4.19.2.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 15:03:20 +01:00
courtmanr@gmail.com 03d51263e1 fix: remove bash syntax errors in installer script
- Remove 'local' keyword usage outside of functions
- Variables should_update_deps, current_express_ver, and express_version are now global
- Fixes "./install-pulse.sh: line 2204: local: can only be used in a function" error

This was preventing the dependency update logic from running properly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:56:18 +01:00
courtmanr@gmail.com 24e8636c36 fix: ensure installer always updates dependencies on updates
- Changed installer to always run npm install on updates, not just fresh installs
- Added Express version check even for tarball installations
- Forces dependency update if Express version doesn't match expected 4.19.2
- Removed manual fix script as it's no longer needed

The issue was that tarball installations include pre-built node_modules,
which prevented dependency updates when package.json changed.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:53:31 +01:00
courtmanr@gmail.com af9f3ed0a1 feat: add emergency fix script for Express version issue
- Add fix-express-version.sh script to manually resolve path-to-regexp errors
- Script performs complete node_modules cleanup and reinstall
- Verifies correct Express 4.19.2 version is installed
- Provides immediate solution while installer is being debugged

Run this script on affected servers:
sudo /opt/pulse/scripts/fix-express-version.sh

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:50:50 +01:00
courtmanr@gmail.com ae4ba7e4da fix: force clean dependency install to resolve path-to-regexp error
- Stop the service before updating dependencies
- Remove node_modules directory to force clean install
- Add Express version verification after install
- This ensures old Express 4.21.x dependencies are completely removed

The service recovery was masking the real issue - old node_modules
were not being updated properly, keeping the problematic Express version.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:48:53 +01:00
courtmanr@gmail.com d7601a48a9 fix: improve npm dependency installation in installer
- Switch from npm install to npm ci for clean installs based on package-lock.json
- Add fallback to npm install if npm ci fails
- Remove --unsafe-perm flag and use --omit=dev for production installs
- Show dependency installation output (filtering npm WARN messages)

This ensures that package-lock.json changes are properly applied during updates,
fixing issues where old dependencies remain after updates.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:46:39 +01:00
courtmanr@gmail.com ae5a861fa8 fix: improve service error detection in installer script
- Replace overly broad npm notice detection with specific checks
- Add detection for actual npm start misconfiguration in ExecStart
- Separate npm errors/warnings from service configuration issues
- Provide clearer troubleshooting guidance for each error type

This prevents false positives when npm notices appear in logs
during normal operation with direct node execution.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:34:56 +01:00
courtmanr@gmail.com aa138e1164 fix: resolve service startup failures by using direct node execution
Replace npm execution with direct node server/index.js in systemd service to eliminate npm-related startup failures and update notices. Add improved diagnostics to detect and explain npm execution issues.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:26:50 +01:00
courtmanr@gmail.com 592556ccb8 enhance: improve service recovery feedback in installation script
Add clearer messaging when service recovery succeeds to provide better user feedback during installation process.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 14:22:56 +01:00
courtmanr@gmail.com 864d7e180e enhance: improve migration from /opt/pulse-proxmox to /opt/pulse
- Add comprehensive user notification with migration details
- Implement pre-migration validation (disk space, permissions, valid installation)
- Add migration status tracking to prevent duplicate attempts
- Enhance error messages with detailed troubleshooting steps
- Provide interactive confirmation before proceeding

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 10:56:03 +01:00
courtmanr@gmail.com 142cdf6216 fix: make EnvironmentFile optional in systemd service to prevent startup failures
Changes EnvironmentFile to EnvironmentFile=- in systemd service template, allowing service to start even when .env file doesn't exist during fresh installations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 00:11:59 +01:00
courtmanr@gmail.com 1004d30ae7 fix: add git repository validation before attempting git operations in installer
Prevents "fatal: not a git repository" error when install script falls back to git update on non-git directories.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 00:08:58 +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 ea1842a29e feat: enhance migration logic to automatically fix systemd service paths
- Added fix_service_paths() function to update service files with old paths
- Migration now automatically updates WorkingDirectory and EnvironmentFile in systemd service
- Handles edge cases where migration occurred but service paths weren't updated
- Prevents "Internal Server Error" issues that users might face after migration
- Service is stopped, updated, and restarted during migration for seamless transition

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 22:11:46 +01:00
courtmanr@gmail.com 440744fcb0 fix: update CSS fix script path from /opt/pulse-proxmox to /opt/pulse
- Updated default PULSE_DIR in fix-css.sh to use new installation path
- Ensures CSS fix script works with updated installation location

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 22:08:36 +01:00
courtmanr@gmail.com c40e3d7084 feat: update installation path from /opt/pulse-proxmox to /opt/pulse
- Changed PULSE_DIR from "/opt/pulse-proxmox" to "/opt/pulse" to align with community scripts
- Added automatic migration logic to handle existing installations at old path
- Migration preserves all user configuration and data with backup creation
- Updated remove function to clean up both old and new directories
- Added safety checks and rollback functionality for failed migrations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 21:51:54 +01:00
courtmanr@gmail.com f624e2e2df feat: update release script to align with web-based configuration
- Remove .env.example from tarball creation (no longer needed)
- Remove .env.example from essential files verification
- Update manual installation instructions to use web interface
- Simplify release process by eliminating manual .env file setup
- Align with new automatic settings modal approach

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 15:16:49 +01:00
courtmanr@gmail.com e1494418b8 feat: update install script for web-based configuration approach
- Remove automatic .env.example copying that's no longer needed
- Preserve existing .env files to avoid overwriting user configuration
- Update messaging to reflect new web-based setup via settings modal
- Provide clear first-time setup instructions for new installations
- Maintain backward compatibility for existing installations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 15:15:29 +01:00
courtmanr@gmail.com e49da4612c feat: improve screenshot timing and update documentation images
- Add 2-second wait time to backup view screenshots for better data loading
- Update all screenshot images with latest UI state
- Remove obsolete backup script file
- Ensure backup data is fully rendered before capturing screenshots

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 00:31:20 +01:00
courtmanr@gmail.com 395c7c4669 fix: use GNU tar to eliminate macOS extended attributes completely
- Auto-detect and prefer GNU tar (gtar) when available
- Fallback to BSD tar with COPYFILE_DISABLE=1 if GNU tar not available
- Verified: GNU tar produces clean tarballs with zero warnings
- Final solution for macOS extended attribute issues
2025-05-29 23:39:51 +01:00
courtmanr@gmail.com 7828346de0 fix: completely eliminate macOS extended attributes from tarballs
- Strip extended attributes from source files before copying
- Add final cleanup step to remove attributes from staging directory
- Verified: tar extraction produces zero warnings
- Version 3.12.5 - the definitive fix
2025-05-29 23:35:36 +01:00
courtmanr@gmail.com 18c2579bc2 fix: add COPYFILE_DISABLE=1 to all cp commands in release script
- Prevents macOS extended attributes from being included in tarball
- Fixes tar extraction warnings for all copied files
- Version bump to 3.12.4 for testing
2025-05-29 23:31:54 +01:00