Commit graph

13 commits

Author SHA1 Message Date
rcourtman
ec1d8b3303 fix: ensure PULSE_DATA_DIR is exported in dev mode and improve sync validation
Additional safeguards to prevent dev/production config conflicts:

1. **hot-dev.sh**: Explicitly export PULSE_DATA_DIR before starting backend
   - Ensures backend always uses /opt/pulse/tmp/dev-config in dev mode
   - Prevents accidental fallback to /etc/pulse
   - Adds logging to show which config directory is being used

2. **sync-production-config.sh**: Smart encryption key handling
   - Never overwrites existing dev encryption key
   - Warns if production key is newer (unusual scenario)
   - Keeps dev key to avoid breaking encrypted configs
   - Adds detailed logging of sync decisions

These changes ensure that when Vite restarts:
- Backend always uses the correct dev-config directory
- Sync script never breaks working dev configuration
- All decisions are logged clearly for debugging

Related to previous commit fixing nodes.enc corruption.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 07:33:20 +00:00
Pulse Monitor
3331e1f2ab feat: add real-time streaming discovery and improve dev/mock mode switching
- Added streaming discovery that shows servers as they're found
- Backend sends WebSocket updates for each discovered server
- Frontend displays servers immediately without waiting for full scan
- Created sync-production-config.sh to preserve nodes when switching modes
- Updated toggle-mock.sh to sync config when disabling mock mode
- Dev environment now maintains separate config that syncs from production
- Enabled discovery service in dev environment by default

addresses real-time discovery UX and mock/production mode configuration persistence
2025-09-30 13:13:32 +00:00
Pulse Monitor
e98fe46a31 fix: repair hot-dev script and mock data system
- Fix port conflict: backend now uses 7656, frontend uses 7655
- Fix mock mode not loading: use load_env_file for proper export
- Fix pipefail crashes on port checks: disable during lsof checks
- Add error handling for /etc/pulse/.env permission issues
- Update .gitignore to exclude sensitive files and temp scripts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 10:38:35 +00:00
rcourtman
9852ef9047 Align dev ports and improve auto-register UX 2025-09-29 15:05:59 +00:00
Pulse Monitor
0aeeb3da0d fix: resolve alert acknowledgment timeout issue (addresses #438)
The alert acknowledgment endpoints were hanging because GetState() was called
synchronously to broadcast updates via WebSocket, which could take significant
time with many nodes/guests. This caused the HTTP response to timeout, showing
an error to users even though the alert was successfully acknowledged.

Fixed by:
- Sending HTTP response immediately after acknowledging the alert
- Moving WebSocket broadcast to a goroutine to avoid blocking
- Applied fix to all alert endpoints (acknowledge, unacknowledge, clear, bulk ops)

This resolves the issue where users saw 'Failed to acknowledge alert' errors
but the alert was actually acknowledged (disappeared on refresh).
2025-09-10 15:49:12 +00:00
Pulse Monitor
00338fb8f6 fix: completely bypass auth for development environment
- Skip auth check entirely in App.tsx for development
- Add .env.dev file with DISABLE_AUTH=true and PULSE_MOCK_MODE=true
- Update hot-dev.sh to load .env.dev environment variables
- This ensures the app loads immediately without auth issues
- WebSocket and API now work without authentication in dev mode
2025-09-07 13:49:17 +00:00
Pulse Monitor
e0260cb0d1 fix: resolve PBS alert toggle and offline alert issues (addresses #426)
- Fixed PBS alert toggle not responding in thresholds settings
- PBS servers now use connectivity toggle like nodes instead of disabled toggle
- Added support for disableConnectivity flag on PBS instances in backend
- Fixed PBS ID format mismatch between frontend and backend
- PBS offline alerts now properly respect the disableConnectivity setting
- Prevents spam alerts by checking disableConnectivity flag for PBS offline alerts
2025-09-07 07:13:56 +00:00
Pulse Monitor
70250de0df chore: remove dev build tag and add auth debugging 2025-09-04 15:00:14 +00:00
Pulse Monitor
69598d62f6 enhance: improve mock data realism and alert system
- Add dynamic metric fluctuations for VMs and containers in mock data
- Fix alert acknowledgment to dim instead of hide alerts
- Implement unacknowledge functionality with backend persistence
- Simplify alert UI to single-click toggle (remove selection system)
- Add proper hysteresis for alert resolution when metrics drop
- Fix SVG icon boundaries in alert displays
- Add webhook disable toggles for testing without notifications
- Fix frontend directory duplication issue (addresses frontend-modern recreation)
- Improve alert sorting to show most recent first
- Make mock system generate realistic metric changes for proper alert lifecycle
2025-09-02 21:11:01 +00:00
Pulse Monitor
424d5a9538 fix: change password submit button not working (addresses #396)
- Changed button type from 'button' to 'submit' so it actually submits the form
- This was the root cause - the button looked clickable but had no onClick handler
- Now the form properly submits when clicking Change Password
2025-09-01 22:59:32 +00:00
Pulse Monitor
2f97571141 chore: consolidate development environment and fix multiple issues
- Fixed alert acknowledgment persistence bug in monitor.go
- Reordered columns in NodeSummaryTable for better logical grouping
- Consolidated development environment with improved hot-dev script
- Updated vite.config.dev.ts for consistent port usage (7656)
- Enhanced Go main.go with better development mode detection
- Removed obsolete development scripts for cleaner repository
- Added comprehensive development documentation in CLAUDE.md

Development improvements ensure consistent port 7655 usage and
eliminate conflicts between different development approaches.
2025-08-29 13:49:45 +00:00
Pulse Monitor
3f8f1f7899 refactor: simplify setup flow by removing setup code prompts
Replaced the two-step setup code process with a simpler token-in-URL approach:
- Auth token is now embedded directly in the setup URL
- No more prompting users for setup codes
- Same security level with better UX
- Backwards compatible with old setupCode field

The new flow generates a command like:
curl -sSL "http://pulse/api/setup-script?...&auth_token=TOKEN" | bash

This makes it much easier for users, especially in Proxmox shell where
interactive prompts can be problematic.
2025-08-23 22:16:01 +00:00
Pulse Monitor
40e6ed89a7 chore: reorganize repository structure for better maintainability
- Move development scripts to scripts/ directory (dev.sh, hot-dev.sh, build.sh, etc.)
- Move UPGRADE_NOTICE to docs/ directory
- Remove empty 2025-08-14 file
- Update all references to moved scripts in documentation
2025-08-18 21:57:40 +00:00
Renamed from hot-dev.sh (Browse further)