summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-10-31 14:37:07 +0100
committerJo-Philipp Wich <jo@mein.io>2019-11-01 12:03:33 +0100
commit37b6092aef9f875b95debdafba7da9933fc10a34 (patch)
tree34ab08a070c788d515bcbd4274cd12a714864c1b /modules
parent5ff35d8be44f5fb9d4711cfc9ea1c478577a3e0a (diff)
luci-base, luci-mod-network, luci-app-firewall: migrate luci/getHostHints
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/network.js2
-rwxr-xr-xmodules/luci-base/root/usr/libexec/rpcd/luci7
-rw-r--r--modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json4
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js4
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/hosts.js2
5 files changed, 5 insertions, 14 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js
index 665024fd7..ed14af488 100644
--- a/modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/modules/luci-base/htdocs/luci-static/resources/network.js
@@ -68,7 +68,7 @@ var callLuciBoardJSON = rpc.declare({
});
var callLuciHostHints = rpc.declare({
- object: 'luci',
+ object: 'luci-rpc',
method: 'getHostHints',
expect: { '': {} }
});
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci
index 13a83dfd1..8a3e0b0c0 100755
--- a/modules/luci-base/root/usr/libexec/rpcd/luci
+++ b/modules/luci-base/root/usr/libexec/rpcd/luci
@@ -166,13 +166,6 @@ local methods = {
end
},
- getHostHints = {
- call = function()
- local sys = require "luci.sys"
- return sys.net.host_hints()
- end
- },
-
getDUIDHints = {
call = function()
local fp = io.open('/var/hosts/odhcpd')
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 5256c8bb2..6f08cd7df 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", "getLEDs", "getNetworkDevices", "getUSBDevices", "getWirelessDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints" ],
- "luci-rpc": [ "getBoardJSON", "getDHCPLeases" ],
+ "luci": [ "getDUIDHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getLEDs", "getNetworkDevices", "getUSBDevices", "getWirelessDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints" ],
+ "luci-rpc": [ "getBoardJSON", "getDHCPLeases", "getHostHints" ],
"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 e299a3ad1..d7620e7f4 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
@@ -6,7 +6,7 @@
var callHostHints, callDUIDHints, callDHCPLeases, CBILeaseStatus;
callHostHints = rpc.declare({
- object: 'luci',
+ object: 'luci-rpc',
method: 'getHostHints',
expect: { '': {} }
});
@@ -44,8 +44,6 @@ CBILeaseStatus = form.DummyValue.extend({
});
return L.view.extend({
-
-
load: function() {
return Promise.all([
callHostHints(),
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/hosts.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/hosts.js
index 3cdea8adb..975ac2fec 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/hosts.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/hosts.js
@@ -4,7 +4,7 @@
return L.view.extend({
callHostHints: rpc.declare({
- object: 'luci',
+ object: 'luci-rpc',
method: 'getHostHints',
expect: { '': {} }
}),