Major structural reorganization and feature additions: ## Folder Reorganization - Move 17 luci-app-* packages to package/secubox/ (except luci-app-secubox core hub) - Update all tooling to support new structure: - secubox-tools/quick-deploy.sh: search both locations - secubox-tools/validate-modules.sh: validate both directories - secubox-tools/fix-permissions.sh: fix permissions in both locations - .github/workflows/test-validate.yml: build from both paths - Update README.md links to new package/secubox/ paths ## AppStore Migration (Complete) - Add catalog entries for all remaining luci-app packages: - network-tweaks.json: Network optimization tools - secubox-bonus.json: Documentation & demos hub - Total: 24 apps in AppStore catalog (22 existing + 2 new) - New category: 'documentation' for docs/demos/tutorials ## VHost Manager v2.0 Enhancements - Add profile activation system for Internal Services and Redirects - Implement createVHost() API wrapper for template-based deployment - Fix Virtual Hosts view rendering with proper LuCI patterns - Fix RPCD backend shell script errors (remove invalid local declarations) - Extend backend validation for nginx return directives (redirect support) - Add section_id parameter for named VHost profiles - Add Remove button to Redirects page for feature parity - Update README to v2.0 with comprehensive feature documentation ## Network Tweaks Dashboard - Close button added to component details modal Files changed: 340+ (336 renames with preserved git history) Packages affected: 19 luci-app, 2 secubox-app, 1 theme, 4 tools 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
86 lines
2.3 KiB
JavaScript
86 lines
2.3 KiB
JavaScript
'use strict';
|
|
'require view';
|
|
'require secubox-theme/theme as Theme';
|
|
'require ui';
|
|
'require form';
|
|
'require bandwidth-manager/api as API';
|
|
|
|
return L.view.extend({
|
|
load: function() {
|
|
return API.listRules();
|
|
},
|
|
|
|
render: function(rules) {
|
|
var m = new form.Map('bandwidth', _('QoS Rules'),
|
|
_('Define traffic shaping rules based on applications, ports, or IP addresses'));
|
|
|
|
var s = m.section(form.GridSection, 'rule', _('Rules'));
|
|
s.anonymous = false;
|
|
s.addremove = true;
|
|
s.sortable = true;
|
|
|
|
s.modaltitle = function(section_id) {
|
|
return _('Edit Rule: ') + section_id;
|
|
};
|
|
|
|
var o;
|
|
|
|
o = s.option(form.Value, 'name', _('Rule Name'));
|
|
o.rmempty = false;
|
|
o.placeholder = 'Limit YouTube';
|
|
|
|
o = s.option(form.ListValue, 'type', _('Type'));
|
|
o.value('application', _('Application'));
|
|
o.value('port', _('Port'));
|
|
o.value('ip', _('IP Address'));
|
|
o.value('mac', _('MAC Address'));
|
|
o.default = 'application';
|
|
|
|
o = s.option(form.Value, 'target', _('Target'));
|
|
o.rmempty = false;
|
|
o.placeholder = 'youtube / 80,443 / 192.168.1.100 / AA:BB:CC:DD:EE:FF';
|
|
o.description = _('Application name, port(s), IP address, or MAC address');
|
|
|
|
o = s.option(form.Value, 'limit_down', _('Download Limit (kbit/s)'));
|
|
o.datatype = 'uinteger';
|
|
o.placeholder = '5000';
|
|
o.description = _('Maximum download speed in kbit/s (0 = unlimited)');
|
|
o.default = '0';
|
|
|
|
o = s.option(form.Value, 'limit_up', _('Upload Limit (kbit/s)'));
|
|
o.datatype = 'uinteger';
|
|
o.placeholder = '1000';
|
|
o.description = _('Maximum upload speed in kbit/s (0 = unlimited)');
|
|
o.default = '0';
|
|
|
|
o = s.option(form.ListValue, 'priority', _('Priority'));
|
|
o.value('1', '1 (Highest)');
|
|
o.value('2', '2 (High)');
|
|
o.value('3', '3');
|
|
o.value('4', '4');
|
|
o.value('5', '5 (Normal)');
|
|
o.value('6', '6');
|
|
o.value('7', '7 (Low)');
|
|
o.value('8', '8 (Lowest)');
|
|
o.default = '5';
|
|
|
|
o = s.option(form.Value, 'schedule', _('Schedule (Optional)'));
|
|
o.placeholder = 'Mon-Fri 08:00-18:00';
|
|
o.description = _('Apply rule only during specific times');
|
|
|
|
o = s.option(form.Flag, 'enabled', _('Enabled'));
|
|
o.default = o.enabled;
|
|
|
|
return m.render().then(function(rendered) {
|
|
return E('div', {}, [
|
|
E('link', { 'rel': 'stylesheet', 'href': L.resource('secubox-theme/secubox-theme.css') }),
|
|
rendered
|
|
]);
|
|
});
|
|
},
|
|
|
|
handleSaveApply: null,
|
|
handleSave: null,
|
|
handleReset: null
|
|
});
|