Files
haproxy-openmanager/backend
taylanbakircioglu 4c9ee88549 feat: Add field-level change visualization in bulk import preview
UX IMPROVEMENT: Users can now see exactly what changed in existing entities.

BACKEND CHANGES (config.py):
- Parse endpoint now tracks field-level changes for frontends and backends
- Added '_changes' object to each entity containing old vs new values
- Format: { 'field_name': { 'old': value, 'new': value } }
- Applied to ALL updatable fields:
  * Frontend: bind_address, bind_port, mode, timeouts, headers, options, etc.
  * Backend: balance_method, mode, health_check, timeouts, headers, options, etc.
- Only includes fields that actually changed (empty object if no changes)

FRONTEND CHANGES (BulkConfigImport.js):
- Created FieldChange component for visual diff display
- Shows old value (strikethrough, red) vs new value (green highlight)
- Badge indicators: 'NEW' (green) or 'CHANGED' (orange)
- Applied to multi-line text fields:
  * Backend Options
  * Request Headers
  * Response Headers
  * Frontend Options
  * TCP Request Rules

UI DESIGN:
┌─────────────────────────────────────────────────┐
│ Backend Options              [NEW] ← Badge      │
├─────────────────────────────────────────────────┤
│ ┌─────────────────────────────────────────────┐ │
│ │ Old: (crossed out, red background)          │ │
│ │ null                                        │ │
│ └─────────────────────────────────────────────┘ │
│ ┌─────────────────────────────────────────────┐ │
│ │ New: (green background)                     │ │
│ │ option http-keep-alive                      │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────┘

EXAMPLE SCENARIOS:

Scenario 1: New field added (like user's example)
- Backend: Elasticsearch
- Field: options
- Old: null → shown as red box with 'null' (crossed out)
- New: 'option http-keep-alive' → shown in green box
- Badge: 'NEW' (green)

Scenario 2: Existing field changed
- Backend: Elasticsearch
- Field: timeout_server
- Old: 30000 → shown in red box (crossed out)
- New: 60000 → shown in green box
- Badge: 'CHANGED' (orange)

Scenario 3: Multi-line text modified
- Backend: Elasticsearch
- Field: request_headers
- Old: 3 lines → shown in red box (all 3 lines crossed out)
- New: 5 lines → shown in green box (all 5 lines)
- Badge: 'CHANGED' (orange)
- Diff is clearly visible line by line

USER EXPERIENCE:
 Clear visual feedback: What was there before
 Clear visual feedback: What will be applied
 Color coding: Red (removed) → Green (added)
 Badge indicators: NEW vs CHANGED
 Works for multi-line content (preserves formatting)
 Only shows diff for fields that actually changed
 Parse preview now matches Apply Management diff view

Impact: Users can confidently review and approve bulk imports with full visibility into changes.
2025-11-13 10:12:30 +03:00
..
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00