luci2: add LuCI2.network.runPing(), LuCI2.network.runPing6(), LuCI2.network.runTracer...
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 12 Oct 2013 20:23:30 +0000 (20:23 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 12 Oct 2013 20:23:30 +0000 (20:23 +0000)
luci2/htdocs/luci2/luci2.js

index 279da17..81fc01d 100644 (file)
@@ -977,6 +977,42 @@ function LuCI2()
                        method: 'switch_status',
                        params: [ 'switch' ],
                        expect: { ports: [ ] }
                        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 } }
                })
        };
 
                })
        };