From 529fe1dc23dc886428fe90b679bd30bc9648a651 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 12 Oct 2013 20:23:30 +0000 Subject: [PATCH] luci2: add LuCI2.network.runPing(), LuCI2.network.runPing6(), LuCI2.network.runTraceroute(), LuCI2.network.runTraceroute6() and LuCI2.network.runNslookup() rpc wrappers --- luci2/htdocs/luci2/luci2.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js index 279da17..81fc01d 100644 --- a/luci2/htdocs/luci2/luci2.js +++ b/luci2/htdocs/luci2/luci2.js @@ -977,6 +977,42 @@ function LuCI2() method: 'switch_status', params: [ 'switch' ], expect: { ports: [ ] } + }), + + + runPing: _luci2.rpc.declare({ + object: 'luci2.network', + method: 'ping', + params: [ 'data' ], + expect: { '': { code: -1 } } + }), + + runPing6: _luci2.rpc.declare({ + object: 'luci2.network', + method: 'ping6', + params: [ 'data' ], + expect: { '': { code: -1 } } + }), + + runTraceroute: _luci2.rpc.declare({ + object: 'luci2.network', + method: 'traceroute', + params: [ 'data' ], + expect: { '': { code: -1 } } + }), + + runTraceroute6: _luci2.rpc.declare({ + object: 'luci2.network', + method: 'traceroute6', + params: [ 'data' ], + expect: { '': { code: -1 } } + }), + + runNslookup: _luci2.rpc.declare({ + object: 'luci2.network', + method: 'nslookup', + params: [ 'data' ], + expect: { '': { code: -1 } } }) }; -- 2.30.2