Commit graph

84 commits

Author SHA1 Message Date
Pulse Monitor
5282bfef2f cleanup: remove debug logging from email config components 2025-08-12 09:38:10 +00:00
Pulse Monitor
aeb98eb86c fix: email config field mapping issue
- Frontend was looking for smtpHost/smtpPort but backend returns server/port
- Fixed field mapping in NotificationsAPI to use correct field names
- Email SMTP server now properly displays saved value instead of placeholder
2025-08-12 09:36:04 +00:00
Pulse Monitor
5c1dc6c880 fix: email config display and persistence issues
- Fixed startTLS field name inconsistency (was starttls, now startTLS)
- Added automatic reload of email config when switching to Notifications tab
- Email config now properly displays saved SMTP server instead of placeholder
- Ensures fresh data is loaded when user navigates to email settings
2025-08-12 09:15:20 +00:00
Pulse Monitor
46a697613a fix: remove sensitive data from logs
Updated logging to exclude request bodies that may contain passwords
or other sensitive information. Now only logs metadata about requests
without exposing actual credentials.
2025-08-12 08:41:17 +00:00
Pulse Monitor
768d60739b fix: complete fix for #296 - PBS edit now shows PBS form, not PVE form
Ensures each modal (PVE/PBS) only receives editingNode if the node type
matches. This prevents PBS edit from showing PVE form and vice versa.

Both issues from #296 are now addressed:
1. PBS forms no longer get contaminated with PVE data (previous commit)
2. PBS edit now correctly shows PBS form instead of PVE form (this commit)
2025-08-12 07:40:07 +00:00
Pulse Monitor
443e3093a1 fix: addresses #296 - PBS form contamination after canceling PVE form
Separated PVE and PBS modals into distinct component instances to prevent
form state contamination. Each node type now has its own Show component
that mounts/unmounts independently, ensuring clean form state.

Also added resetKey tracking and node type change detection for
additional form reset triggers.

