From 489fc4b263eda240ea079061d926e88a6eaa3277 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 7 Nov 2019 12:39:24 +0100 Subject: [PATCH] docs: various updates - jsapi: include source links - README.md: link to github pages - docs/README.md: add stub index page Signed-off-by: Jo-Philipp Wich --- README.md | 4 +- docs/README.md | 6 + docs/jsapi/LuCI.Class.html | 18 +- docs/jsapi/LuCI.Headers.html | 10 +- docs/jsapi/LuCI.Network.Device.html | 50 +- docs/jsapi/LuCI.Network.Hosts.html | 22 +- docs/jsapi/LuCI.Network.Protocol.html | 82 +- docs/jsapi/LuCI.Network.WifiDevice.html | 32 +- docs/jsapi/LuCI.Network.WifiNetwork.html | 80 +- docs/jsapi/LuCI.Network.html | 64 +- docs/jsapi/LuCI.Poll.html | 16 +- docs/jsapi/LuCI.Request.html | 20 +- docs/jsapi/LuCI.Request.poll.html | 18 +- docs/jsapi/LuCI.Response.html | 12 +- docs/jsapi/LuCI.XHR.html | 18 +- docs/jsapi/LuCI.dom.html | 34 +- docs/jsapi/LuCI.fs.html | 22 +- docs/jsapi/LuCI.html | 46 +- docs/jsapi/LuCI.rpc.html | 30 +- docs/jsapi/LuCI.uci.html | 42 +- docs/jsapi/LuCI.view.html | 18 +- docs/jsapi/fs.js.html | 1095 +++++++++++++++++- docs/jsapi/index.html | 4 +- docs/jsapi/luci.js.html | 1095 +++++++++++++++++- docs/jsapi/network.js.html | 1323 ++++++++++++++++++++-- docs/jsapi/rpc.js.html | 1095 +++++++++++++++++- docs/jsapi/uci.js.html | 1095 +++++++++++++++++- jsdoc.conf.json | 5 +- package.json | 2 +- 29 files changed, 5855 insertions(+), 503 deletions(-) create mode 100644 docs/README.md diff --git a/README.md b/README.md index 56954eee9e9..d4478ee0e04 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ To install all its package definitions, run: You can browse the generated API documentation directly on Github. - - [Server side Lua APIs](http://htmlpreview.github.io/?http://raw.githubusercontent.com/openwrt/luci/master/docs/api/index.html) - - [Client side JavaScript APIs](http://htmlpreview.github.io/?http://raw.githubusercontent.com/openwrt/luci/master/docs/jsapi/index.html) + - [Server side Lua APIs](http://openwrt.github.io/luci/api/index.html) + - [Client side JavaScript APIs](http://openwrt.github.io/luci/jsapi/index.html) ## Development diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000000..0366a64559d --- /dev/null +++ b/docs/README.md @@ -0,0 +1,6 @@ +# LuCI Documentation + +## API Reference + + - [Client side JavaScript APIs](jsapi/index.html) + - [Server side Lua APIs](api/index.html) diff --git a/docs/jsapi/LuCI.Class.html b/docs/jsapi/LuCI.Class.html index f0b2e5a954d..428e535769d 100644 --- a/docs/jsapi/LuCI.Class.html +++ b/docs/jsapi/LuCI.Class.html @@ -17,7 +17,7 @@ @@ -1104,7 +1104,7 @@

- luci.js, line 59 + luci.js, line 59
@@ -1189,7 +1189,7 @@

- luci.js, line 87 + luci.js, line 87
@@ -1339,7 +1339,7 @@

- luci.js, line 169 + luci.js, line 169
@@ -1526,7 +1526,7 @@

- luci.js, line 195 + luci.js, line 195
@@ -1673,7 +1673,7 @@

- luci.js, line 145 + luci.js, line 145
@@ -1865,7 +1865,7 @@

- luci.js, line 267 + luci.js, line 267
@@ -2095,7 +2095,7 @@

- luci.js, line 225 + luci.js, line 225
@@ -2318,7 +2318,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Headers.html b/docs/jsapi/LuCI.Headers.html index fc4afaae69f..f23a6507b78 100644 --- a/docs/jsapi/LuCI.Headers.html +++ b/docs/jsapi/LuCI.Headers.html @@ -17,7 +17,7 @@ @@ -1103,7 +1103,7 @@

- luci.js, line 324 + luci.js, line 324
@@ -1188,7 +1188,7 @@

- luci.js, line 363 + luci.js, line 363
@@ -1337,7 +1337,7 @@

- luci.js, line 347 + luci.js, line 347
@@ -1491,7 +1491,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Network.Device.html b/docs/jsapi/LuCI.Network.Device.html index d27d714380f..436fb0aeb92 100644 --- a/docs/jsapi/LuCI.Network.Device.html +++ b/docs/jsapi/LuCI.Network.Device.html @@ -17,7 +17,7 @@ @@ -1103,7 +1103,7 @@

- network.js, line 2649 + network.js, line 2649
@@ -1188,7 +1188,7 @@

- network.js, line 2856 + network.js, line 2856
@@ -1292,7 +1292,7 @@

- network.js, line 2868 + network.js, line 2868
@@ -1393,7 +1393,7 @@

- network.js, line 2783 + network.js, line 2783
@@ -1494,7 +1494,7 @@

- network.js, line 2727 + network.js, line 2727
@@ -1594,7 +1594,7 @@

- network.js, line 2716 + network.js, line 2716
@@ -1694,7 +1694,7 @@

- network.js, line 2695 + network.js, line 2695
@@ -1798,7 +1798,7 @@

- network.js, line 2706 + network.js, line 2706
@@ -1898,7 +1898,7 @@

- network.js, line 2684 + network.js, line 2684
@@ -1998,7 +1998,7 @@

- network.js, line 2963 + network.js, line 2963
@@ -2103,7 +2103,7 @@

- network.js, line 2974 + network.js, line 2974
@@ -2204,7 +2204,7 @@

- network.js, line 2834 + network.js, line 2834
@@ -2309,7 +2309,7 @@

- network.js, line 2928 + network.js, line 2928
@@ -2409,7 +2409,7 @@

- network.js, line 2950 + network.js, line 2950
@@ -2509,7 +2509,7 @@

- network.js, line 2769 + network.js, line 2769
@@ -2610,7 +2610,7 @@

- network.js, line 2917 + network.js, line 2917
@@ -2710,7 +2710,7 @@

- network.js, line 2939 + network.js, line 2939
@@ -2810,7 +2810,7 @@

- network.js, line 2745 + network.js, line 2745
@@ -2919,7 +2919,7 @@

- network.js, line 2801 + network.js, line 2801
@@ -3020,7 +3020,7 @@

- network.js, line 2998 + network.js, line 2998
@@ -3125,7 +3125,7 @@

- network.js, line 2896 + network.js, line 2896
@@ -3226,7 +3226,7 @@

- network.js, line 2907 + network.js, line 2907
@@ -3327,7 +3327,7 @@

- network.js, line 2880 + network.js, line 2880
@@ -3436,7 +3436,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Network.Hosts.html b/docs/jsapi/LuCI.Network.Hosts.html index 5dafede0151..ce99197aecb 100644 --- a/docs/jsapi/LuCI.Network.Hosts.html +++ b/docs/jsapi/LuCI.Network.Hosts.html @@ -17,7 +17,7 @@ @@ -1104,7 +1104,7 @@

- network.js, line 1684 + network.js, line 1684
@@ -1189,7 +1189,7 @@

- network.js, line 1781 + network.js, line 1781
@@ -1339,7 +1339,7 @@

- network.js, line 1745 + network.js, line 1745
@@ -1489,7 +1489,7 @@

- network.js, line 1700 + network.js, line 1700
@@ -1639,7 +1639,7 @@

- network.js, line 1730 + network.js, line 1730
@@ -1789,7 +1789,7 @@

- network.js, line 1715 + network.js, line 1715
@@ -1939,7 +1939,7 @@

- network.js, line 1799 + network.js, line 1799
@@ -2089,7 +2089,7 @@

- network.js, line 1763 + network.js, line 1763
@@ -2239,7 +2239,7 @@

- network.js, line 1827 + network.js, line 1827
@@ -2417,7 +2417,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Network.Protocol.html b/docs/jsapi/LuCI.Network.Protocol.html index ea9887a79d0..76aac1dffb2 100644 --- a/docs/jsapi/LuCI.Network.Protocol.html +++ b/docs/jsapi/LuCI.Network.Protocol.html @@ -17,7 +17,7 @@ @@ -1103,7 +1103,7 @@

- network.js, line 1850 + network.js, line 1850
@@ -1188,7 +1188,7 @@

- network.js, line 2439 + network.js, line 2439
@@ -1349,7 +1349,7 @@

- network.js, line 2608 + network.js, line 2608
@@ -1510,7 +1510,7 @@

- network.js, line 2466 + network.js, line 2466
@@ -1671,7 +1671,7 @@

- network.js, line 1883 + network.js, line 1883
@@ -1823,7 +1823,7 @@

- network.js, line 2493 + network.js, line 2493
@@ -1925,7 +1925,7 @@

- network.js, line 2554 + network.js, line 2554
@@ -2032,7 +2032,7 @@

- network.js, line 2208 + network.js, line 2208
@@ -2133,7 +2133,7 @@

- network.js, line 2120 + network.js, line 2120
@@ -2234,7 +2234,7 @@

- network.js, line 2252 + network.js, line 2252
@@ -2342,7 +2342,7 @@

- network.js, line 2003 + network.js, line 2003
@@ -2446,7 +2446,7 @@

- network.js, line 2188 + network.js, line 2188
@@ -2548,7 +2548,7 @@

- network.js, line 2100 + network.js, line 2100
@@ -2650,7 +2650,7 @@

- network.js, line 1948 + network.js, line 1948
@@ -2752,7 +2752,7 @@

- network.js, line 1908 + network.js, line 1908
@@ -2856,7 +2856,7 @@

- network.js, line 2139 + network.js, line 2139
@@ -2960,7 +2960,7 @@

- network.js, line 2161 + network.js, line 2161
@@ -3062,7 +3062,7 @@

- network.js, line 2227 + network.js, line 2227
@@ -3166,7 +3166,7 @@

- network.js, line 2055 + network.js, line 2055
@@ -3270,7 +3270,7 @@

- network.js, line 2068 + network.js, line 2068
@@ -3372,7 +3372,7 @@

- network.js, line 2526 + network.js, line 2526
@@ -3474,7 +3474,7 @@

- network.js, line 2539 + network.js, line 2539
@@ -3576,7 +3576,7 @@

- network.js, line 2023 + network.js, line 2023
@@ -3677,7 +3677,7 @@

- network.js, line 1978 + network.js, line 1978
@@ -3777,7 +3777,7 @@

- network.js, line 2086 + network.js, line 2086
@@ -3881,7 +3881,7 @@

- network.js, line 2292 + network.js, line 2292
@@ -3983,7 +3983,7 @@

- network.js, line 1934 + network.js, line 1934
@@ -4086,7 +4086,7 @@

- network.js, line 1968 + network.js, line 1968
@@ -4193,7 +4193,7 @@

- network.js, line 1988 + network.js, line 1988
@@ -4293,7 +4293,7 @@

- network.js, line 2039 + network.js, line 2039
@@ -4401,7 +4401,7 @@

- network.js, line 2380 + network.js, line 2380
@@ -4508,7 +4508,7 @@

- network.js, line 2277 + network.js, line 2277
@@ -4610,7 +4610,7 @@

- network.js, line 2365 + network.js, line 2365
@@ -4715,7 +4715,7 @@

- network.js, line 2400 + network.js, line 2400
@@ -4816,7 +4816,7 @@

- network.js, line 2349 + network.js, line 2349
@@ -4925,7 +4925,7 @@

- network.js, line 2308 + network.js, line 2308
@@ -5029,7 +5029,7 @@

- network.js, line 2422 + network.js, line 2422
@@ -5129,7 +5129,7 @@

- network.js, line 2328 + network.js, line 2328
@@ -5236,7 +5236,7 @@

- network.js, line 1897 + network.js, line 1897
@@ -5390,7 +5390,7 @@

- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Network.WifiDevice.html b/docs/jsapi/LuCI.Network.WifiDevice.html index 364b230ec5e..0dc69290115 100644 --- a/docs/jsapi/LuCI.Network.WifiDevice.html +++ b/docs/jsapi/LuCI.Network.WifiDevice.html @@ -17,7 +17,7 @@ @@ -1104,7 +1104,7 @@

- network.js, line 3013 + network.js, line 3013
@@ -1189,7 +1189,7 @@

- network.js, line 3279 + network.js, line 3279
@@ -1344,7 +1344,7 @@

- network.js, line 3304 + network.js, line 3304
@@ -1496,7 +1496,7 @@

- network.js, line 3053 + network.js, line 3053
@@ -1648,7 +1648,7 @@

- network.js, line 3131 + network.js, line 3131
@@ -1759,7 +1759,7 @@

- network.js, line 3110 + network.js, line 3110
@@ -1869,7 +1869,7 @@

- network.js, line 3142 + network.js, line 3142
@@ -1969,7 +1969,7 @@

- network.js, line 3091 + network.js, line 3091
@@ -2071,7 +2071,7 @@

- network.js, line 3203 + network.js, line 3203
@@ -2173,7 +2173,7 @@

- network.js, line 3236 + network.js, line 3236
@@ -2324,7 +2324,7 @@

- network.js, line 3255 + network.js, line 3255
@@ -2426,7 +2426,7 @@

- network.js, line 3079 + network.js, line 3079
@@ -2528,7 +2528,7 @@

- network.js, line 3214 + network.js, line 3214
@@ -2629,7 +2629,7 @@

- network.js, line 3067 + network.js, line 3067
@@ -2783,7 +2783,7 @@

- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Network.WifiNetwork.html b/docs/jsapi/LuCI.Network.WifiNetwork.html index 0308315afe1..478ba8bb96b 100644 --- a/docs/jsapi/LuCI.Network.WifiNetwork.html +++ b/docs/jsapi/LuCI.Network.WifiNetwork.html @@ -17,7 +17,7 @@ @@ -1105,7 +1105,7 @@

- network.js, line 3337 + network.js, line 3337
@@ -1190,7 +1190,7 @@

- network.js, line 4080 + network.js, line 4080
@@ -1461,7 +1461,7 @@

- network.js, line 3371 + network.js, line 3371
@@ -1613,7 +1613,7 @@

- network.js, line 3624 + network.js, line 3624
@@ -1714,7 +1714,7 @@

- network.js, line 3635 + network.js, line 3635
@@ -1815,7 +1815,7 @@

- network.js, line 3572 + network.js, line 3572
@@ -1928,7 +1928,7 @@

- network.js, line 3593 + network.js, line 3593
@@ -2030,7 +2030,7 @@

- network.js, line 3613 + network.js, line 3613
@@ -2131,7 +2131,7 @@

- network.js, line 3815 + network.js, line 3815
@@ -2232,7 +2232,7 @@

- network.js, line 3845 + network.js, line 3845
@@ -2338,7 +2338,7 @@

- network.js, line 3450 + network.js, line 3450
@@ -2441,7 +2441,7 @@

- network.js, line 3861 + network.js, line 3861
@@ -2545,7 +2545,7 @@

- network.js, line 3894 + network.js, line 3894
@@ -2646,7 +2646,7 @@

- network.js, line 4040 + network.js, line 4040
@@ -2747,7 +2747,7 @@

- network.js, line 3827 + network.js, line 3827
@@ -2852,7 +2852,7 @@

- network.js, line 3988 + network.js, line 3988
@@ -2955,7 +2955,7 @@

- network.js, line 3475 + network.js, line 3475
@@ -3058,7 +3058,7 @@

- network.js, line 3497 + network.js, line 3497
@@ -3163,7 +3163,7 @@

- network.js, line 3437 + network.js, line 3437
@@ -3267,7 +3267,7 @@

- network.js, line 3412 + network.js, line 3412
@@ -3374,7 +3374,7 @@

- network.js, line 3485 + network.js, line 3485
@@ -3474,7 +3474,7 @@

- network.js, line 4004 + network.js, line 4004
@@ -3579,7 +3579,7 @@

- network.js, line 3461 + network.js, line 3461
@@ -3680,7 +3680,7 @@

- network.js, line 4015 + network.js, line 4015
@@ -3781,7 +3781,7 @@

- network.js, line 3883 + network.js, line 3883
@@ -3882,7 +3882,7 @@

- network.js, line 3973 + network.js, line 3973
@@ -3984,7 +3984,7 @@

- network.js, line 3872 + network.js, line 3872
@@ -4088,7 +4088,7 @@

- network.js, line 3932 + network.js, line 3932
@@ -4191,7 +4191,7 @@

- network.js, line 3955 + network.js, line 3955
@@ -4293,7 +4293,7 @@

- network.js, line 3423 + network.js, line 3423
@@ -4397,7 +4397,7 @@

- network.js, line 3905 + network.js, line 3905
@@ -4501,7 +4501,7 @@

- network.js, line 3920 + network.js, line 3920
@@ -4605,7 +4605,7 @@

- network.js, line 3525 + network.js, line 3525
@@ -4710,7 +4710,7 @@

- network.js, line 3513 + network.js, line 3513
@@ -4814,7 +4814,7 @@

- network.js, line 4051 + network.js, line 4051
@@ -4915,7 +4915,7 @@

- network.js, line 3397 + network.js, line 3397
@@ -5017,7 +5017,7 @@

- network.js, line 3546 + network.js, line 3546
@@ -5122,7 +5122,7 @@

- network.js, line 3385 + network.js, line 3385
@@ -5276,7 +5276,7 @@

- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Network.html b/docs/jsapi/LuCI.Network.html index db1fe226faf..d8433c5bf9e 100644 --- a/docs/jsapi/LuCI.Network.html +++ b/docs/jsapi/LuCI.Network.html @@ -17,7 +17,7 @@ @@ -1105,7 +1105,7 @@

- network.js, line 645 + network.js, line 645
@@ -1209,7 +1209,7 @@

- network.js, line 901 + network.js, line 901
@@ -1396,7 +1396,7 @@

- network.js, line 1350 + network.js, line 1350
@@ -1546,7 +1546,7 @@

- network.js, line 979 + network.js, line 979
@@ -1694,7 +1694,7 @@

- network.js, line 1388 + network.js, line 1388
@@ -1844,7 +1844,7 @@

- network.js, line 745 + network.js, line 745
@@ -1945,7 +1945,7 @@

- network.js, line 736 + network.js, line 736
@@ -2096,7 +2096,7 @@

- network.js, line 1104 + network.js, line 1104
@@ -2244,7 +2244,7 @@

- network.js, line 1127 + network.js, line 1127
@@ -2345,7 +2345,7 @@

- network.js, line 1650 + network.js, line 1650
@@ -2446,7 +2446,7 @@

- network.js, line 1667 + network.js, line 1667
@@ -2550,7 +2550,7 @@

- network.js, line 1639 + network.js, line 1639
@@ -2711,7 +2711,7 @@

- network.js, line 938 + network.js, line 938
@@ -2859,7 +2859,7 @@

- network.js, line 963 + network.js, line 963
@@ -2961,7 +2961,7 @@

- network.js, line 767 + network.js, line 767
@@ -3161,7 +3161,7 @@

- network.js, line 782 + network.js, line 782
@@ -3262,7 +3262,7 @@

- network.js, line 1544 + network.js, line 1544
@@ -3366,7 +3366,7 @@

- network.js, line 1495 + network.js, line 1495
@@ -3469,7 +3469,7 @@

- network.js, line 1470 + network.js, line 1470
@@ -3572,7 +3572,7 @@

- network.js, line 1257 + network.js, line 1257
@@ -3721,7 +3721,7 @@

- network.js, line 1277 + network.js, line 1277
@@ -3824,7 +3824,7 @@

- network.js, line 1306 + network.js, line 1306
@@ -3975,7 +3975,7 @@

- network.js, line 1320 + network.js, line 1320
@@ -4078,7 +4078,7 @@

- network.js, line 1240 + network.js, line 1240
@@ -4228,7 +4228,7 @@

- network.js, line 681 + network.js, line 681
@@ -4425,7 +4425,7 @@

- network.js, line 663 + network.js, line 663
@@ -4623,7 +4623,7 @@

- network.js, line 870 + network.js, line 870
@@ -4795,7 +4795,7 @@

- network.js, line 850 + network.js, line 850
@@ -4913,7 +4913,7 @@

- network.js, line 809 + network.js, line 809
@@ -5086,7 +5086,7 @@

- network.js, line 1043 + network.js, line 1043
@@ -7131,7 +7131,7 @@

Properties:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Poll.html b/docs/jsapi/LuCI.Poll.html index ff46dcec9cb..0be36a8e6ad 100644 --- a/docs/jsapi/LuCI.Poll.html +++ b/docs/jsapi/LuCI.Poll.html @@ -17,7 +17,7 @@ @@ -1104,7 +1104,7 @@

- luci.js, line 999 + luci.js, line 999
@@ -1189,7 +1189,7 @@

- luci.js, line 1150 + luci.js, line 1150
@@ -1291,7 +1291,7 @@

- luci.js, line 1023 + luci.js, line 1023
@@ -1488,7 +1488,7 @@

- luci.js, line 1064 + luci.js, line 1064
@@ -1662,7 +1662,7 @@

- luci.js, line 1090 + luci.js, line 1090
@@ -1764,7 +1764,7 @@

- luci.js, line 1115 + luci.js, line 1115
@@ -1874,7 +1874,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Request.html b/docs/jsapi/LuCI.Request.html index aaf78445502..4588f78fdb4 100644 --- a/docs/jsapi/LuCI.Request.html +++ b/docs/jsapi/LuCI.Request.html @@ -17,7 +17,7 @@ @@ -1103,7 +1103,7 @@

- luci.js, line 569 + luci.js, line 569
@@ -1195,7 +1195,7 @@

- luci.js, line 844 + luci.js, line 844
@@ -1343,7 +1343,7 @@

- luci.js, line 586 + luci.js, line 586
@@ -1489,7 +1489,7 @@

- luci.js, line 797 + luci.js, line 797
@@ -1669,7 +1669,7 @@

- luci.js, line 818 + luci.js, line 818
@@ -1879,7 +1879,7 @@

- luci.js, line 863 + luci.js, line 863
@@ -2026,7 +2026,7 @@

- luci.js, line 648 + luci.js, line 648
@@ -2212,7 +2212,7 @@

- luci.js, line 822 + luci.js, line 822
@@ -2770,7 +2770,7 @@

Properties:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Request.poll.html b/docs/jsapi/LuCI.Request.poll.html index 6753bde4c48..28a716595b1 100644 --- a/docs/jsapi/LuCI.Request.poll.html +++ b/docs/jsapi/LuCI.Request.poll.html @@ -17,7 +17,7 @@ @@ -1104,7 +1104,7 @@

- luci.js, line 881 + luci.js, line 881
@@ -1189,7 +1189,7 @@

- luci.js, line 985 + luci.js, line 985
@@ -1260,7 +1260,7 @@

- luci.js, line 924 + luci.js, line 924
@@ -1527,7 +1527,7 @@

- luci.js, line 961 + luci.js, line 961
@@ -1674,7 +1674,7 @@

- luci.js, line 969 + luci.js, line 969
@@ -1745,7 +1745,7 @@

- luci.js, line 977 + luci.js, line 977
@@ -1822,7 +1822,7 @@

- luci.js, line 882 + luci.js, line 882
@@ -1993,7 +1993,7 @@

- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.Response.html b/docs/jsapi/LuCI.Response.html index 7e635c2ccf0..f5b3fdf420c 100644 --- a/docs/jsapi/LuCI.Response.html +++ b/docs/jsapi/LuCI.Response.html @@ -17,7 +17,7 @@ @@ -1102,7 +1102,7 @@

- luci.js, line 377 + luci.js, line 377
@@ -1461,7 +1461,7 @@

- luci.js, line 465 + luci.js, line 465
@@ -1616,7 +1616,7 @@

- luci.js, line 486 + luci.js, line 486
@@ -1743,7 +1743,7 @@

- luci.js, line 501 + luci.js, line 501
@@ -1851,7 +1851,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.XHR.html b/docs/jsapi/LuCI.XHR.html index df49578f897..62a7e89634b 100644 --- a/docs/jsapi/LuCI.XHR.html +++ b/docs/jsapi/LuCI.XHR.html @@ -17,7 +17,7 @@ @@ -1106,7 +1106,7 @@

- luci.js, line 2943 + luci.js, line 2943
@@ -1193,7 +1193,7 @@

- luci.js, line 3046 + luci.js, line 3046
@@ -1267,7 +1267,7 @@

- luci.js, line 3035 + luci.js, line 3035
@@ -1370,7 +1370,7 @@

- luci.js, line 3022 + luci.js, line 3022
@@ -1447,7 +1447,7 @@

- luci.js, line 2978 + luci.js, line 2978
@@ -1690,7 +1690,7 @@

- luci.js, line 3005 + luci.js, line 3005
@@ -1933,7 +1933,7 @@

- luci.js, line 3061 + luci.js, line 3061
@@ -2043,7 +2043,7 @@

Throws:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:52 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.dom.html b/docs/jsapi/LuCI.dom.html index 6b065f34c2f..8247dc1ea34 100644 --- a/docs/jsapi/LuCI.dom.html +++ b/docs/jsapi/LuCI.dom.html @@ -17,7 +17,7 @@ @@ -1103,7 +1103,7 @@

- luci.js, line 2065 + luci.js, line 2065
@@ -1188,7 +1188,7 @@

- luci.js, line 2216 + luci.js, line 2216
@@ -1389,7 +1389,7 @@

- luci.js, line 2331 + luci.js, line 2331
@@ -1587,7 +1587,7 @@

- luci.js, line 2565 + luci.js, line 2565
@@ -1788,7 +1788,7 @@

- luci.js, line 2619 + luci.js, line 2619
@@ -2004,7 +2004,7 @@

- luci.js, line 2283 + luci.js, line 2283
@@ -2208,7 +2208,7 @@

- luci.js, line 2409 + luci.js, line 2409
@@ -2468,7 +2468,7 @@

- luci.js, line 2485 + luci.js, line 2485
@@ -2707,7 +2707,7 @@

- luci.js, line 2079 + luci.js, line 2079
@@ -2852,7 +2852,7 @@

- luci.js, line 2585 + luci.js, line 2585
@@ -3002,7 +3002,7 @@

- luci.js, line 2665 + luci.js, line 2665
@@ -3189,7 +3189,7 @@

- luci.js, line 2140 + luci.js, line 2140
@@ -3375,7 +3375,7 @@

- luci.js, line 2167 + luci.js, line 2167
@@ -3565,7 +3565,7 @@

- luci.js, line 2098 + luci.js, line 2098
@@ -3720,7 +3720,7 @@

- luci.js, line 2628 + luci.js, line 2628
@@ -3874,7 +3874,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.fs.html b/docs/jsapi/LuCI.fs.html index 42080a66665..06b0d2f10f4 100644 --- a/docs/jsapi/LuCI.fs.html +++ b/docs/jsapi/LuCI.fs.html @@ -17,7 +17,7 @@ @@ -1104,7 +1104,7 @@

- fs.js, line 111 + fs.js, line 111
@@ -1189,7 +1189,7 @@

- fs.js, line 232 + fs.js, line 232
@@ -1407,7 +1407,7 @@

- fs.js, line 281 + fs.js, line 281
@@ -1557,7 +1557,7 @@

- fs.js, line 132 + fs.js, line 132
@@ -1703,7 +1703,7 @@

- fs.js, line 161 + fs.js, line 161
@@ -1850,7 +1850,7 @@

- fs.js, line 203 + fs.js, line 203
@@ -1996,7 +1996,7 @@

- fs.js, line 146 + fs.js, line 146
@@ -2142,7 +2142,7 @@

- fs.js, line 260 + fs.js, line 260
@@ -2294,7 +2294,7 @@

- fs.js, line 187 + fs.js, line 187
@@ -2983,7 +2983,7 @@

Properties:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.html b/docs/jsapi/LuCI.html index 6384ba40da7..000e39084eb 100644 --- a/docs/jsapi/LuCI.html +++ b/docs/jsapi/LuCI.html @@ -17,7 +17,7 @@ @@ -1101,7 +1101,7 @@

- luci.js, line 1 + luci.js, line 1
@@ -1321,7 +1321,7 @@

- luci.js, line 1340 + luci.js, line 1340
@@ -1533,7 +1533,7 @@

- luci.js, line 1300 + luci.js, line 1300
@@ -1772,7 +1772,7 @@

- luci.js, line 1918 + luci.js, line 1918
@@ -1984,7 +1984,7 @@

- luci.js, line 2040 + luci.js, line 2040
@@ -2087,7 +2087,7 @@

- luci.js, line 1574 + luci.js, line 1574
@@ -2280,7 +2280,7 @@

- luci.js, line 1765 + luci.js, line 1765
@@ -2435,7 +2435,7 @@

- luci.js, line 1745 + luci.js, line 1745
@@ -2535,7 +2535,7 @@

- luci.js, line 1679 + luci.js, line 1679
@@ -2722,7 +2722,7 @@

- luci.js, line 1988 + luci.js, line 1988
@@ -3027,7 +3027,7 @@

- luci.js, line 1946 + luci.js, line 1946
@@ -3242,7 +3242,7 @@

- luci.js, line 1234 + luci.js, line 1234
@@ -3481,7 +3481,7 @@

- luci.js, line 1379 + luci.js, line 1379
@@ -3739,7 +3739,7 @@

- luci.js, line 1873 + luci.js, line 1873
@@ -3910,7 +3910,7 @@

- luci.js, line 1732 + luci.js, line 1732
@@ -4067,7 +4067,7 @@

- luci.js, line 2053 + luci.js, line 2053
@@ -4170,7 +4170,7 @@

- luci.js, line 1794 + luci.js, line 1794
@@ -4387,7 +4387,7 @@

- luci.js, line 2027 + luci.js, line 2027
@@ -4535,7 +4535,7 @@

- luci.js, line 1839 + luci.js, line 1839
@@ -4685,7 +4685,7 @@

- luci.js, line 1710 + luci.js, line 1710
@@ -4848,7 +4848,7 @@

- luci.js, line 1877 + luci.js, line 1877
@@ -5019,7 +5019,7 @@

- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.rpc.html b/docs/jsapi/LuCI.rpc.html index 6e7d928d62e..c6c065afb02 100644 --- a/docs/jsapi/LuCI.rpc.html +++ b/docs/jsapi/LuCI.rpc.html @@ -17,7 +17,7 @@ @@ -1103,7 +1103,7 @@

- rpc.js, line 8 + rpc.js, line 8
@@ -1188,7 +1188,7 @@

- rpc.js, line 454 + rpc.js, line 454
@@ -1333,7 +1333,7 @@

- rpc.js, line 292 + rpc.js, line 292
@@ -1481,7 +1481,7 @@

- rpc.js, line 367 + rpc.js, line 367
@@ -1581,7 +1581,7 @@

- rpc.js, line 346 + rpc.js, line 346
@@ -1682,7 +1682,7 @@

- rpc.js, line 391 + rpc.js, line 391
@@ -1828,7 +1828,7 @@

- rpc.js, line 140 + rpc.js, line 140
@@ -1995,7 +1995,7 @@

- rpc.js, line 470 + rpc.js, line 470
@@ -2141,7 +2141,7 @@

- rpc.js, line 377 + rpc.js, line 377
@@ -2257,7 +2257,7 @@

- rpc.js, line 357 + rpc.js, line 357
@@ -2650,7 +2650,7 @@

- rpc.js, line 231 + rpc.js, line 231
@@ -2863,7 +2863,7 @@

- rpc.js, line 408 + rpc.js, line 408
@@ -3051,7 +3051,7 @@

- rpc.js, line 254 + rpc.js, line 254
@@ -3221,7 +3221,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.uci.html b/docs/jsapi/LuCI.uci.html index 31cf8ba4ce2..98698e98d0a 100644 --- a/docs/jsapi/LuCI.uci.html +++ b/docs/jsapi/LuCI.uci.html @@ -17,7 +17,7 @@ @@ -1105,7 +1105,7 @@

- uci.js, line 4 + uci.js, line 4
@@ -1190,7 +1190,7 @@

- uci.js, line 269 + uci.js, line 269
@@ -1401,7 +1401,7 @@

- uci.js, line 858 + uci.js, line 858
@@ -1563,7 +1563,7 @@

- uci.js, line 938 + uci.js, line 938
@@ -1664,7 +1664,7 @@

- uci.js, line 88 + uci.js, line 88
@@ -1813,7 +1813,7 @@

- uci.js, line 443 + uci.js, line 443
@@ -2042,7 +2042,7 @@

- uci.js, line 618 + uci.js, line 618
@@ -2275,7 +2275,7 @@

- uci.js, line 205 + uci.js, line 205
@@ -2430,7 +2430,7 @@

- uci.js, line 718 + uci.js, line 718
@@ -2699,7 +2699,7 @@

- uci.js, line 296 + uci.js, line 296
@@ -2838,7 +2838,7 @@

- uci.js, line 119 + uci.js, line 119
@@ -3016,7 +3016,7 @@

- uci.js, line 772 + uci.js, line 772
@@ -3120,7 +3120,7 @@

- uci.js, line 384 + uci.js, line 384
@@ -3333,7 +3333,7 @@

- uci.js, line 516 + uci.js, line 516
@@ -3529,7 +3529,7 @@

- uci.js, line 653 + uci.js, line 653
@@ -3750,7 +3750,7 @@

- uci.js, line 237 + uci.js, line 237
@@ -3870,7 +3870,7 @@

- uci.js, line 587 + uci.js, line 587
@@ -4035,7 +4035,7 @@

- uci.js, line 683 + uci.js, line 683
@@ -4622,7 +4622,7 @@

- uci.js, line 352 + uci.js, line 352
@@ -4769,7 +4769,7 @@

- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:52 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/LuCI.view.html b/docs/jsapi/LuCI.view.html index 0fa00e48d15..53c222c5f78 100644 --- a/docs/jsapi/LuCI.view.html +++ b/docs/jsapi/LuCI.view.html @@ -17,7 +17,7 @@ @@ -1103,7 +1103,7 @@

- luci.js, line 2687 + luci.js, line 2687
@@ -1188,7 +1188,7 @@

- luci.js, line 2905 + luci.js, line 2905
@@ -1301,7 +1301,7 @@

- luci.js, line 2871 + luci.js, line 2871
@@ -1465,7 +1465,7 @@

- luci.js, line 2790 + luci.js, line 2790
@@ -1629,7 +1629,7 @@

- luci.js, line 2834 + luci.js, line 2834
@@ -1795,7 +1795,7 @@

- luci.js, line 2725 + luci.js, line 2725
@@ -1905,7 +1905,7 @@

- luci.js, line 2757 + luci.js, line 2757
@@ -2079,7 +2079,7 @@

Returns:
- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:52 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:06 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/fs.js.html b/docs/jsapi/fs.js.html index 3ee1af8e614..467319f89ad 100644 --- a/docs/jsapi/fs.js.html +++ b/docs/jsapi/fs.js.html @@ -1,32 +1,1082 @@ - + - JSDoc: Source: fs.js - - - + Source: fs.js + + + + + - - + + + + + + + + - -
- -

Source: fs.js

- +
+ +
+

Source: fs.js

+
-
'use strict';
+            
'use strict';
 'require rpc';
 
 /**
@@ -332,19 +1382,16 @@ 

Source: fs.js

-
- - -
-
- Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) -
+ - - +
+ Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time) +
+
+
+ + diff --git a/docs/jsapi/index.html b/docs/jsapi/index.html index fa4f0e17b0c..5933bcd948c 100644 --- a/docs/jsapi/index.html +++ b/docs/jsapi/index.html @@ -17,7 +17,7 @@ @@ -1104,7 +1104,7 @@

- Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:20:51 GMT+0100 (Central European Standard Time) + Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time)
diff --git a/docs/jsapi/luci.js.html b/docs/jsapi/luci.js.html index 7cad32ce50c..1268256686b 100644 --- a/docs/jsapi/luci.js.html +++ b/docs/jsapi/luci.js.html @@ -1,32 +1,1082 @@ - + - JSDoc: Source: luci.js - - - + Source: luci.js + + + + + - - + + + + + + + + - -
- -

Source: luci.js

- +
+ +
+

Source: luci.js

+
-
/**
+            
/**
  * @class LuCI
  * @classdesc
  *
@@ -3107,19 +4157,16 @@ 

Source: luci.js

-
- - -
-
- Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) -
+ - - +
+ Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time) +
+
+
+ + diff --git a/docs/jsapi/network.js.html b/docs/jsapi/network.js.html index e06633357fc..3b42218a6bb 100644 --- a/docs/jsapi/network.js.html +++ b/docs/jsapi/network.js.html @@ -1,32 +1,1082 @@ - + - JSDoc: Source: network.js - - - + Source: network.js + + + + + - - + + + + + + + + - -
- -

Source: network.js

- +
+ +
+

Source: network.js

+
-
'use strict';
+            
'use strict';
 'require uci';
 'require rpc';
 'require validation';
@@ -391,7 +1441,7 @@ 

Source: network.js

var s = { isTunnel: {}, isBridge: {}, isSwitch: {}, isWifi: {}, ifaces: netifd_ifaces, radios: data[3], hosts: data[4], - netdevs: {}, bridges: {}, switches: {} + netdevs: {}, bridges: {}, switches: {}, hostapd: {} }; for (var name in luci_devs) { @@ -523,7 +1573,24 @@

Source: network.js

_init = null; - return (_state = s); + var objects = []; + + if (L.isObject(s.radios)) + for (var radio in s.radios) + if (L.isObject(s.radios[radio]) && Array.isArray(s.radios[radio].interfaces)) + for (var i = 0; i < s.radios[radio].interfaces.length; i++) + if (L.isObject(s.radios[radio].interfaces[i]) && s.radios[radio].interfaces[i].ifname) + objects.push('hostapd.%s'.format(s.radios[radio].interfaces[i].ifname)); + + return (objects.length ? L.resolveDefault(rpc.list.apply(rpc, objects), {}) : Promise.resolve({})).then(function(res) { + for (var k in res) { + var m = k.match(/^hostapd\.(.+)$/); + if (m) + s.hostapd[m[1]] = res[k]; + } + + return (_state = s); + }); }); } @@ -1315,51 +2382,32 @@

Source: network.js

* be found. */ getWifiNetwork: function(netname) { - var sid, res, netid, radioname, radiostate, netstate; + return initNetworkState() + .then(L.bind(this.lookupWifiNetwork, this, netname)); + }, + /** + * Get an array of all {@link LuCI.Network.WifiNetwork WifiNetwork} + * instances describing the wireless networks present on the system. + * + * @returns {Promise<Array<LuCI.Network.WifiNetwork>>} + * Returns a promise resolving to an array of `WifiNetwork` instances + * describing the wireless networks. The array will be empty if no networks + * are found. + */ + getWifiNetworks: function() { return initNetworkState().then(L.bind(function() { - sid = getWifiSidByNetid(netname); - - if (sid != null) { - res = getWifiStateBySid(sid); - netid = netname; - radioname = res ? res[0] : null; - radiostate = res ? res[1] : null; - netstate = res ? res[2] : null; - } - else { - res = getWifiStateByIfname(netname); + var wifiIfaces = uci.sections('wireless', 'wifi-iface'), + rv = []; - if (res != null) { - radioname = res[0]; - radiostate = res[1]; - netstate = res[2]; - sid = netstate.section; - netid = L.toArray(getWifiNetidBySid(sid))[0]; - } - else { - res = getWifiStateBySid(netname); + for (var i = 0; i < wifiIfaces.length; i++) + rv.push(this.lookupWifiNetwork(wifiIfaces[i]['.name'])); - if (res != null) { - radioname = res[0]; - radiostate = res[1]; - netstate = res[2]; - sid = netname; - netid = L.toArray(getWifiNetidBySid(sid))[0]; - } - else { - res = getWifiNetidBySid(netname); - - if (res != null) { - netid = res[0]; - radioname = res[1]; - sid = netname; - } - } - } - } + rv.sort(function(a, b) { + return (a.getID() > b.getID()); + }); - return this.instantiateWifiNetwork(sid || netname, radioname, radiostate, netid, netstate); + return rv; }, this)); }, @@ -1499,10 +2547,14 @@

Source: network.js

*/ getWANNetworks: function() { return this.getStatusByRoute('0.0.0.0', 0).then(L.bind(function(statuses) { - var rv = []; + var rv = [], seen = {}; - for (var i = 0; i < statuses.length; i++) - rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto)); + for (var i = 0; i < statuses.length; i++) { + if (!seen.hasOwnProperty(statuses[i].interface)) { + rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto)); + seen[statuses[i].interface] = true; + } + } return rv; }, this)); @@ -1520,10 +2572,14 @@

