diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-10-31 14:25:53 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-11-01 12:03:33 +0100 |
commit | 5ff35d8be44f5fb9d4711cfc9ea1c478577a3e0a (patch) | |
tree | ebcf267406f401979e04087f6bd546d1073a8a10 /modules | |
parent | d21ebcfbbc13ee8f979d8dbffeca1c9f1a7926a3 (diff) |
luci-base, luci-mod-network: migrate luci/getDHCPLeases to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
3 files changed, 3 insertions, 21 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci index 1e95ff5c68..13a83dfd14 100755 --- a/modules/luci-base/root/usr/libexec/rpcd/luci +++ b/modules/luci-base/root/usr/libexec/rpcd/luci @@ -193,24 +193,6 @@ local methods = { end }, - getDHCPLeases = { - args = { family = 0 }, - call = function(args) - local s = require "luci.tools.status" - - if args.family == 4 then - return { dhcp_leases = s.dhcp_leases() } - elseif args.family == 6 then - return { dhcp6_leases = s.dhcp6_leases() } - else - return { - dhcp_leases = s.dhcp_leases(), - dhcp6_leases = s.dhcp6_leases() - } - end - end - }, - getNetworkDevices = { call = function(args) local dir = fs.dir("/sys/class/net") diff --git a/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json b/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json index 158e72cf76..5256c8bb2c 100644 --- a/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json +++ b/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json @@ -41,8 +41,8 @@ "ubus": { "file": [ "list", "read", "stat" ], "iwinfo": [ "assoclist", "freqlist", "txpowerlist", "countrylist" ], - "luci": [ "getDUIDHints", "getHostHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getDHCPLeases", "getLEDs", "getNetworkDevices", "getUSBDevices", "getWirelessDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints" ], - "luci-rpc": [ "getBoardJSON" ], + "luci": [ "getDUIDHints", "getHostHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getLEDs", "getNetworkDevices", "getUSBDevices", "getWirelessDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints" ], + "luci-rpc": [ "getBoardJSON", "getDHCPLeases" ], "network.device": [ "status" ], "network.interface": [ "dump" ], "network": [ "get_proto_handlers" ], diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 3acb6d1a16..e299a3ad10 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -18,7 +18,7 @@ callDUIDHints = rpc.declare({ }); callDHCPLeases = rpc.declare({ - object: 'luci', + object: 'luci-rpc', method: 'getDHCPLeases', params: [ 'family' ], expect: { dhcp_leases: [] } |