mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 11:13:26 +00:00
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
This commit is contained in:
@@ -27,11 +27,11 @@ npm ci
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
# Copy frontend to api directory for embedding
|
||||
echo "Copying frontend for embedding..."
|
||||
sudo rm -rf internal/api/frontend-modern
|
||||
sleep 1 # Give filesystem time to sync
|
||||
cp -r frontend-modern internal/api/
|
||||
# Copy frontend dist for embedding (required for Go embed)
|
||||
echo "Copying frontend dist for embedding..."
|
||||
rm -rf internal/api/frontend-modern
|
||||
mkdir -p internal/api/frontend-modern
|
||||
cp -r frontend-modern/dist internal/api/frontend-modern/
|
||||
|
||||
# Build for different architectures
|
||||
declare -A builds=(
|
||||
|
||||
+4
-1
@@ -98,12 +98,15 @@ echo "Starting backend on port 7656..."
|
||||
cd /opt/pulse
|
||||
echo "Building backend (API-only mode for development)..."
|
||||
# Always rebuild in dev mode to ensure we have the right build
|
||||
echo "Building with PULSE_MOCK_MODE=${PULSE_MOCK_MODE}"
|
||||
go build -tags "dev" -o pulse ./cmd/pulse
|
||||
# Export all PULSE_MOCK_* variables for the backend
|
||||
export PULSE_MOCK_MODE PULSE_MOCK_NODES PULSE_MOCK_VMS_PER_NODE PULSE_MOCK_LXCS_PER_NODE PULSE_MOCK_RANDOM_METRICS PULSE_MOCK_STOPPED_PERCENT
|
||||
# Export auth variables if set
|
||||
export PULSE_AUTH_USER PULSE_AUTH_PASS
|
||||
PORT=7656 ./pulse &
|
||||
# Export PORT as well
|
||||
export PORT=7656
|
||||
./pulse &
|
||||
BACKEND_PID=$!
|
||||
|
||||
# Wait for backend to start
|
||||
|
||||
Reference in New Issue
Block a user