Source: network.js

*/ getWAN6Networks: function() { return this.getStatusByRoute('::', 0).then(L.bind(function(statuses) { - var rv = []; + var rv = [], seen = {}; - for (var i = 0; i < statuses.length; i++) - rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto)); + for (var i = 0; i < statuses.length; i++) { + if (!seen.hasOwnProperty(statuses[i].interface)) { + rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto)); + seen[statuses[i].interface] = true; + } + } return rv; }, this)); @@ -1594,8 +2650,58 @@

Source: network.js

}, /* private */ - instantiateWifiNetwork: function(sid, radioname, radiostate, netid, netstate) { - return new WifiNetwork(sid, radioname, radiostate, netid, netstate); + instantiateWifiNetwork: function(sid, radioname, radiostate, netid, netstate, hostapd) { + return new WifiNetwork(sid, radioname, radiostate, netid, netstate, hostapd); + }, + + /* private */ + lookupWifiNetwork: function(netname) { + var sid, res, netid, radioname, radiostate, netstate; + + sid = getWifiSidByNetid(netname); + + if (sid != null) { + res = getWifiStateBySid(sid); + netid = netname; + radioname = res ? res[0] : null; + radiostate = res ? res[1] : null; + netstate = res ? res[2] : null; + } + else { + res = getWifiStateByIfname(netname); + + if (res != null) { + radioname = res[0]; + radiostate = res[1]; + netstate = res[2]; + sid = netstate.section; + netid = L.toArray(getWifiNetidBySid(sid))[0]; + } + else { + res = getWifiStateBySid(netname); + + if (res != null) { + radioname = res[0]; + radiostate = res[1]; + netstate = res[2]; + sid = netname; + netid = L.toArray(getWifiNetidBySid(sid))[0]; + } + else { + res = getWifiNetidBySid(netname); + + if (res != null) { + netid = res[0]; + radioname = res[1]; + sid = netname; + } + } + } + } + + return this.instantiateWifiNetwork(sid || netname, radioname, + radiostate, netid, netstate, + netstate ? _state.hostapd[netstate.ifname] : null); }, /** @@ -3225,14 +4331,15 @@

Source: network.js

* radio device. */ getWifiNetworks: function() { - var uciWifiIfaces = uci.sections('wireless', 'wifi-iface'), - tasks = []; + return L.network.getWifiNetworks().then(L.bind(function(networks) { + var rv = []; - for (var i = 0; i < uciWifiIfaces.length; i++) - if (uciWifiIfaces[i].device == this.sid) - tasks.push(L.network.getWifiNetwork(uciWifiIfaces[i]['.name'])); + for (var i = 0; i < networks.length; i++) + if (networks[i].getWifiDeviceName() == this.getName()) + rv.push(networks[i]); - return Promise.all(tasks); + return rv; + }, this)); }, /** @@ -3306,13 +4413,14 @@

Source: network.js

* such networks in parallel. */ WifiNetwork = L.Class.extend(/** @lends LuCI.Network.WifiNetwork.prototype */ { - __init__: function(sid, radioname, radiostate, netid, netstate) { + __init__: function(sid, radioname, radiostate, netid, netstate, hostapd) { this.sid = sid; this.netid = netid; this._ubusdata = { - radio: radioname, - dev: radiostate, - net: netstate + hostapd: hostapd, + radio: radioname, + dev: radiostate, + net: netstate }; }, @@ -4009,6 +5117,56 @@

Source: network.js

*/ getDevice: function() { return L.network.instantiateDevice(this.getIfname()); + }, + + /** + * Check whether this wifi network supports deauthenticating clients. + * + * @returns {boolean} + * Returns `true` when this wifi network instance supports forcibly + * deauthenticating clients, otherwise `false`. + */ + isClientDisconnectSupported: function() { + return L.isObject(this.ubus('hostapd', 'del_client')); + }, + + /** + * Forcibly disconnect the given client from the wireless network. + * + * @param {string} mac + * The MAC address of the client to disconnect. + * + * @param {boolean} [deauth=false] + * Specifies whether to deauthenticate (`true`) or disassociate (`false`) + * the client. + * + * @param {number} [reason=1] + * Specifies the IEEE 802.11 reason code to disassoc/deauth the client + * with. Default is `1` which corresponds to `Unspecified reason`. + * + * @param {number} [ban_time=0] + * Specifies the amount of milliseconds to ban the client from + * reconnecting. By default, no ban time is set which allows the client + * to reassociate / reauthenticate immediately. + * + * @returns {Promise<number>} + * Returns a promise resolving to the underlying ubus call result code + * which is typically `0`, even for not existing MAC addresses. + * The promise might reject with an error in case invalid arguments + * are passed. + */ + disconnectClient: function(mac, deauth, reason, ban_time) { + if (reason == null || reason == 0) + reason = 1; + + if (ban_time == 0) + ban_time = null; + + return rpc.declare({ + object: 'hostapd.%s'.format(this.getIfname()), + method: 'del_client', + params: [ 'addr', 'deauth', 'reason', 'ban_time' ] + })(mac, deauth, reason, ban_time); } }); @@ -4020,19 +5178,16 @@

Source: network.js

-
- - -
-
- Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) -
+ - - +
+ Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time) +
+
+
+ + diff --git a/docs/jsapi/rpc.js.html b/docs/jsapi/rpc.js.html index ca068f31b61..4f10cb3addd 100644 --- a/docs/jsapi/rpc.js.html +++ b/docs/jsapi/rpc.js.html @@ -1,32 +1,1082 @@ - + - JSDoc: Source: rpc.js - - - + Source: rpc.js + + + + + - - + + + + + + + + - -
- -

