Commit Graph

441 Commits

Author SHA1 Message Date
Pulse Monitor 44d6fe32d6 fix: frontend now properly handles DISABLE_AUTH and skips login screen
- Frontend checks for disabled: true in security status
- When auth is disabled, goes straight to dashboard
- Fixes issue where login screen showed even with DISABLE_AUTH=true
2025-08-20 10:00:05 +00:00
Pulse Monitor a4a5a27002 chore: bump version to v4.5.0 2025-08-20 08:44:47 +00:00
Pulse Monitor b2b6350420 feat: add DISABLE_AUTH environment variable for proxy authentication
- Added DISABLE_AUTH env var to completely bypass authentication
- Useful for reverse proxy setups (Authentik, Authelia, etc.)
- Updated documentation in CONFIGURATION.md and REVERSE_PROXY.md
- Fixed security tests to handle auth disabled state
2025-08-20 08:43:20 +00:00
Pulse Monitor 85f7ecf384 improve: comprehensive type safety improvements across codebase
Frontend (TypeScript):
- Eliminated all 'any' types (7 → 0)
- Added proper types for event system with generics
- Fixed event data interfaces with specific types
- Replaced any with unknown where appropriate

Backend (Go):
- Created central types.go with 30+ typed API structures
- Eliminated all interface{} in /internal/api package (158 → 0)
- Replaced map[string]interface{} with typed structs:
  - ChartResponse, VMChartData, NodeChartData, StorageChartData
  - DiagnosticsInfo with NodeDetails, ClusterInfo, PBSDetails
  - StorageChartsResponse with StorageMetrics
- Improved compile-time type safety for all API responses

Benefits:
- Better IDE support and autocomplete
- Compile-time error detection
- Clearer API contracts
- Improved maintainability

