This commit is contained in:
CyberMind-FR 2025-12-26 16:11:20 +01:00
parent 5902ac500a
commit bb795c8516
7 changed files with 383 additions and 1 deletions

View File

@ -54,7 +54,53 @@
"Bash(timeout 5 ./secubox-tools/validate-modules.sh:*)", "Bash(timeout 5 ./secubox-tools/validate-modules.sh:*)",
"Bash(tree:*)", "Bash(tree:*)",
"Bash(for file in luci-app-ksm-manager/htdocs/luci-static/resources/view/ksm-manager/*.js luci-app-ksm-manager/htdocs/luci-static/resources/ksm-manager/api.js)", "Bash(for file in luci-app-ksm-manager/htdocs/luci-static/resources/view/ksm-manager/*.js luci-app-ksm-manager/htdocs/luci-static/resources/ksm-manager/api.js)",
"Bash(git show:*)" "Bash(git show:*)",
"Bash(for module in luci-app-*/root/usr/share/luci/menu.d/*.json)",
"Bash(do if [ -f $module ])",
"Bash(then echo '=== $\\(basename $module\\) ===' jq -r \".[\"\"admin/secubox\"\"] // empty | keys[]\" $module)",
"Bash(for category in security monitoring network system services)",
"Bash(do echo \"=== admin/secubox/$category ===\" grep -h \"\"\"admin/secubox/$category/\" luci-app-*/root/usr/share/luci/menu.d/*.json)",
"Bash(pgrep:*)",
"Bash(git rev-parse:*)",
"Bash(ping:*)",
"Bash(timeout 5 curl:*)",
"Bash(gh run list:*)",
"Bash(for dir in luci-app-*/)",
"Bash(do if [ -f \"$dir/Makefile\" ])",
"Bash(then if ! grep -q \"include.*luci.mk\" \"$dir/Makefile\")",
"Bash(fi)",
"Bash(gh workflow run:*)",
"Bash(curl:*)",
"Bash(sudo apt-get install:*)",
"Bash(/tmp/deploy-system-hub.sh)",
"Bash(ssh:*)",
"Bash(timeout 10 ./secubox-tools/validate-modules.sh:*)",
"Bash(scp:*)",
"Bash(./deploy-theme-system.sh)",
"Bash(for file in health.js services.js logs.js backup.js components.js remote.js settings.js diagnostics.js)",
"Bash(if [ -f \"$file\" ])",
"Bash(then)",
"Bash(if ! grep -q \"system-hub/theme\" \"$file\")",
"Bash(for file in services.js logs.js backup.js components.js remote.js settings.js diagnostics.js)",
"Bash(do if [ -f \"$file\" ])",
"Bash(then head -10 \"$file\")",
"Bash(./deploy-beta-release.sh:*)",
"Bash(./deploy-v0.1.1.sh:*)",
"Bash(luci-app-secubox/Makefile )",
"Bash(luci-app-secubox/htdocs/luci-static/resources/secubox/*.css)",
"Bash(luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js )",
"Bash(luci-app-secubox/htdocs/luci-static/resources/view/secubox/*.js)",
"Bash(luci-app-secubox/root/usr/libexec/rpcd/luci.secubox )",
"Bash(luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json )",
"Bash(luci-app-system-hub/Makefile )",
"Bash(luci-app-system-hub/README.md )",
"Bash(luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js )",
"Bash(luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css )",
"Bash(luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js )",
"Bash(luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/*.js)",
"Bash(luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub )",
"Bash(luci-app-system-hub/root/usr/share/rpcd/acl.d/luci-app-system-hub.json )",
"Bash(LUCI_DEVELOPMENT_REFERENCE.md)"
] ]
} }
} }

85
deploy-beta-release.sh Executable file
View File

