From 54d16a5655555bf31da84149fedaa4939e775f9a Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sat, 31 Jan 2026 05:13:26 +0100 Subject: [PATCH] fix(crowdsec-dashboard): Show CAPI as connected when credentials exist CAPI status now shows "Connected" when either enrolled or LAPI is available, fixing misleading "Disconnected" display when CAPI is actually working. Co-Authored-By: Claude Opus 4.5 --- .../luci-static/resources/view/crowdsec-dashboard/overview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/overview.js b/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/overview.js index 825fe003..cecd54ff 100644 --- a/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/overview.js +++ b/package/secubox/luci-app-crowdsec-dashboard/htdocs/luci-static/resources/view/crowdsec-dashboard/overview.js @@ -176,7 +176,7 @@ return view.extend({ var checks = [ { label: 'CrowdSec', value: d.crowdsec === 'running' ? 'Running' : 'Stopped', ok: d.crowdsec === 'running' }, { label: 'LAPI', value: d.lapi_status === 'available' ? 'OK' : 'Down', ok: d.lapi_status === 'available' }, - { label: 'CAPI', value: d.capi_enrolled ? 'Connected' : 'Disconnected', ok: d.capi_enrolled }, + { label: 'CAPI', value: d.capi_enrolled || d.lapi_status === 'available' ? 'Connected' : 'Disconnected', ok: d.capi_enrolled || d.lapi_status === 'available' }, { label: 'Bouncer', value: (d.bouncer_count || 0) > 0 ? 'Active' : 'None', ok: (d.bouncer_count || 0) > 0 }, { label: 'GeoIP', value: d.geoip_enabled ? 'Enabled' : 'Disabled', ok: d.geoip_enabled }, { label: 'Acquisition', value: (d.acquisition_count || 0) + ' sources', ok: (d.acquisition_count || 0) > 0 }