Fix 'No related RPC reply' errors by wrapping RPC calls in L.resolveDefault()
to provide fallback values when backend methods aren't available yet.
## Problem
When new LuCI views are deployed before backend packages, RPC calls fail with:
Error: No related RPC reply
This happens because:
- Frontend (luci-app-secubox-admin) calls check_updates, get_catalog_sources
- Backend (secubox-core) hasn't been deployed yet with new RPCD methods
- RPCD returns no reply, causing frontend to crash
## Solution
Wrap all new RPC calls in L.resolveDefault() with sensible fallbacks:
**catalog-sources.js**:
- getCatalogSources() → fallback: { sources: [] }
- checkUpdates() → fallback: { updates: [] }
**updates.js**:
- checkUpdates() → fallback: { updates: [] }
This allows pages to load gracefully with empty data instead of crashing.
## Benefits
1. **Graceful degradation**: Pages load even without backend
2. **Deployment flexibility**: Can deploy frontend before backend
3. **Better UX**: Shows 'No updates' / 'No sources' instead of errors
4. **Production-ready**: Handles missing backends in production
## Testing
Before backend deployment:
- Catalog Sources page shows: 'No sources configured'
- Updates page shows: 'All applications are up to date'
After backend deployment:
- Pages populate with real data from RPCD
Incremented PKG_RELEASE: 4 → 5
19 lines
524 B
Makefile
19 lines
524 B
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=luci-app-secubox-admin
|
|
PKG_VERSION:=1.0.0
|
|
PKG_RELEASE:=5
|
|
PKG_LICENSE:=MIT
|
|
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
|
|
|
|
LUCI_TITLE:=LuCI SecuBox Admin Control Center
|
|
LUCI_DEPENDS:=+luci-base +luci-app-secubox +rpcd +secubox-core
|
|
LUCI_DESCRIPTION:=Unified admin control center for SecuBox appstore plugins with system monitoring
|
|
LUCI_PKGARCH:=all
|
|
|
|
# This is free software, licensed under the MIT License
|
|
|
|
include $(TOPDIR)/feeds/luci/luci.mk
|
|
|
|
# call BuildPackage - OpenWrt buildroot
|