luci-base: network.js: recognize DSA ports and bridge VLANs
authorJo-Philipp Wich <jo@mein.io>
Thu, 18 Mar 2021 16:09:07 +0000 (17:09 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 27 May 2021 10:19:05 +0000 (12:19 +0200)
commit470848fac91ad7299c43f96480603be7bc88fb89
tree93e3281fda7dac01f0e0a94916482ff198d93540
parent15ae326879939018d7d89e46dc277693268504f4
luci-base: network.js: recognize DSA ports and bridge VLANs

Use the newly introduced devtype attribute for more robust network device
type detection. This also allows us to easily recognize DSA ports.

Furthermore, synthesize VLAN devices declared by uci bridge-vlan sections,
similar to how it is done for legacy swconfig switch_vlan ones.

Finally implement a new Network.Device.getParent() method to use the newly
available "parent" attribute to resolve the base device of DSA ports or
VLAN devices.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d1bf56d7f178f1b7582d7b3600ee70e65128ccfa)
modules/luci-base/htdocs/luci-static/resources/network.js