From 68a9f3579750d05b687fddb555f64e211f33d2f6 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Fri, 26 Dec 2025 20:59:41 +0100 Subject: [PATCH] fix: correct CSS path from system-hub to secubox in view files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed HTTP 404 errors for common.css in secubox monitoring and settings pages Problem: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - monitoring.js and settings.js were loading 'system-hub/common.css' - This file doesn't exist (404 Not Found) - Error: GET http://192.168.8.191/luci-static/resources/system-hub/common.css [404] - Pages loaded but with missing styles Solution: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Changed CSS path to correct module resource: - FROM: L.resource('system-hub/common.css') - TO: L.resource('secubox/common.css') This references the secubox module's own common.css file which exists at: /www/luci-static/resources/secubox/common.css Files Fixed: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. luci-app-secubox/htdocs/luci-static/resources/view/secubox/monitoring.js Line 79: system-hub/common.css → secubox/common.css 2. luci-app-secubox/htdocs/luci-static/resources/view/secubox/settings.js Line 25: system-hub/common.css → secubox/common.css CSS Loading Order (Correct): ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. secubox/common.css ← Fixed (was system-hub/common.css) 2. secubox/secubox.css ← Already correct 3. secubox/monitoring.css ← Module-specific (monitoring page only) Testing: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅ Deployed to router ✅ Permissions fixed (644) ✅ Cache cleared ✅ Services restarted Test URLs: - Monitoring: https://192.168.8.191/cgi-bin/luci/admin/secubox/monitoring/overview - Settings: https://192.168.8.191/cgi-bin/luci/admin/secubox/settings Expected Result: ✅ No 404 errors in browser console ✅ All styles load correctly ✅ Pages render with proper theming Root Cause: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Copy-paste error from system-hub module templates. These view files were likely created using system-hub as a reference and the CSS path wasn't updated to match the secubox module structure. Related: - secubox/common.css exists and has correct permissions (644) - No changes needed to CSS file itself - Only view file CSS references needed correction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .../htdocs/luci-static/resources/view/secubox/monitoring.js | 2 +- .../htdocs/luci-static/resources/view/secubox/settings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-secubox/htdocs/luci-static/resources/view/secubox/monitoring.js b/luci-app-secubox/htdocs/luci-static/resources/view/secubox/monitoring.js index c0b1b39f..ab75d3bc 100644 --- a/luci-app-secubox/htdocs/luci-static/resources/view/secubox/monitoring.js +++ b/luci-app-secubox/htdocs/luci-static/resources/view/secubox/monitoring.js @@ -76,7 +76,7 @@ return view.extend({ render: function(data) { var self = this; var container = E('div', { 'class': 'secubox-monitoring-page' }, [ - E('link', { 'rel': 'stylesheet', 'href': L.resource('system-hub/common.css') }), + E('link', { 'rel': 'stylesheet', 'href': L.resource('secubox/common.css') }), E('link', { 'rel': 'stylesheet', 'href': L.resource('secubox/secubox.css') }), E('link', { 'rel': 'stylesheet', 'href': L.resource('secubox/monitoring.css') }) ]); diff --git a/luci-app-secubox/htdocs/luci-static/resources/view/secubox/settings.js b/luci-app-secubox/htdocs/luci-static/resources/view/secubox/settings.js index de93fd24..ed728beb 100644 --- a/luci-app-secubox/htdocs/luci-static/resources/view/secubox/settings.js +++ b/luci-app-secubox/htdocs/luci-static/resources/view/secubox/settings.js @@ -22,7 +22,7 @@ return view.extend({ // Create wrapper container with modern header var container = E('div', { 'class': 'secubox-settings-page' }, [ - E('link', { 'rel': 'stylesheet', 'href': L.resource('system-hub/common.css') }), + E('link', { 'rel': 'stylesheet', 'href': L.resource('secubox/common.css') }), E('link', { 'rel': 'stylesheet', 'href': L.resource('secubox/secubox.css') }), // Modern header