mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-18 00:26:51 +00:00
70b838a0c5
CRITICAL FIX: Parse endpoint was marking ALL existing entities as UPDATE, even when no field values changed. ROOT CAUSE: - /parse-bulk endpoint only checked if entity exists in database - If exists → _isUpdate = true (ALWAYS) - Never compared field values to detect actual changes SOLUTION: Backend (config.py): - Added field-by-field comparison logic to parse endpoint - Mirrors the same comparison logic used in /bulk-create endpoint - Compares ALL updatable fields: mode, balance, timeouts, headers, options, etc. - Only sets _isUpdate = true if at least one field has changed - Inactive entities being reactivated also count as changes Frontend (BulkConfigImport.js): - Changed status render for better UX clarity - Before: _isUpdate=false showed '-' (confusing) - After: Shows 'NO CHANGES' tag with tooltip explanation - Applied to both frontend and backend tables BEHAVIOR NOW: 1. Parse config → Compare with DB 2. If identical → Status: NO CHANGES (gray tag) 3. If different → Status: UPDATE (orange tag) 4. If new → Status: NEW (green tag) 5. Confirm & Create → Only applies actual changes USER EXPERIENCE: ✅ First bulk import: Shows NEW or UPDATE correctly ✅ Apply changes ✅ Re-import same config: Shows NO CHANGES (not UPDATE) ✅ Clear visual feedback on what will actually change Impact: Users can now trust bulk import preview. No more false positives for updates.