luci/modules/luci-base/luasrc
Kristian Evensen a13748d414 luci-base: Show multiple upstream interface
Several devices have multiple upstream interfaces, for example a fixed
and a mobile broadband connection. Currently, only one upstream
interface is shown per address family in Luci. So in my example, one of
the interfaces would not appear on the Status-page.

This PR introduces support for showing multiple upstream interfaces on
the Status-page. The code is not very complicated. get_status_by_route()
has been extended to return a list of all routes, and
get_wannet()/get_wan6net() now returns all upstream interfaces.

I could not find any other (active) users of these three functions than
calls triggered from the Status-page, so changing the default behavior
should be fine. get_wandev()/get_wan6dev() called get_status_by_route(),
but I could not find any place where those functions were called. I
removed the dev-functions instead of keeping the old
get_status_by_route().

On the status page, the wan/wan6-variables have been replaced with
arrays. When populating the html, we now iterate through these arrays
and create one element for each interface.

I have tested the code with different interface types, v4, v6, as well as
disconnecting and connecting interfaces. The status is updated and the
correct interfaces (or sometimes none at all) are shown.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2018-09-19 11:01:38 +02:00
..
cbi luci-base: add a strict flag to the hostname validator 2018-04-04 23:21:53 +02:00
model luci-base: Show multiple upstream interface 2018-09-19 11:01:38 +02:00
sgi Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
sys timezone data: update to 2018d 2018-04-07 23:26:29 +03:00
tools luci-base: luci.tools.status: add host_hints to DHCPv6 leases 2018-06-28 09:42:17 +02:00
view luci-base: remove fake password field from tab order 2018-08-17 06:58:53 +02:00
cacheloader.lua Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
cbi.lua luci-base: add markup, JS and CSS for new dropdown 2018-06-08 08:14:36 +02:00
ccache.lua Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
config.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00
debug.lua Rework LuCI build system 2015-01-08 16:26:20 +01:00
dispatcher.lua treewide: rework rollback/apply workflow 2018-07-27 14:07:23 +02:00
dispatcher.luadoc luci-base: introduce luci.dispatcher.lookup() 2018-04-05 23:03:01 +02:00
http.lua luci-base: raise maximum POST value size to 100KB 2018-05-18 16:43:29 +02:00
http.luadoc luci-base: fold luci.http.protocol into luci.http 2018-04-18 16:21:27 +02:00
i18n.lua Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
i18n.luadoc Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
ltn12.lua Move inline documentation into separate files. 2015-01-29 16:26:46 +01:00
store.lua Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
sys.lua treewide: filter shell arguments through shellquote() where applicable 2018-04-05 09:37:43 +02:00
sys.luadoc luci-base: add luci.sys.net.host_hints() and regenerate documentation 2016-01-20 16:56:25 +01:00
template.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00
util.lua luci-base: utils: support multiple return values in util.ubus() 2018-07-27 14:07:23 +02:00
util.luadoc luci-base: drop luci.util.dtable() 2018-04-18 16:21:27 +02:00
version.lua Globally reduce copyright headers 2015-01-16 23:38:38 +01:00