From aefc6e526591d25b3a57ed7af16c6b423d74cf46 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Wed, 7 Jan 2026 09:05:34 +0100 Subject: [PATCH] fix: Read status from data parameter in wizard step 1 (v0.6.0-r5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix Next button remaining disabled despite correct status: - Change renderStep1 to read from data parameter instead of wizardData - Read status.crowdsec and status.lapi_status from passed data - Ensures button state reflects actual API response Issue: Next button not clickable even with LAPI available Cause: renderStep1 reading from stale wizardData instead of fresh data Solution: Read from data parameter passed by render() Frontend Changes: - htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js - renderStep1: Read from data.status instead of this.wizardData - Extract crowdsecRunning and lapiAvailable from data parameter Version: 0.6.0-5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- package/secubox/luci-app-crowdsec-dashboard/Makefile | 2 +- .../luci-static/resources/view/crowdsec-dashboard/wizard.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package/secubox/luci-app-crowdsec-dashboard/Makefile b/package/secubox/luci-app-crowdsec-dashboard/Makefile index 783ab5a1..77818134 100644 --- a/package/secubox/luci-app-crowdsec-dashboard/Makefile +++ b/package/secubox/luci-app-crowdsec-dashboard/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-crowdsec-dashboard PKG_VERSION:=0.6.0 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_ARCH:=all PKG_LICENSE:=Apache-2.0 diff --git a/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js b/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js index b71a3b0f..3631fb62 100644 --- a/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js +++ b/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js @@ -137,8 +137,9 @@ return view.extend({ }, renderStep1: function(data) { - var crowdsecRunning = this.wizardData.crowdsecRunning; - var lapiAvailable = this.wizardData.lapiAvailable; + var status = data ? data.status : {}; + var crowdsecRunning = status && status.crowdsec === 'running'; + var lapiAvailable = status && status.lapi_status === 'available'; return E('div', { 'class': 'wizard-step' }, [ E('h2', {}, _('Welcome to CrowdSec Setup')),