All tests passing, service running successfully with typed code.
2025-08-19 21:32:44 +00:00
Pulse Monitor 26ffd5003c chore: bump version to v4.5.0-rc.4 and add comprehensive test suite
- Added test-release.sh for core functionality testing
- Added test-edge-cases.sh for URL and header edge cases
- Added test-proxy-scenarios.sh for reverse proxy testing
- Added test-security.sh for security vulnerability testing
- Added test-installation-methods.sh for deployment validation
- Added test-all.sh master script to run all tests
- These tests would have caught issue #334 and prevent similar issues
2025-08-19 19:34:54 +00:00
Pulse Monitor d9d7c4e5ff fix: prevent 301 redirect to relative path (./) when accessing root without trailing slash (addresses #334)
- Replaced http.FileServer with custom file serving to avoid automatic directory redirects
- Manually serve index.html for root path requests
- Custom routing bypasses ServeMux for frontend files to prevent redirect behavior
- This fixes reverse proxy and Cloudflare tunnel compatibility issues
2025-08-19 18:56:18 +00:00
Pulse Monitor fa48a54aa0 fix: restore Storage and Backups tab functionality for PBS-only setups
- Storage tab now shows PBS storage even without PVE nodes
- Backups tab now shows PBS backups even without PVE nodes
- Empty state message only shows when truly no nodes are configured
- Both tabs remain functional for PBS-only deployments
2025-08-19 17:48:21 +00:00
Pulse Monitor 88141545b5 chore: bump version to v4.5.0-rc.3 2025-08-19 16:42:00 +00:00
Pulse Monitor 8849cceb76 fix: support WebSocket connections through reverse proxies
- Handle X-Forwarded-Proto and X-Forwarded-Host headers in origin check
- Fixes WebSocket connections failing when accessed via reverse proxy
- Addresses #333 where connections broke after v4.3
2025-08-19 16:27:16 +00:00
Pulse Monitor 715efac145 feat: improve empty state UI and enhance network discovery
- Add helpful "No Proxmox VE nodes configured" message to Storage and Backup tabs
- Include "Go to Settings" button for easy navigation when no nodes exist
- Enhance network discovery for Docker environments with smart subnet detection
- Auto-detect Docker network configuration and scan appropriate subnets
- Add support for common Docker network ranges (172.16.0.0/12, 10.0.0.0/8)
- Improve discovery logging to show subnet being scanned
- Fix discovery API endpoint to properly return discovered servers
2025-08-19 16:16:18 +00:00
Pulse Monitor d94d5b53e3 feat: smart network discovery for Docker environments
- Auto-detect Docker environment and scan common home/office subnets
- Scans 192.168.1.0/24, 192.168.0.0/24, 10.0.0.0/24, 192.168.88.0/24, 172.16.0.0/24
- Removes friction - nodes are discovered automatically without configuration
- DISCOVERY_SUBNET env var now optional (only for non-standard networks)
- Update documentation to reflect automatic discovery

This makes the first-run experience much smoother - users see their
Proxmox nodes immediately without having to figure out subnet configuration.
2025-08-19 15:32:26 +00:00
Pulse Monitor f2f42cb0e4 feat: auto-hash plain text credentials from environment variables
- Automatically hash plain text API tokens (SHA3-256) and passwords (bcrypt) when loaded from env vars
- Remove unnecessary PULSE_SETUP_TOKEN feature in favor of simpler env var approach
- Remove HandleInitialSetup endpoint - not needed with env var configuration
- Update authentication to always use hashed comparisons (no plain text warnings)
- Update documentation to clearly explain auto-hashing capability
- Maintain backward compatibility with pre-hashed credentials

This makes Pulse secure by default while keeping deployment simple - users can
provide plain text credentials via environment variables and Pulse automatically
hashes them for security.
2025-08-19 14:58:01 +00:00
Pulse Monitor 2be275f644 fix: theme consistency across login, setup, and dashboard
- Fixed localStorage key mismatch ('dark-mode' vs 'darkMode')
- Added theme selector to setup screen (System/Light/Dark)
- Login and setup screens now respect saved theme preference
- Theme persists correctly across logout/login cycles

addresses #332
2025-08-19 10:43:04 +00:00
Pulse Monitor 86824cd059 feat: add namespace filter hint to backup search placeholder
Make it more discoverable that users can filter backups by PBS namespace
by including namespace:prod example in the search field placeholder
2025-08-19 09:50:02 +00:00
Pulse Monitor 3cd1c58519 improve: clarify Office 365 SMTP authentication requirements
- Update O365 email provider instructions to emphasize App Password requirement
- Add clear steps for generating App Passwords
- Explain that basic auth is deprecated and App Passwords are mandatory
- Add note about work/school account requirements

addresses user reports of O365 SMTP authentication failures
2025-08-19 09:43:05 +00:00
Pulse Monitor ebad4721e8 docs: update configuration documentation for env var precedence
- Clarify that env vars have highest priority and override system.json
- Document UI warning behavior when env vars override settings
- Add FAQ entry for disabled UI fields
- Fix incorrect priority order in CONFIGURATION.md
- Add clear warnings about env var override behavior

This ensures users understand why UI changes might not work when
environment variables are set, and how to resolve the issue.
2025-08-19 09:22:05 +00:00
Pulse Monitor 656163aeaa feat: add UI warnings for environment variable overrides
- Track which settings are overridden by env vars in backend
- Expose env override information in system settings API
- Show clear warnings in UI when settings are controlled by env vars
- Disable input fields when overridden by environment variables
- Add helpful instructions for users to remove env vars if needed

This improves UX by making it clear why UI changes don't take effect
when environment variables are set. Follows container best practices
where env vars have highest precedence, while clearly communicating
this behavior to users.

Addresses user confusion when UI settings don't work due to env var overrides.
2025-08-19 09:04:54 +00:00
Pulse Monitor d2821699e8 docs: clarify environment variable precedence behavior
- Add clear warnings that env vars override UI/system.json settings
- Update log messages to indicate when env vars are overriding values
- Document standard container practice: env vars have highest precedence
- Users must remove env vars to allow UI configuration to take effect

This prevents confusion when UI changes don't work due to env var overrides.
2025-08-19 08:50:36 +00:00
Pulse Monitor 62fd4be5fc fix: restore environment variable support for key settings
- Re-enable DISCOVERY_SUBNET env var for Docker network configuration
- Re-enable LOG_LEVEL env var for runtime logging control
- Re-enable CONNECTION_TIMEOUT env var for timeout configuration
- Re-enable ALLOWED_ORIGINS env var for CORS configuration
- Update documentation to reflect working env vars

These env vars were accidentally disabled but are useful for Docker deployments.
Env vars override system.json settings when present.

Addresses #214 - user requested DISCOVERY_SUBNET env var support
2025-08-19 08:44:18 +00:00
Pulse Monitor d16f2deeb2 fix: remove non-existent PBS Agent references and correct DISCOVERY_SUBNET docs
- Remove all PBS-AGENT.md references (hallucinated feature)
- Fix DISCOVERY_SUBNET env var name in Docker docs (was incorrectly PULSE_DISCOVERY_SUBNET)
- Add DISCOVERY_SUBNET examples to README for Docker users
- Update FAQ to clarify PBS push mode is not supported

Addresses #214 - user reported 404 on PBS-AGENT.md link
2025-08-19 08:30:27 +00:00
Pulse Monitor ce208f59a4 fix: implement secure API token hashing with SHA3-256
- API tokens now hashed before storage (never stored in plain text)
- Raw token shown only once during generation
- Backward compatible with existing plain text tokens
- Added migration warnings for users with plain tokens
- Updated documentation to reflect security improvements
2025-08-19 08:10:37 +00:00
Pulse Monitor a78d527fed docs: update documentation for v4.5.0 release cycle 2025-08-18 22:28:49 +00:00
Pulse Monitor 81ff5d0a1e chore: bump version to v4.5.0-rc.2 2025-08-18 22:23:21 +00:00
Pulse Monitor c42eb1429f fix: restore universal tarball structure with pulse wrapper script
addresses #330 - universal tarball now includes pulse detection script at bin/pulse
2025-08-18 22:22:17 +00:00
Pulse Monitor 9959378e47 fix: remove non-existent PBS push mode feature from README
The PBS push mode/agent feature was never actually implemented in v4.
This was documentation for a planned feature that doesn't exist.
Removed PBS-AGENT.md correctly as the feature isn't present in the codebase.
2025-08-18 22:04:23 +00:00
Pulse Monitor b21e0e7183 docs: clean up documentation directory
- Remove outdated UPGRADE_NOTICE_v4.3.9.md (we're on v4.5.0 now)
- Remove PBS-AGENT.md (feature doesn't exist in v4)
- Keep SCREENSHOTS.md as it provides gallery view of features

Remaining docs are all essential:
- API, CONFIGURATION, DOCKER - core documentation
- REVERSE_PROXY - critical for WebSocket setup
- SECURITY, TROUBLESHOOTING - important operational docs
- WEBHOOKS - feature documentation
- FAQ - quick answers, different from troubleshooting guide
- MIGRATION - still relevant for users upgrading
2025-08-18 22:01:42 +00:00
Pulse Monitor d26599e505 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
Pulse Monitor 976217b065 chore: bump version to v4.5.0-rc.1 2025-08-18 20:34:34 +00:00
Pulse Monitor 002df44d11 fix: enforce dark mode for pre-auth screens
addresses #332 - login and setup screens now consistently use dark mode, with theme preferences only applied after authentication
2025-08-18 20:33:19 +00:00
Pulse Monitor e9187e5986 fix: backup frequency chart now respects PBS instance and advanced filters
- Apply same advanced filtering logic to chart as table
- Chart now properly filters when PBS instance selected via node: filter
- Remove duplicate PBS instance filtering code (now handled by search)
- Consistent filtering behavior between table and chart
2025-08-18 19:47:54 +00:00
Pulse Monitor fcfcdea07c feat: enhance backup search with advanced filtering like Dashboard
- Add parseFilterStack support to Backups tab for advanced filtering
- Support field-specific filters: vmid:, node:, type:, storage:, datastore:, namespace:
- Support comparison operators: size>1GB for backup size filtering
- Support boolean fields: verified:true, protected:true for PBS backups
- Add search help tooltip with backup-specific filter examples
- Update placeholder text to show relevant backup search examples
- Make searchQuery utils generic to work with any data type, not just VM/Container
- Backups tab now has same powerful search capabilities as Dashboard
2025-08-18 17:54:54 +00:00
Pulse Monitor 72f0b4a8f1 cleanup: remove redundant filter status messages
- Remove 'Showing guests for node' message in Dashboard
- Remove 'Showing only backups from PBS' message in Backups
- Filter section already shows 'Active' badge when filters applied
- Cleaner UI without duplicate information
2025-08-18 17:48:24 +00:00
Pulse Monitor 67c4122f95 refactor: use search field for node/PBS filtering instead of duplicate logic
- Replace separate selectedNode/selectedPBSInstance state with search-based filtering
- Add node: prefix to search when node/PBS cards clicked
- Lock search field (greyed out) when auto-populated from node selection
- Reuse existing search filter logic instead of duplicating filtering code
- Clear node filter updates search field instead of separate state
- Much cleaner implementation leveraging existing search capabilities
2025-08-18 17:45:02 +00:00
Pulse Monitor 2f8b176d80 fix: apply PBS instance filter to backup frequency chart 2025-08-18 17:35:07 +00:00
Pulse Monitor 8dd724414e feat: add node card selection with content filtering
- Make PVE node cards and PBS cards selectable in Dashboard and Backups tabs
- Auto-filter to 'remote' backups when PBS instance selected
- Filter backups by selected PBS instance name
- Disable backup type filter buttons when PBS selected
- Visual feedback with blue ring on selected cards
2025-08-18 17:32:36 +00:00
Pulse Monitor 681d91daf9 fix: PBS node stats now work correctly
- Fixed PBS API endpoint to use /nodes/localhost/status directly
- PBS always uses 'localhost' as the node name, not dynamic discovery
- Updated PBSCard to properly detect Docker instances by name
- Improved display for PBS instances without Sys.Audit permission
- PBS instances now correctly show CPU, memory, and uptime when available
2025-08-18 16:36:10 +00:00
Pulse Monitor 2c54a8131d fix: show red indicator for offline nodes instead of grey
addresses #331 - offline PVE/PBS nodes now display red status dots
instead of grey ones for better visual clarity
2025-08-18 15:49:43 +00:00
Pulse Monitor a064f2f006 feat: add HTTPS/TLS support via environment variables
- Add HTTPS_ENABLED, TLS_CERT_FILE, TLS_KEY_FILE environment variables
- Server automatically starts in HTTPS mode when configured
- Falls back to HTTP with warning if certs missing
- WebSocket origins automatically adjust for HTTPS
- Fully backward compatible - defaults to HTTP
- Documented in README and CONFIGURATION.md

Addresses kenrmayfield's request for HTTPS support
2025-08-18 15:29:37 +00:00
Pulse Monitor 78fab8bb8f feat: add PBS system stats display (addresses #259)
- Grant enhanced Audit permissions to PBS tokens for system stats access
- Create PBSCard component to display CPU, memory, disk, uptime metrics
- Detect Docker PBS instances and show appropriate info without stats
- Add adaptive node layout on dashboard for better scalability
- Move PBS status card to Backups tab above frequency chart
- Create CompactNodeCard for handling many nodes efficiently
- Update PBS setup script to grant Audit role to both user and token

This addresses the request in issue #259 to show PBS system stats on the dashboard.
The implementation uses read-only Audit permissions to access the /nodes endpoint
while maintaining security. Docker PBS instances are detected and handled gracefully
since they cannot provide host system statistics.
2025-08-18 15:08:04 +00:00
Pulse Monitor 11dccd84f9 refactor: use centralized apiFetch for consistent authentication handling
Replace direct fetch() calls with apiFetch() utility which:
- Automatically includes credentials for session cookies
- Adds proper headers to prevent browser auth popups
- Handles CSRF tokens and authentication consistently
- Provides retry logic for CSRF token failures
2025-08-18 13:02:16 +00:00
Pulse Monitor 8b7a926911 fix: maintain bin/ directory structure in universal tarball (addresses #330)
The universal tarball (pulse-vX.X.X.tar.gz) now places binaries in bin/ subdirectory
to match the structure of architecture-specific tarballs. This fixes manual extraction
issues while maintaining compatibility with all installation methods.
2025-08-18 13:01:26 +00:00
Pulse Monitor 32d1007284 fix: ensure pulse user is created during updates
- Add create_user() call to update flow (option 1)
- Add create_user() call to reinstall flow (option 2)
- Fixes 'chown: invalid user: pulse:pulse' error on older installations
- Ensures smooth migration from root/other users to pulse user
2025-08-18 10:19:52 +00:00
Pulse Monitor 0a8b54ac99 chore: bump version to v4.4.1-rc.1 2025-08-18 09:58:29 +00:00
Pulse Monitor 496f0ee3a5 fix: prevent syslog spam on standalone Proxmox nodes
- Only check cluster status during initial configuration, not during polling
- Cache cluster membership in config to avoid repeated API calls
- Skip cluster/resources endpoint entirely for standalone nodes
- Change cluster detection failure from WARN to DEBUG (expected for standalone)

This addresses #322 where standalone PVE nodes were causing certificate
lookup errors in syslog every minute during polling.
2025-08-18 09:43:04 +00:00
Pulse Monitor 9f0b7e8cba fix: correctly place Backup & Restore section in System tab
- Previously placed in Diagnostics tab by mistake
- Now properly positioned in System tab after Updates section
- Maintains all existing functionality
2025-08-18 09:10:29 +00:00
Pulse Monitor cbb0e2c334 move Backup & Restore section from Security to System tab
- Relocated backup/restore functionality to System tab for better UX
- Updated text from 'Security Notice' to 'Important Notes'
- Maintains all existing functionality
2025-08-18 08:49:08 +00:00
Pulse Monitor 9b71d27208 remove 12 character minimum requirement for export passphrase
Users can choose their own passphrase length without being forced to use 12+ characters
2025-08-18 08:39:39 +00:00
Pulse Monitor fd30914e48 fix: persist dark mode preference from setup to login screen
Fixed localStorage key mismatch - setup was saving to 'dark-mode' while login was looking for 'darkMode'
2025-08-18 08:35:27 +00:00
Pulse Monitor 6ff144f445 fix: add confirmation requirement for node connectivity alerts
Requires 3 consecutive offline polls (~15 seconds) before triggering connectivity alerts to prevent false positives from transient cluster communication issues
2025-08-18 07:57:58 +00:00
Pulse Monitor 9969c53101 fix: add missing Type field when creating VMs/containers from cluster resources
addresses #329 - VMs were being displayed as LXC containers because the Type field wasn't being set when using the efficient cluster/resources polling method
2025-08-18 07:46:35 +00:00