This release adds major new features for SecuBox management and deployment: ## New Features ### 1. LuCI Admin Control Center (luci-app-secubox-admin) - Unified admin dashboard for managing all SecuBox appstore plugins - **Control Panel**: Real-time stats, system health, alerts, quick actions - **Apps Manager**: Browse catalog, install/remove apps with search & filtering - **App Settings**: Per-app configuration, start/stop controls - **System Health**: Live monitoring (CPU, RAM, disk) with auto-refresh - **System Logs**: Centralized log viewer with download capability - Fully integrated with existing RPCD backend (luci.secubox) - Mobile-responsive design with polished UI components ### 2. Documentation Mirror in SecuBox Bonus - Integrated complete development documentation into luci-app-secubox-bonus - 64+ documentation files now available offline at /luci-static/secubox/docs/ - Beautiful landing page (index-main.html) with 4 sections: - Development guides & references - Live module demos - Tutorials & blog posts - Marketing campaign pages - Accessible locally on router without internet connection ### 3. Automated Docker Plugin Installation - Enhanced secubox-appstore CLI with full Docker automation - One-click installation from web UI now fully automated: - Auto-detects Docker runtime from catalog - Discovers and executes control scripts (*ctl install) - Pulls Docker images automatically - Creates directories and configures UCI - Enables init services - No manual CLI steps required for Docker apps - Works for all Docker apps: AdGuard Home, Mail-in-a-Box, Nextcloud, etc. ### 4. Mail-in-a-Box Plugin - New Docker-based email server plugin (secubox-app-mailinabox) - Complete package with: - UCI configuration (8 port mappings, feature flags) - Control script (mailinaboxctl) with install/check/update/status/logs - Procd init script with auto-restart - Catalog manifest (category: hosting, maturity: beta) - Network mode: host (required for mail server) - Persistent storage: mail, SSL, data, DNS volumes ## Improvements ### Build System - Updated local-build.sh to include luci-app-* packages from package/secubox/ - Now automatically discovers and builds luci-app-secubox-admin and similar packages - Fixed Makefile include paths for feed structure ### Package Releases - Incremented PKG_RELEASE for all 31 SecuBox packages - Ensures clean upgrade path from previous versions ### Catalog Updates - Mail-in-a-Box entry moved from "productivity" to "hosting" category - Status changed to "beta" reflecting community Docker image maturity - Storage requirement increased: 1024MB → 2048MB - Added port 25 accessibility note ## Files Changed ### New Packages (2) - package/secubox/luci-app-secubox-admin/ (12 files) - package/secubox/secubox-app-mailinabox/ (4 files) ### Enhanced Packages (1) - package/secubox/luci-app-secubox-bonus/ (65 new docs files) ### Modified Core (3) - package/secubox/secubox-core/root/usr/sbin/secubox-appstore - package/secubox/secubox-core/root/usr/share/secubox/catalog.json - secubox-tools/local-build.sh ### All Makefiles (31 packages) - Incremented PKG_RELEASE for clean upgrade path ## Technical Details **Admin Control Center Architecture:** - Frontend: 5 views (dashboard, apps, settings, health, logs) - API: Wrapper around luci.secubox RPCD methods - Components: Reusable UI library (cards, badges, alerts, loaders) - Styling: Common + admin-specific CSS with responsive design - Auto-refresh: Polling for live updates (5-30s intervals) **Docker Automation Flow:** ``` Web UI → RPCD → secubox-appstore CLI → opkg install → *ctl install → docker pull → directories → UCI config → init enable → ✓ Ready ``` **Access Points:** - Admin Control: http://router/cgi-bin/luci/admin/secubox/admin/ - Documentation: http://router/luci-static/secubox/index-main.html - Demos: http://router/luci-static/secubox/demo-*.html 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
125 lines
3.4 KiB
JavaScript
125 lines
3.4 KiB
JavaScript
'use strict';
|
|
'require view';
|
|
'require secubox-admin.api as API';
|
|
'require secubox-admin.components as Components';
|
|
'require ui';
|
|
|
|
return view.extend({
|
|
load: function() {
|
|
return Promise.all([
|
|
API.getApps(),
|
|
API.getModules()
|
|
]);
|
|
},
|
|
|
|
render: function(data) {
|
|
var apps = data[0].apps || [];
|
|
var modules = data[1].modules || {};
|
|
var self = this;
|
|
|
|
// Filter to only show installed apps
|
|
var installedApps = apps.filter(function(app) {
|
|
var status = API.getAppStatus(app, modules);
|
|
return status.installed;
|
|
});
|
|
|
|
var container = E('div', { 'class': 'secubox-settings' }, [
|
|
E('link', { 'rel': 'stylesheet',
|
|
'href': L.resource('secubox-admin/common.css') }),
|
|
E('link', { 'rel': 'stylesheet',
|
|
'href': L.resource('secubox-admin/admin.css') }),
|
|
|
|
E('h2', {}, 'App Settings'),
|
|
E('p', {}, 'Configure installed applications'),
|
|
|
|
installedApps.length === 0 ?
|
|
E('div', { 'class': 'alert alert-info' }, 'No installed apps') :
|
|
E('div', { 'class': 'settings-list' },
|
|
installedApps.map(function(app) {
|
|
return self.renderAppSettings(app, modules);
|
|
})
|
|
)
|
|
]);
|
|
|
|
return container;
|
|
},
|
|
|
|
renderAppSettings: function(app, modules) {
|
|
var self = this;
|
|
var status = API.getAppStatus(app, modules);
|
|
|
|
return E('div', { 'class': 'settings-card card' }, [
|
|
E('div', { 'class': 'settings-header' }, [
|
|
E('div', { 'class': 'app-title' }, [
|
|
E('span', { 'class': 'app-icon' }, app.icon || '📦'),
|
|
E('h3', {}, app.name),
|
|
Components.renderStatusBadge(status.status)
|
|
]),
|
|
E('div', { 'class': 'app-controls' }, [
|
|
status.running ?
|
|
E('button', {
|
|
'class': 'btn btn-sm btn-warning',
|
|
'click': function() { self.disableApp(app); }
|
|
}, 'Stop') :
|
|
E('button', {
|
|
'class': 'btn btn-sm btn-success',
|
|
'click': function() { self.enableApp(app); }
|
|
}, 'Start'),
|
|
E('button', {
|
|
'class': 'btn btn-sm btn-primary',
|
|
'click': function() { self.viewConfig(app); }
|
|
}, 'View Config')
|
|
])
|
|
]),
|
|
E('div', { 'class': 'settings-info' }, [
|
|
E('p', {}, app.description),
|
|
app.packages && app.packages.required ? E('p', { 'class': 'text-muted' }, [
|
|
E('strong', {}, 'Packages: '),
|
|
app.packages.required.join(', ')
|
|
]) : E('div')
|
|
])
|
|
]);
|
|
},
|
|
|
|
enableApp: function(app) {
|
|
var pkgName = app.packages && app.packages.required ? app.packages.required[0] : app.id;
|
|
API.enableModule(pkgName).then(function(result) {
|
|
if (result.success) {
|
|
ui.addNotification(null, E('p', app.name + ' started'), 'info');
|
|
window.location.reload();
|
|
} else {
|
|
ui.addNotification(null, E('p', 'Failed to start ' + app.name), 'error');
|
|
}
|
|
});
|
|
},
|
|
|
|
disableApp: function(app) {
|
|
var pkgName = app.packages && app.packages.required ? app.packages.required[0] : app.id;
|
|
API.disableModule(pkgName).then(function(result) {
|
|
if (result.success) {
|
|
ui.addNotification(null, E('p', app.name + ' stopped'), 'info');
|
|
window.location.reload();
|
|
} else {
|
|
ui.addNotification(null, E('p', 'Failed to stop ' + app.name), 'error');
|
|
}
|
|
});
|
|
},
|
|
|
|
viewConfig: function(app) {
|
|
ui.showModal(app.name + ' Configuration', [
|
|
E('p', {}, 'Configuration for ' + app.name + ' can be found at:'),
|
|
E('code', {}, '/etc/config/' + (app.id.replace('secubox-app-', ''))),
|
|
E('div', { 'class': 'right' }, [
|
|
E('button', {
|
|
'class': 'btn',
|
|
'click': ui.hideModal
|
|
}, 'Close')
|
|
])
|
|
]);
|
|
},
|
|
|
|
handleSaveApply: null,
|
|
handleSave: null,
|
|
handleReset: null
|
|
});
|