mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
Update On Sat Mar 8 19:28:42 CET 2025
This commit is contained in:
@@ -11,14 +11,16 @@ return view.extend({
|
||||
return Promise.all([
|
||||
uci.load('nikki'),
|
||||
network.getHostHints(),
|
||||
network.getNetworks(),
|
||||
nikki.getUsers(),
|
||||
nikki.getGroups()
|
||||
]);
|
||||
},
|
||||
render: function (data) {
|
||||
const hosts = data[1].hosts;
|
||||
const users = data[2];
|
||||
const groups = data[3];
|
||||
const networks = data[2];
|
||||
const users = data[3];
|
||||
const groups = data[4];
|
||||
|
||||
let m, s, o;
|
||||
|
||||
@@ -108,13 +110,20 @@ return view.extend({
|
||||
o.value(mac, hint ? '%s (%s)'.format(mac, hint) : mac);
|
||||
};
|
||||
|
||||
o = s.taboption('access_control', widgets.NetworkSelect, 'acl_interface', _('Interface'));
|
||||
o = s.taboption('access_control', form.DynamicList, 'acl_interface', _('Interface'));
|
||||
o.multiple = true;
|
||||
o.optional = true;
|
||||
o.retain = true;
|
||||
o.depends('access_control_mode', 'allow');
|
||||
o.depends('access_control_mode', 'block');
|
||||
|
||||
for (const network of networks) {
|
||||
if (network.getName() === 'loopback') {
|
||||
continue;
|
||||
}
|
||||
o.value(network.getName());
|
||||
}
|
||||
|
||||
s.tab('bypass', _('Bypass'));
|
||||
|
||||
o = s.taboption('bypass', form.MultiValue, 'bypass_user', _('Bypass User'));
|
||||
|
||||
Reference in New Issue
Block a user