From 3a657b8ab585f6e0fef5c9128dc84c5a008a6969 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 18 Dec 2019 21:32:48 +0100 Subject: luci-mod-network: replace controller address check action with cgi-io script This change removes the last bit of Lua code from luci-mod-network. Signed-off-by: Jo-Philipp Wich --- .../htdocs/luci-static/resources/view/network/interfaces.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/luci-mod-network/htdocs/luci-static') diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 9ca7773fe1..280356efba 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -160,8 +160,8 @@ function iface_updown(up, id, ev, force) { btns[1].disabled = true; if (!up) { - L.Request.get(L.url('admin/network/remote_addr')).then(function(res) { - var info = res.json(); + L.resolveDefault(fs.exec_direct('/usr/libexec/luci-peeraddr')).then(function(res) { + var info = null; try { info = JSON.parse(res); } catch(e) {} if (L.isObject(info) && Array.isArray(info.inbound_interfaces) && -- cgit v1.2.3