Verified with automated tests that PBS forms no longer show data
from previously canceled PVE forms.
2025-08-12 07:35:11 +00:00
Pulse Monitor
fdb18fb431 fix: PBS form contamination issue fully resolved (addresses #296)
Fixed the remaining contamination issue where PBS forms would retain PVE data
after canceling a PVE node addition. The form now properly resets when opening
the modal for adding a new node.

Two fixes were needed:
1. Set currentNodeType when editing any node (previous commit)
2. Clear form data when opening modal for new nodes (this commit)

Both issues reported by krom are now resolved:
- PBS forms no longer show PVE data
- Editing PBS nodes properly populates the form
2025-08-11 21:35:42 +00:00
Pulse Monitor
25141d7cde fix: PBS form editing now correctly sets node type (addresses #296)
The issue was that when editing a PBS node, the currentNodeType wasn't being set,
causing the modal to not populate the form correctly. Now setCurrentNodeType is
called with the node's type when editing any node.

This ensures:
- PBS forms don't get contaminated with PVE data
- Editing PBS nodes properly populates the form with PBS data
- No cross-contamination between node types
2025-08-11 20:35:48 +00:00
Pulse Monitor
252dec2c75 fix: improve alert threshold override persistence (addresses #295)
Frontend improvements:
- Store raw override config separately to handle delayed WebSocket state loading
- Use createEffect to reprocess overrides when WebSocket state becomes available
- Properly maintain raw config when adding/updating/removing overrides
- Ensures overrides don't disappear when switching tabs or navigating

This addresses the issue where custom thresholds would disappear after navigating
away from the tab, which was caused by the WebSocket state not being fully loaded
when the initial config was processed.
2025-08-11 15:42:16 +00:00
Pulse Monitor
9f6a3d1b5f fix: multiple UI and configuration issues (addresses #295, #296)
Frontend fixes:
- Fixed VM thresholds incorrectly showing as 'CT' in alerts UI (issue #295)
- Fixed threshold slider not reaching 0% and 100% edges (issue #295)
- Fixed PBS form auto-filling with PVE settings (issue #296)
- Fixed email config property mapping (server/port instead of smtpHost/smtpPort)

Backend fixes:
- Updated EmailConfig struct to use 'server' and 'port' JSON tags for consistency
- Added 'provider' and 'startTLS' fields to EmailConfig
- Fixed PORT env var to correctly set FrontendPort instead of BackendPort
- Changed default log level from Debug to Info

All changes tested and verified working correctly.
2025-08-11 15:29:53 +00:00
Pulse Monitor
78f849b4de docs: add comprehensive reverse proxy configuration guide
- Added detailed reverse proxy guide for nginx, Caddy, Apache, Traefik, HAProxy, and Cloudflare Tunnel
- Emphasized WebSocket requirement for v4
- Added testing instructions and troubleshooting tips
- Updated README and CONFIGURATION docs to reference the new guide
- Addresses user feedback from issue #244 about WebSocket requirement
2025-08-11 14:50:21 +00:00
Pulse Monitor
631017a906 fix: storage tab node row not extending full width
- Fixed colspan from 7 to 8 to account for all columns in node view
- Node header row now extends to the end of the table
2025-08-11 14:24:03 +00:00
Pulse Monitor
b2a8a71ad8 fix: alert threshold UI bugs (issue #295)
- VMs now properly display as "VM" instead of "CT" in custom thresholds
- Slider thumb now reaches 0% and 100% edges correctly
- Custom rules and schedule changes now trigger unsaved changes warning
- Fixed missing setHasUnsavedChanges calls for override operations
2025-08-11 14:20:42 +00:00
Pulse Monitor
378ebcb250 Major improvements to security, alerts, and ease of use
Security enhancements:
- Fixed critical issue: PBS tokens no longer logged in plaintext
- PVE tokens now properly masked in all log outputs
- Enhanced token security documentation

Alert system fixes:
- Fixed storage alerts not working due to threshold being 0
- Added automatic defaults preservation for alert thresholds
- Storage alerts now properly trigger at 85% usage

Node management improvements:
- Fixed node deletion causing 'Node not found' errors
- Added instant discovery refresh when nodes are deleted
- Added manual refresh buttons for discovery
- Fixed PBS token cleanup in auto-registration scripts
- Fixed /dev/tty errors when running scripts in Docker containers

Bug fixes:
- Fixed CPU MHz field type mismatch causing JSON unmarshal errors
- Suppressed non-critical container snapshot API errors
- Fixed auto-registration using Docker internal IPs instead of actual host IPs

Documentation updates:
- Added comprehensive security documentation
- Streamlined setup documentation focusing on ease of use
- Removed marketing language and consolidated repetitive content

Frontend improvements:
- Added WebSocket support for real-time node updates
- Added discovery refresh buttons in Settings
- Improved node deletion feedback
2025-08-11 13:59:58 +00:00
Pulse Monitor
6db0fbbc1a fix: PBS and PVE red dot issue with connectionHealth status
- Fixed mismatch between backend (unhealthy) and frontend (error)
- Both PVE and PBS nodes now correctly show red dot when unhealthy
- Fixes issue #293 where PBS showed red dot despite being connected
2025-08-11 07:53:24 +00:00
Pulse Monitor
e40304be27 improve PBS HTTP/HTTPS handling and error messages
- Add automatic HTTPS defaulting when no protocol specified
- Warn users when using HTTP for PBS (which requires HTTPS)
- Improve error messages to suggest HTTPS when HTTP fails
- Add UI hints about PBS requiring HTTPS on port 8007
- Fix placeholder to show correct default port for PBS
2025-08-10 22:45:59 +00:00
Pulse Monitor
d522dfca5e fix: API token authentication for Docker users
- Add UI modal to prompt for API token when required
- Detect and handle invalid/expired tokens automatically
- Clear invalid tokens and re-prompt user
- Add ability to clear stored tokens from browser
- Fix race condition in modal retry logic
- Improve error messages for auth failures
- Handle both export and import authentication consistently
- Track operation source to ensure correct retry behavior

Fixes issue reported by da99Beast where Docker users with API_TOKEN
environment variable couldn't authenticate for export/import operations
2025-08-10 21:44:10 +00:00
Pulse Monitor
55e0190777 fix: manual node setup 'Node ID Required' error
Fixed issue where discovered nodes and manual node setup would incorrectly
call updateNode instead of addNode. The problem was that discovered nodes
were set with an empty string ID, which made the code think it was editing
an existing node.

Now properly checks for both editingNode existence AND a valid ID before
deciding whether to update or add.

Fixes #289
2025-08-10 20:02:28 +00:00
Pulse Monitor
f343007378 fix: remove disabled state from export/import buttons
The buttons were incorrectly disabled due to inverted logic. They now work properly regardless of security configuration. Also improved error messages to show the actual error from the API.
2025-08-10 17:44:19 +00:00
Pulse Monitor
20c72387ba fix: improve export error messages in UI
- Added clearer error message when export fails due to missing auth
- UI now explicitly tells users to set API_TOKEN or ALLOW_UNPROTECTED_EXPORT
- Addresses issue #286 where error wasn't clear
2025-08-10 17:09:43 +00:00
Pulse Monitor
a896968f55 feat: add 'Recommended' label to API Token option
Added a green '(Recommended)' label next to the API Token authentication option to guide users toward the more secure authentication method.
2025-08-10 09:32:00 +00:00
Pulse Monitor
10b5e5bf63 fix: default to API token auth when adding discovered servers
Changed the default authentication method from username/password to API token when clicking on auto-discovered servers. API tokens are more secure and the recommended approach for most users.
2025-08-10 09:16:39 +00:00
Pulse Monitor
f8ef3f9259 fix: multiple critical issues in monitoring and notifications
- PBS instances now show as online when datastores are accessible even if version endpoint fails
- Email sending now uses proper STARTTLS support for compatibility with providers like SMTP2GO
- Email recipient input no longer filters entries while typing
- Auto-update setting now properly persists and loads from config
- Fixed CPU usage alerts for offline VMs (already addressed in previous commits)
2025-08-09 23:26:12 +00:00
Pulse Monitor
da5069ecb5 fix: show PBS backup verification status correctly
- Use actual verified field from backend for PBS backups through PVE storage
- Was incorrectly hardcoded to null causing verified checkmarks not to show
2025-08-09 22:43:53 +00:00
Pulse Monitor
0ebfb8ec01 hotfix: backup type detection for PBS backups
- Added format field checking for pbs-ct and pbs-vm
- Changed unknown type fallback from VM to LXC (more common)
- Fixes issue where all backups showed as VM type
2025-08-09 22:42:04 +00:00
Pulse Monitor
026a0b2e17 attempt to address: CT templates showing in backups tab
- Skip vztmpl and iso types from backup display as they are not actual backups
- These are container templates and ISO images, not backup files
2025-08-09 22:31:11 +00:00
Pulse Monitor
a368d3b3c9 attempt to address: Discord webhooks, backup types, storage duplicates, alert issues
- Added service field to WebhookConfig to identify Discord webhooks
- Use Discord-specific template when sending Discord webhooks
- Fixed backup type detection for PBS backups (vm/ct)
- Fixed shared storage duplicate IDs across instances
- Fixed alert acknowledge/clear response format to match frontend expectations
2025-08-09 22:27:10 +00:00
Pulse Monitor
3f897f42fa fix: clear user instructions for manual refresh after updates 2025-08-09 21:43:17 +00:00
Pulse Monitor
4c8094e4ac fix: auto-restart after update using clean exit strategy 2025-08-09 20:57:00 +00:00
Pulse Monitor
311ef7619e fix: critical production issues for v4.1.0-rc.5
- Fixed Discord/Slack/Teams webhooks not persisting (Issue #272)
- Fixed email recipients not saving and Enter key issue (Issue #270)
- Fixed auto-update toggle not saving (Issue #269)
- Fixed false CPU alerts for stopped VMs/containers (Issue #273)
- Automatic alert clearing for stopped guests
- Preserve passwords when updating email config

chore: bump version to v4.1.0-rc.5
2025-08-09 18:27:30 +00:00
Pulse Monitor
7f414623fc fix: ensure consistent CPU core display for all guests
- Fix CPU core display to show for all guests with CPU data
- Previously only showed cores when CPU > 0 (truthy)
- Now shows "(0.0/X cores)" consistently for all running/stopped guests
- Improve code organization with new helper utilities
- Clean up import statements and remove debug logs
2025-08-09 15:03:28 +00:00
Pulse Monitor
decce4f39f feat: implement secure registration token system with fixes
- Add registration token system for secure node auto-registration
- Implement token generation, validation, and revocation APIs
- Add frontend UI for managing registration tokens
- Fix polling interval hot-reload to work without restart
- Fix environment variable persistence for system settings
- Optimize monitor reload to avoid 'no nodes configured' message
- Fix goroutine leak in token manager cleanup
- Fix context propagation in reload logic
- Fix AUTO_UPDATE_ENABLED persistence bug
- Add proper error handling and security validation
- Ensure all resources properly cleaned up with defer statements
2025-08-09 11:54:26 +00:00
Pulse Monitor
4d3c2b9fd6 fix: revert sessionStorage change that breaks user sessions
- Remove sessionStorage for API tokens - it clears on tab close
- localStorage is correct for persistent auth tokens
- sessionStorage would log users out every time they close the tab
- Keep other security improvements from previous commit
2025-08-09 10:19:26 +00:00
courtmanr@gmail.com
7f33cb64cc fix: address additional critical bugs and security vulnerabilities
- Fix unsafe JSON parsing in WebSocket with proper error handling
- Fix unsafe JSON parsing in Settings import with validation
- Improve API token security by using sessionStorage as primary storage
- Remove debug console statements from production code
- Fix race conditions in WebSocket alert handling with atomic updates
- Add NaN validation for parseFloat operations in search queries
- Add safer error handling alternatives in generics utility
- Improve graceful shutdown in Settings API with proper timing
- All changes verified with successful frontend and backend builds
2025-08-09 10:54:10 +01:00
courtmanr@gmail.com
6404b2d63e fix: address critical security vulnerabilities and improve code quality
- Fix XSS vulnerabilities in Tooltip component by replacing innerHTML with textContent and adding content sanitization
- Fix XSS vulnerability in UnifiedBackups by replacing innerHTML with safe DOM manipulation
- Add proper null checks for props.guest.cpu in GuestRow to prevent NaN errors
- Replace unsafe non-null assertions with proper conditional rendering
- Fix memory leak in Settings component by improving interval cleanup
- Fix WebSocket reconnection race condition by adding proper timeout cleanup
- Create standardized error handler utility for consistent error handling
- Enable VM state support in monitoring (resolves TODO)
- Improve type safety throughout the codebase
- All changes verified with successful frontend and backend builds
2025-08-09 10:41:28 +01:00
Pulse Monitor
8dad7e9a7c refactor: simplify configuration to single source of truth
- Remove .env syncing - UI no longer writes to .env file
- system.json is the single source for UI-managed settings
- .env files are read-only for deployment overrides
- Environment variables still override everything (Docker/systemd)
- Cleaner separation: env vars for deployment, JSON for runtime
- Updated documentation to clarify configuration hierarchy
- Simpler code with less failure points
2025-08-09 09:32:31 +00:00
Pulse Monitor
af84e27e80 feat: sync UI settings with .env file
- UI settings now automatically update .env file when changed
- .env file and system.json stay in sync
- Settings hierarchy preserved: env vars > .env > UI
- .env file is auto-generated/updated when UI saves settings
- Improved user experience - changes in UI reflect in .env and vice versa
2025-08-09 06:56:37 +00:00
Pulse Monitor
dd5ee8120f fix: critical bugs and add .env configuration support
- Fix Export/Import API token authentication (wasn't sending X-API-Token header)
- Add client-side passphrase validation (12+ chars with visual feedback)
- Fix settings persistence for AllowedOrigins field
- Fix hardcoded port display in diagnostics (now shows actual port)
- Add .env file support for non-sensitive configuration (ports, logging, etc)
- Keep sensitive data (API tokens, passwords) using secure methods (systemd env vars)
- Update documentation with configuration guide and latest features
- Document auto-discovery, cluster detection, and export/import features
2025-08-08 22:37:02 +00:00
Pulse Monitor
62b9756586 fix: remove redundant cluster/standalone badges
- Badges should be for statuses/counts, not descriptive properties
- Cluster information is already shown in dedicated section below
- Keeps only functional badges (VMs, Containers, Storage, Backups)
- Cleaner, less cluttered interface
2025-08-08 22:05:46 +00:00
Pulse Monitor
11b601fa49 fix: make cluster and standalone badges visually consistent
- Both badges now use gray color scheme (bg-gray-200/700, text-gray-600/400)
- Removes the blue coloring from cluster badge that made it inconsistent
- Better visual hierarchy - badges are informational, not action items
2025-08-08 22:01:41 +00:00
Pulse Monitor
dce8332c9b fix: remove 'New' label from auto-configuration message 2025-08-08 21:57:37 +00:00
Pulse Monitor
be973764fa fix: specify PVE backup files in permission descriptions 2025-08-08 21:53:46 +00:00
Pulse Monitor
8dd13186ae fix: clarify backup permissions are for reading only
- Update checkbox label to 'Enable storage permissions for backup visibility'
- Clarify that PVEDatastoreAdmin is needed to READ backup files (Proxmox API limitation)
- Remove misleading text about managing/creating/deleting backups
- Make it clear Pulse only reads backup data, doesn't control backups
2025-08-08 21:52:03 +00:00
Pulse Monitor
bb0920efa6 feat: add optional backup management permissions checkbox
- Add checkbox to control whether backup write permissions are granted
- When checked: adds PVEDatastoreAdmin role on /storage (allows backup management)
- When unchecked: only PVEAuditor role (read-only, no PVE backups in Storage tab)
- Update setup script generation to conditionally add storage permissions
- Update UI to clearly explain the implications of each choice
2025-08-08 21:50:05 +00:00
Pulse Monitor
09ff756c28 feat: update setup instructions for auto-registration
- Update PVE quick setup to mention automatic Pulse configuration
- Update PBS quick setup to mention automatic Pulse configuration
- Replace 'Save the token immediately' warning with 'No manual token copying needed'
- Add sparkle emoji to highlight the new auto-registration feature
2025-08-08 21:43:45 +00:00
Pulse Monitor
e2765dc2fb feat: remove Discover button and show discovered nodes inline
- Remove DiscoveryModal component and Discover button
- Show discovered nodes directly in PVE/PBS tabs (greyed out)
- Discovered nodes are clickable to configure
- Intelligently filter out nodes that are part of configured clusters
- Prevent duplicate entries for cluster members in discovery results
- Maintain glassmorphic styling throughout
2025-08-08 21:41:20 +00:00
Pulse Monitor
d6e93e2e2b feat: major improvements to cluster detection, auto-registration, and UI
Frontend:
- Enhanced cluster vs standalone node visual distinction in Settings
- Added glassmorphic style to all toast notifications for consistency
- Fixed test connection in edit modal to use stored encrypted credentials
- Added batch credential modal for bulk node operations
- Added network discovery modal with auto-subnet detection
- Improved notification system with dual toast/notification support
- Added event bus for component communication

Backend:
- Fixed duplicate toast notifications during auto-registration
- Fixed PBS auto-registration token extraction from JSON output
- Added network discovery service with background scanning
- Improved cluster detection with actual cluster name from API
- Added helper function to reduce code duplication in cluster detection
- Fixed host URL normalization in auto-registration
- Enhanced PBS client token authentication parsing

Bug Fixes:
- Fixed stacking toast notifications creating visual bugs
- Fixed PBS authentication failures after auto-registration
- Fixed network discovery not finding Proxmox servers
- Fixed test connection for existing nodes with encrypted tokens
- Removed duplicate WebSocket broadcasts for auto-registration events
2025-08-08 21:25:28 +00:00
Pulse Monitor
d63b735c7a Fix PBS token authentication display issue
- Fixed NodeModal to correctly detect token auth based on tokenName instead of user field
- Backend now properly clears user field when using token authentication
- Backend now properly clears token fields when using password authentication
- This fixes the issue where PBS nodes using token auth would show "User:" instead of "Token:"

Fixes #263, #261
2025-08-08 15:46:52 +00:00
Pulse Monitor
1aadd9dc0a Remove PBS summary card and fix backup chart timezone
- Removed PBS summary card from Dashboard and Backups tabs (not needed)
- Fixed backup frequency chart to use local timezone instead of UTC
- Chart now properly includes today in the date range
- Dates display according to user's browser timezone
2025-08-08 15:30:28 +00:00
Pulse Monitor
594ed0b626 fix: show update button when update is available
The Apply Update button was not showing when an update was available because it only checked for 'idle' status but the API returns 'available' status when an update is ready.
2025-08-07 16:12:44 +00:00