1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update Luci interface

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-08-28 18:48:12 +02:00
parent 1d231c0101
commit 2946dea4a1
3 changed files with 20 additions and 8 deletions

View file

@ -1,4 +1,13 @@
{ {
"unauthenticated": {
"description": "Allow system feature probing",
"read": {
"ubus": {
"luci": [ "getFeatures" ]
}
}
},
"uci-access": { "uci-access": {
"description": "Grant uci write access to all configurations", "description": "Grant uci write access to all configurations",
"read": { "read": {
@ -13,17 +22,18 @@
"read": { "read": {
"ubus": { "ubus": {
"iwinfo": [ "info" ], "iwinfo": [ "info" ],
"luci": [ "boardjson", "duid_hints", "host_hints", "ifaddrs", "initList", "getLocaltime", "leases", "leds", "netdevs", "usb" ], "luci": [ "getBoardJSON", "getDUIDHints", "getHostHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getDHCPLeases", "getLEDs", "getNetworkDevices", "getUSBDevices" ],
"network.device": [ "status" ], "network.device": [ "status" ],
"network.interface": [ "dump" ], "network.interface": [ "dump" ],
"network.wireless": [ "status" ], "network.wireless": [ "status" ],
"network": [ "get_proto_handlers" ],
"uci": [ "changes", "get" ] "uci": [ "changes", "get" ]
}, },
"uci": [ "*" ] "uci": [ "*" ]
}, },
"write": { "write": {
"ubus": { "ubus": {
"luci": [ "initCall", "setLocaltime", "timezone" ], "luci": [ "setInitAction", "setLocaltime" ],
"uci": [ "add", "apply", "confirm", "delete", "order", "set" ] "uci": [ "add", "apply", "confirm", "delete", "order", "set" ]
}, },
"uci": [ "*" ] "uci": [ "*" ]
@ -33,7 +43,7 @@
"description": "Grant access to firewall procedures", "description": "Grant access to firewall procedures",
"read": { "read": {
"ubus": { "ubus": {
"luci": [ "conntrack_helpers", "offload_support" ] "luci": [ "getConntrackHelpers" ]
}, },
"uci": [ "firewall" ] "uci": [ "firewall" ]
}, },

View file

@ -7,17 +7,19 @@ var callHostHints, callDUIDHints, callDHCPLeases, CBILeaseStatus;
callHostHints = rpc.declare({ callHostHints = rpc.declare({
object: 'luci', object: 'luci',
method: 'host_hints' method: 'getHostHints',
expect: { '': {} }
}); });
callDUIDHints = rpc.declare({ callDUIDHints = rpc.declare({
object: 'luci', object: 'luci',
method: 'duid_hints' method: 'getDUIDHints',
expect: { '': {} }
}); });
callDHCPLeases = rpc.declare({ callDHCPLeases = rpc.declare({
object: 'luci', object: 'luci',
method: 'leases', method: 'getDHCPLeases',
params: [ 'family' ], params: [ 'family' ],
expect: { dhcp_leases: [] } expect: { dhcp_leases: [] }
}); });
@ -57,7 +59,6 @@ return L.view.extend({
m, s, o, ss, so; m, s, o, ss, so;
m = new form.Map('dhcp', _('DHCP and DNS'), _('Dnsmasq is a combined <abbr title="Dynamic Host Configuration Protocol">DHCP</abbr>-Server and <abbr title="Domain Name System">DNS</abbr>-Forwarder for <abbr title="Network Address Translation">NAT</abbr> firewalls')); m = new form.Map('dhcp', _('DHCP and DNS'), _('Dnsmasq is a combined <abbr title="Dynamic Host Configuration Protocol">DHCP</abbr>-Server and <abbr title="Domain Name System">DNS</abbr>-Forwarder for <abbr title="Network Address Translation">NAT</abbr> firewalls'));
m.tabbed = true;
s = m.section(form.TypedSection, 'dnsmasq', _('Server Settings')); s = m.section(form.TypedSection, 'dnsmasq', _('Server Settings'));
s.anonymous = true; s.anonymous = true;

View file

@ -5,7 +5,8 @@
return L.view.extend({ return L.view.extend({
callHostHints: rpc.declare({ callHostHints: rpc.declare({
object: 'luci', object: 'luci',
method: 'host_hints' method: 'getHostHints',
expect: { '': {} }
}), }),
load: function() { load: function() {