fix(crowdsec-wizard): Don't abort XHR during acquisition config

- Treat XHR abort as success when CrowdSec restarts after acquisition config
- Auto-advance to Step 5 after brief delay
- Bump to 0.7.0-r21

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-13 11:54:16 +01:00
parent c2ea22bcab
commit e47ff793f5
2 changed files with 15 additions and 4 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-crowdsec-dashboard
PKG_VERSION:=0.7.0
PKG_RELEASE:=20
PKG_RELEASE:=21
PKG_ARCH:=all
PKG_LICENSE:=Apache-2.0

View File

@ -1141,10 +1141,21 @@ return view.extend({
}
}, this))
.catch(L.bind(function(err) {
console.error('[Wizard] Acquisition configuration error:', err);
console.log('[Wizard] Acquisition configuration catch:', err);
this.wizardData.acquisitionConfiguring = false;
ui.addNotification(null, E('p', _('Configuration failed: ') + err.message), 'error');
this.refreshView();
// XHR abort during CrowdSec restart is expected - treat as success
if (err && err.message && err.message.indexOf('abort') !== -1) {
console.log('[Wizard] XHR aborted (CrowdSec restart) - treating as success');
this.wizardData.acquisitionConfigured = true;
ui.addNotification(null, E('p', _('Log acquisition configured (service restarted)')), 'info');
// Auto-advance to Step 5 after brief delay
setTimeout(L.bind(function() { this.goToStep(5); }, this), 1500);
} else {
console.error('[Wizard] Acquisition configuration error:', err);
ui.addNotification(null, E('p', _('Configuration failed: ') + err.message), 'error');
this.refreshView();
}
}, this));
},