Source: rpc.js

- +
+ +
+

Source: rpc.js

+
-
'use strict';
+            
'use strict';
 
 var rpcRequestID = 1,
     rpcSessionID = L.env.sessionid || '00000000000000000000000000000000',
@@ -510,19 +1560,16 @@ 

Source: rpc.js

-
- - -
-
- Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) -
+ - - +
+ Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time) +
+
+
+ + diff --git a/docs/jsapi/uci.js.html b/docs/jsapi/uci.js.html index d61010f0e06..c12047cb5b8 100644 --- a/docs/jsapi/uci.js.html +++ b/docs/jsapi/uci.js.html @@ -1,32 +1,1082 @@ - + - JSDoc: Source: uci.js - - - + Source: uci.js + + + + + - - + + + + + + + + - -
- -

Source: uci.js

- +
+ +
+

Source: uci.js

+
-
'use strict';
+            
'use strict';
 'require rpc';
 
 /**
@@ -976,19 +2026,16 @@ 

Source: uci.js

-
- - -
-
- Documentation generated by JSDoc 3.6.3 on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) -
+ - - +
+ Documentation generated by JSDoc 3.6.3 on Thu Nov 07 2019 12:36:05 GMT+0100 (Central European Standard Time) +
+
+
+ + diff --git a/jsdoc.conf.json b/jsdoc.conf.json index d35fd5999c2..dbf12f67f5d 100644 --- a/jsdoc.conf.json +++ b/jsdoc.conf.json @@ -12,7 +12,10 @@ ], "templates": { "cleverLinks": true, - "monospaceLinks": true + "monospaceLinks": true, + "default": { + "outputSourceFiles": true + } }, "opts": { "destination": "docs/jsapi", diff --git a/package.json b/package.json index 5a847add8ec..dfa03493c8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "scripts": { - "doc": "jsdoc -c jsdoc.conf.json -t node_modules/jaguarjs-jsdoc" + "doc": "LC_ALL=C jsdoc -c jsdoc.conf.json -t node_modules/jaguarjs-jsdoc" }, "devDependencies": { "jsdoc": "^3.6.3",