@ -0,0 +1,85 @@
#!/bin/bash
# Deploy SecuBox and System Hub v1.0.0-beta with unified theme system
ROUTER="root@192.168.8.191"
echo "🚀 Deploying SecuBox + System Hub v1.0.0-beta to $ROUTER"
echo ""
echo "📦 Deploying SecuBox v1.0.0-beta..."
# Deploy SecuBox RPCD backend
scp luci-app-secubox/root/usr/libexec/rpcd/luci.secubox \
"$ROUTER:/usr/libexec/rpcd/"
# Deploy SecuBox ACL
scp luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json \
"$ROUTER:/usr/share/rpcd/acl.d/"
# Deploy SecuBox API
scp luci-app-secubox/htdocs/luci-static/resources/secubox/api.js \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy SecuBox theme manager
scp luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy SecuBox CSS
scp luci-app-secubox/htdocs/luci-static/resources/secubox/secubox.css \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy ALL SecuBox views
scp luci-app-secubox/htdocs/luci-static/resources/view/secubox/*.js \
"$ROUTER:/www/luci-static/resources/view/secubox/"
echo ""
echo "📦 Deploying System Hub v1.0.0-beta..."
# Deploy System Hub RPCD backend
scp luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub \
"$ROUTER:/usr/libexec/rpcd/"
# Deploy System Hub API
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy System Hub theme manager
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy System Hub CSS
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy ALL System Hub views
scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/*.js \
"$ROUTER:/www/luci-static/resources/view/system-hub/"
echo ""
echo "🔧 Setting permissions and restarting services..."
ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.secubox /usr/libexec/rpcd/luci.system-hub"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/secubox/*.js /www/luci-static/resources/secubox/*.css"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/system-hub/*.js /www/luci-static/resources/system-hub/*.css"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/secubox/*.js"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/system-hub/*.js"
ssh "$ROUTER" "/etc/init.d/rpcd restart"
echo ""
echo "✅ SecuBox + System Hub v1.0.0-beta deployed successfully!"
echo ""
echo "📋 What's new in v1.0.0-beta:"
echo " • Unified theme system (dark/light/system)"
echo " • Coherent skin across ALL tabs in both plugins"
echo " • Single theme setting controls both SecuBox and System Hub"
echo " • Theme preference stored in /etc/config/secubox"
echo ""
echo "🎨 Theme features:"
echo " • Dark mode (default): Deep backgrounds, light text"
echo " • Light mode: Bright backgrounds, dark text"
echo " • System mode: Auto-detect from OS preferences"
echo ""
echo "🧪 Testing:"
echo " 1. Open any SecuBox tab - should show unified theme"
echo " 2. Open any System Hub tab - should show same theme"
echo " 3. Change theme in SecuBox Settings"
echo " 4. Refresh any tab - theme applies everywhere"
echo ""
echo "👉 Clear browser cache (Ctrl+Shift+R) and reload pages"

46
deploy-secubox-dashboard.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
# Deploy SecuBox dashboard updates to router
ROUTER="root@192.168.8.191"
BASE_DIR="/home/reepost/CyberMindStudio/_files/secubox-openwrt"
echo "🚀 Deploying SecuBox v0.0.5-beta dashboard to router..."
# Copy dashboard files
echo "📦 Copying dashboard.js..."
scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/view/secubox/dashboard.js" \
$ROUTER:/www/luci-static/resources/view/secubox/dashboard.js
echo "📦 Copying dashboard.css..."
scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/secubox/dashboard.css" \
$ROUTER:/www/luci-static/resources/secubox/dashboard.css
echo "📦 Copying alerts.js..."
scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/view/secubox/alerts.js" \
$ROUTER:/www/luci-static/resources/view/secubox/alerts.js
echo "📦 Copying alerts.css..."
scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/secubox/alerts.css" \
$ROUTER:/www/luci-static/resources/secubox/alerts.css
echo "📦 Copying monitoring.js..."
scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/view/secubox/monitoring.js" \
$ROUTER:/www/luci-static/resources/view/secubox/monitoring.js
echo "📦 Copying monitoring.css..."
scp "$BASE_DIR/luci-app-secubox/htdocs/luci-static/resources/secubox/monitoring.css" \
$ROUTER:/www/luci-static/resources/secubox/monitoring.css
# Fix permissions on router
echo "🔧 Fixing permissions on router..."
ssh $ROUTER << 'REMOTE_EOF'
chmod 644 /www/luci-static/resources/view/secubox/*.js
chmod 644 /www/luci-static/resources/secubox/*.css
rm -rf /tmp/luci-*
echo "✅ Permissions fixed and cache cleared"
REMOTE_EOF
echo ""
echo "✅ Deployment complete!"
echo "📱 Please refresh your browser with Ctrl+F5"
echo ""

43
deploy-system-hub.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/bash
# Deploy system-hub v0.0.3-alpha to router
ROUTER="root@192.168.8.191"
echo "🚀 Deploying system-hub v0.0.3-alpha to $ROUTER"
echo ""
# Deploy API module
echo "📦 Deploying API module..."
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy views
echo "📦 Deploying views..."
scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/overview.js \
"$ROUTER:/www/luci-static/resources/view/system-hub/"
scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/health.js \
"$ROUTER:/www/luci-static/resources/view/system-hub/"
scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/settings.js \
"$ROUTER:/www/luci-static/resources/view/system-hub/"
# Deploy RPCD backend
echo "📦 Deploying RPCD backend..."
scp luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub \
"$ROUTER:/usr/libexec/rpcd/"
# Deploy ACL permissions
echo "📦 Deploying ACL permissions..."
scp luci-app-system-hub/root/usr/share/rpcd/acl.d/luci-app-system-hub.json \
"$ROUTER:/usr/share/rpcd/acl.d/"
# Make RPCD script executable
echo "🔧 Setting permissions..."
ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.system-hub"
# Restart RPCD
echo "🔄 Restarting RPCD..."
ssh "$ROUTER" "/etc/init.d/rpcd restart"
echo ""
echo "✅ Deployment complete!"
echo "👉 Clear browser cache (Ctrl+Shift+R) and reload the page"

72
deploy-theme-system.sh Executable file
View File

@ -0,0 +1,72 @@
#!/bin/bash
# Deploy unified theme system to router
# SecuBox + System Hub theme coherence
ROUTER="root@192.168.8.191"
echo "🎨 Deploying unified theme system to $ROUTER"
echo ""
echo "📦 Deploying SecuBox components..."
# Deploy SecuBox RPCD backend (with get_theme method)
scp luci-app-secubox/root/usr/libexec/rpcd/luci.secubox \
"$ROUTER:/usr/libexec/rpcd/"
# Deploy SecuBox ACL (with get_theme permission)
scp luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json \
"$ROUTER:/usr/share/rpcd/acl.d/"
# Deploy SecuBox API (with getTheme)
scp luci-app-secubox/htdocs/luci-static/resources/secubox/api.js \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy SecuBox theme manager
scp luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy SecuBox CSS (with dark/light variables)
scp luci-app-secubox/htdocs/luci-static/resources/secubox/secubox.css \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy SecuBox dashboard view (with theme integration)
scp luci-app-secubox/htdocs/luci-static/resources/view/secubox/dashboard.js \
"$ROUTER:/www/luci-static/resources/view/secubox/"
echo ""
echo "📦 Deploying System Hub components..."
# Deploy System Hub theme manager
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy System Hub CSS (with dark/light variables)
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy System Hub overview view (with theme integration)
scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/overview.js \
"$ROUTER:/www/luci-static/resources/view/system-hub/"
echo ""
echo "🔧 Setting permissions and restarting services..."
ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.secubox"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/secubox/*.js /www/luci-static/resources/secubox/*.css"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/system-hub/*.js /www/luci-static/resources/system-hub/*.css"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/secubox/*.js"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/system-hub/*.js"
ssh "$ROUTER" "/etc/init.d/rpcd restart"
echo ""
echo "✅ Theme system deployed successfully!"
echo ""
echo "📋 Theme configuration:"
echo " • Theme setting stored in: /etc/config/secubox (option theme)"
echo " • Available themes: dark, light, system"
echo " • Both SecuBox and System Hub use the same theme"
echo ""
echo "🧪 Testing:"
echo " 1. Open SecuBox Settings: http://192.168.8.191/cgi-bin/luci/admin/secubox/settings"
echo " 2. Change theme to 'light' and save"
echo " 3. Refresh both SecuBox and System Hub pages"
echo " 4. Both should switch to light theme"
echo ""
echo "👉 Clear browser cache (Ctrl+Shift+R) and reload pages"

82
deploy-v0.1.1.sh Executable file
View File

@ -0,0 +1,82 @@
#!/bin/bash
# Deploy SecuBox + System Hub v0.1.1 with theme fixes
ROUTER="root@192.168.8.191"
echo "🚀 Deploying SecuBox + System Hub v0.1.1 to $ROUTER"
echo ""
echo "📦 Deploying SecuBox v0.1.1..."
# Deploy SecuBox RPCD backend
scp luci-app-secubox/root/usr/libexec/rpcd/luci.secubox \
"$ROUTER:/usr/libexec/rpcd/"
# Deploy SecuBox ACL
scp luci-app-secubox/root/usr/share/rpcd/acl.d/luci-app-secubox.json \
"$ROUTER:/usr/share/rpcd/acl.d/"
# Deploy SecuBox theme manager
scp luci-app-secubox/htdocs/luci-static/resources/secubox/theme.js \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy ALL SecuBox CSS (with theme variables)
scp luci-app-secubox/htdocs/luci-static/resources/secubox/*.css \
"$ROUTER:/www/luci-static/resources/secubox/"
# Deploy ALL SecuBox views (with CSS loading)
scp luci-app-secubox/htdocs/luci-static/resources/view/secubox/*.js \
"$ROUTER:/www/luci-static/resources/view/secubox/"
echo ""
echo "📦 Deploying System Hub v0.1.1..."
# Deploy System Hub RPCD backend
scp luci-app-system-hub/root/usr/libexec/rpcd/luci.system-hub \
"$ROUTER:/usr/libexec/rpcd/"
# Deploy System Hub API
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/api.js \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy System Hub theme manager
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/theme.js \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy System Hub CSS
scp luci-app-system-hub/htdocs/luci-static/resources/system-hub/dashboard.css \
"$ROUTER:/www/luci-static/resources/system-hub/"
# Deploy ALL System Hub views
scp luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/*.js \
"$ROUTER:/www/luci-static/resources/view/system-hub/"
echo ""
echo "🔧 Setting permissions and restarting services..."
ssh "$ROUTER" "chmod +x /usr/libexec/rpcd/luci.secubox /usr/libexec/rpcd/luci.system-hub"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/secubox/*.js /www/luci-static/resources/secubox/*.css"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/system-hub/*.js /www/luci-static/resources/system-hub/*.css"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/secubox/*.js"
ssh "$ROUTER" "chmod 644 /www/luci-static/resources/view/system-hub/*.js"
ssh "$ROUTER" "/etc/init.d/rpcd restart"
echo ""
echo "✅ v0.1.1 deployed successfully!"
echo ""
echo "📋 Changelog v0.1.1:"
echo " • Fixed: Theme switching now works in SecuBox visual display"
echo " • Fixed: CSS variables properly loaded in all SecuBox views"
echo " • Fixed: Hardcoded colors replaced with theme variables"
echo " • Added: secubox.css loaded in dashboard, alerts, monitoring views"
echo " • Theme coherence across ALL tabs in both plugins"
echo ""
echo "🎨 Theme features:"
echo " • Dark mode: Deep backgrounds (#0f172a), light text (#f1f5f9)"
echo " • Light mode: Bright backgrounds (#f8fafc), dark text (#0f172a)"
echo " • System mode: Auto-detect from OS (prefers-color-scheme)"
echo ""
echo "🧪 Test now:"
echo " 1. Clear browser cache (Ctrl+Shift+R)"
echo " 2. Go to SecuBox → Settings → Change theme to 'Light'"
echo " 3. Refresh SecuBox Dashboard → Should be light!"
echo " 4. Refresh System Hub Overview → Should be light too!"
echo ""
echo "👉 Clear browser cache (Ctrl+Shift+R) and reload pages"

8
test-direct.js Normal file
View File

@ -0,0 +1,8 @@
'use strict';
'require view';
return view.extend({
render: function() {
return E('div', {}, 'TEST: This text should appear if JavaScript works!');
}
});