fix: Read status from data parameter in wizard step 1 (v0.6.0-r5)
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 <noreply@anthropic.com>
This commit is contained in:
parent
4c0ab93284
commit
aefc6e5265
@ -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
|
||||
|
||||
@ -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')),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user