luci-base, luci-mod-network, luci-app-firewall: migrate luci/getHostHints
authorJo-Philipp Wich <jo@mein.io>
Thu, 31 Oct 2019 13:37:07 +0000 (14:37 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 1 Nov 2019 11:03:33 +0000 (12:03 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
modules/luci-base/htdocs/luci-static/resources/network.js
modules/luci-base/root/usr/libexec/rpcd/luci
modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
modules/luci-mod-network/htdocs/luci-static/resources/view/network/hosts.js

index 80938711e9d416f121cd7f0ea8b886597652c3d7..dc2249275e7e3cad735141e6afd6b06999ddf87a 100644 (file)
@@ -74,7 +74,7 @@ function forward_via_txt(s) {
 
 return L.view.extend({
        callHostHints: rpc.declare({
-               object: 'luci',
+               object: 'luci-rpc',
                method: 'getHostHints',
                expect: { '': {} }
        }),
index 6df3bc7f8550bf425674ee44f1bb8b82d168504e..f40e0c73e1b3f759ecb28fef12e937a5b5a6cf61 100644 (file)
@@ -111,7 +111,7 @@ function rule_target_txt(s) {
 
 return L.view.extend({
        callHostHints: rpc.declare({
-               object: 'luci',
+               object: 'luci-rpc',
                method: 'getHostHints',
                expect: { '': {} }
        }),
index 665024fd7eff12639ce5cd4c6b8bc5580613e29e..ed14af4887647e0832d29d4a5c0ed7c215c2bdb7 100644 (file)
@@ -68,7 +68,7 @@ var callLuciBoardJSON = rpc.declare({
 });
 
 var callLuciHostHints = rpc.declare({
-       object: 'luci',
+       object: 'luci-rpc',
        method: 'getHostHints',
        expect: { '': {} }
 });
index 13a83dfd146544c11dc92e12a566195c3cea2af7..8a3e0b0c0fa725763f4a1805169891ff6ff1ea5b 100755 (executable)
@@ -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')
index 5256c8bb2c1af6587128e4281b9ab1ea56a83234..6f08cd7df991d1b4a54346f42bf7fb9c08769822 100644 (file)
@@ -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" ],
index e299a3ad10232863fc72b6115e403771d82e2897..d7620e7f4780ef1d658ecbf7f4bd2c0ff3cdf9ff 100644 (file)
@@ -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(),
index 3cdea8adbeb8a9571039c93c881e8433e4ae3fe8..975ac2fec7cd73a959a0bef1afbb1258c79ffb6d 100644 (file)
@@ -4,7 +4,7 @@
 
 return L.view.extend({
        callHostHints: rpc.declare({
-               object: 'luci',
+               object: 'luci-rpc',
                method: 'getHostHints',
                expect: { '': {} }
        }),