luci-mod-admin-full: use incremental background scanning for wireless join
authorJo-Philipp Wich <jo@mein.io>
Wed, 18 Jul 2018 12:43:27 +0000 (14:43 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 20 Jul 2018 06:00:45 +0000 (08:00 +0200)
commit8d88802b835fa930337a61ff45f99b88b0de8214
treecccfe9482abd0e71cc88a2033e77773cefe44188
parent5ea795a4b8bfd502724d27f9c02f46a671e27598
luci-mod-admin-full: use incremental background scanning for wireless join

The previous approach of synchroneously scanning while building the result
page was suboptimal since it frequently led to connection resets when
accessing LuCI via wireless.

It also exhibited problems when accessed via SSL on recent Firefox versions
where the page were only loaded partially.

Rework the wireless scanning to gather scan results in a background process
and put them into the ubus session data area where they can be readily
accessed without causing network interruptions.

Subsequently rebuild the wireless join page to use XHR polling to
incrementally fetch updated scan results.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9b4efaefa1b4c94a7d976c8d65169bf056032e09)
modules/luci-mod-admin-full/luasrc/controller/admin/network.lua
modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_join.htm