Commit Graph

7 Commits

Author SHA1 Message Date
666ad23767 feat: Add SecuBox portal header to luci-app-secubox views
- Added SbHeader require and wrapper pattern to all 11 view files
- All views now display SecuBox portal header for consistent navigation
- Maintains existing SecuNav tabs for internal navigation

Views updated:
- dashboard.js
- alerts.js
- apps.js
- modules.js
- modules-debug.js
- modules-minimal.js
- dev-status.js
- settings.js
- help.js
- wizard.js
- monitoring.js

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:28:04 +01:00
dd588e0520 fix(secubox): complete LuCI interface fixes - all views now functional
Fixed 5 major issues in SecuBox LuCI interface:

1. AppStore Empty (secubox-core v0.8.0-r3)
   - Simplified get_appstore_apps RPCD method
   - Removed complex error handling that was failing silently
   - Added catalog.json (38 KB, 37 plugins) to Makefile installation
   - Result: AppStore now displays 37 plugins in 8 categories

2. Dashboard/Components Empty (secubox-core v0.8.0-r3)
   - Implemented 3 new RPCD methods:
     * get_dashboard_data - Module counts and system uptime
     * get_system_health - CPU, memory, disk metrics with health score
     * get_alerts - System threshold alerts
   - Result: Dashboard shows health score 93/100, system metrics

3. Modules View Empty (luci-app-secubox v0.7.1-r1)
   - Fixed API method name mismatches in api.js:
     * modules → getModules
     * status → getStatus
     * module_info → getModuleInfo
     * health → getHealth
   - Updated ACL with all new RPCD method names
   - Added debug logging to modules.js
   - Removed conflicting config files
   - Result: 61 modules displayed with working filters

4. System Hub Components Empty (luci-app-system-hub v0.5.1-r3)
   - Fixed RPCD backend call: modules → getModules
   - Updated ACL to allow new SecuBox method names
   - Result: 61 components displayed

5. Catalog/Profile/Template Files
   - Added 39 individual plugin catalog files
   - Added 5 profile JSON files (enterprise, home-office, etc.)
   - Added 2 template files (firewall-zone, nginx-vhost)
   - Updated Makefile to install all catalog files

Version bumps:
- secubox-core: 0.8.0-r1 → 0.8.0-r3
- luci-app-secubox: 0.7.0-r6 → 0.7.1-r1
- luci-app-system-hub: 0.5.1-r2 → 0.5.1-r3

Files modified: 13 modified, 46 added, 2 deleted
Lines of code: ~300+ added
RPCD methods: 3 added, 5 fixed
ACL files: 2 updated

Status: Production ready - all backend tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 18:30:58 +01:00
e2c2f64167 feat(secubox): implement conditional debug logging
Added debugMode flag that checks URL hash or localStorage setting.
Debug logging only outputs when enabled via:
- URL: /#/admin/secubox/apps#debug
- Console: localStorage.setItem('secubox_debug', 'true')

All debug logs prefixed with [AppStore] or [Modules] for clarity.
Warnings and errors remain in production for critical issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 11:59:35 +01:00
60ff5ad3f1 feat(secubox): add close button to app details modal
Added a modal footer with a Close button in the app details view.
The footer includes:
- Styled separator line with border-top
- Right-aligned Close button
- Calls ui.hideModal() on click

This provides a clear way to dismiss the modal without needing to
click outside or use the escape key.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 11:55:54 +01:00
f08d28d70b fix(secubox): correct RPC expect parameter for getAppstoreApps
Fixed appstore showing "No applications match the selected filter" by correcting
the RPC declaration expect parameter.

Issue: The RPC declaration had:
  expect: { apps: [], categories: {} }

This caused the RPC framework to return only the apps array instead of the full
response object, resulting in:
  - data = Array(5) instead of { apps: [...], categories: {...} }
  - data.apps = undefined
  - data.categories = undefined

Fix: Changed to:
  expect: { }

This returns the full response object as-is from the backend, allowing proper
access to both data.apps and data.categories properties.

Also added extensive debug logging to troubleshoot the data flow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 11:51:13 +01:00
bd032be85f fix(secubox): resolve race condition in appstore and modules data loading
Fixed issue where first page load would show empty apps/modules list, requiring
a refresh to display data.

Changes:
- Added error handling in refreshData() for both apps.js and modules.js
- Added null/empty data checks before storing results
- Fixed render() to use data parameter first, then fallback to cached instance data
- Added console logging for debugging empty responses
- Added user-friendly error notifications when API calls fail

The render function now properly uses:
  var apps = (data && data.apps) || this.appsData || [];
  var modules = (data && data.modules) || this.modulesData || [];

This ensures the data passed from load() is used on first render, preventing
the empty state on initial page load.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 11:48:18 +01:00
280dd91798 release: bump secubox hub to 0.6.1-0 2025-12-30 14:42:45 +01:00