mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-19 16:27:37 +00:00
- Create shared NodeGroupHeader component to eliminate code duplication - Replace vertical line indicator with circular dot matching guest rows - Update online indicator to use bg-green-500 (matching guest indicators) - Reduce node row padding from py-2 to py-1 for more compact layout - Set background to dark:bg-gray-900 to match search bar styling - Apply changes consistently across Dashboard and Storage tabs
2.1 KiB
2.1 KiB
Development Quick Start
Hot-Reload Development Mode
Start the development environment with hot-reload:
./scripts/hot-dev.sh
This starts:
- Backend API on port 7656
- Frontend on port 7655 with hot-reload
- Both backend and frontend automatically reload on code changes
Access the app at: http://localhost:7655 or http://192.168.0.123:7655
Toggle Between Mock and Production Data
Switch modes seamlessly without manually restarting services:
# Enable mock mode (test with fake data)
npm run mock:on
# Disable mock mode (use real Proxmox nodes)
npm run mock:off
# Check current mode
npm run mock:status
# Edit mock configuration
npm run mock:edit
Or use the script directly:
./scripts/toggle-mock.sh on # Enable mock mode
./scripts/toggle-mock.sh off # Disable mock mode (use production data)
./scripts/toggle-mock.sh status # Show current status
The toggle script automatically:
- Updates
mock.envconfiguration - Restarts the backend with new settings
- Keeps the frontend running (no restart needed)
- Syncs production config when switching to production mode
Mock Mode Configuration
Edit mock.env to customize mock data:
PULSE_MOCK_MODE=false # Enable/disable mock mode
PULSE_MOCK_NODES=7 # Number of mock nodes
PULSE_MOCK_VMS_PER_NODE=5 # Average VMs per node
PULSE_MOCK_LXCS_PER_NODE=8 # Average containers per node
PULSE_MOCK_RANDOM_METRICS=true # Enable metric fluctuations
PULSE_MOCK_STOPPED_PERCENT=20 # Percentage of stopped guests
Development Workflow
- Start hot-dev:
./scripts/hot-dev.sh - Switch to mock mode for testing:
npm run mock:on - Develop and test your changes
- Switch to production mode to verify:
npm run mock:off - Code changes auto-reload, no manual restarts needed!
Troubleshooting
If the backend doesn't pick up changes:
npm run mock:off # Force restart with production data
npm run mock:on # Force restart with mock data
Check backend logs:
tail -f /tmp/pulse-backend.log
Check if services are running:
lsof -i :7656 # Backend
lsof -i :7655 # Frontend